Ver Fonte

Merge branch 'Release-Updates'

mbunch_kascope há 2 anos atrás
pai
commit
1ed2cbec8f
100 ficheiros alterados com 3143 adições e 1219 exclusões
  1. 1 0
      .gitignore
  2. 2 2
      Assets/AddOn/WebGLInput-master/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset
  3. 5 1
      Assets/CardEffect/BT10/Black/Sparrowmon_BT10_060.cs
  4. 0 1
      Assets/CardEffect/BT15/Black/Airdramon_BT15_059.cs
  5. 11 4
      Assets/CardEffect/BT15/Black/Ginryumon_BT15_058.cs
  6. 3 1
      Assets/CardEffect/BT15/Black/Hisyaryumon_BT15_063.cs
  7. 1 1
      Assets/CardEffect/BT15/Black/Kyokyomon_BT15_005.cs
  8. 0 1
      Assets/CardEffect/BT15/Black/Megadramon_BT15_064.cs
  9. 1 2
      Assets/CardEffect/BT15/Black/Numemon_X_Antibody_BT15_057.cs
  10. 1 0
      Assets/CardEffect/BT15/Black/Ouryumon_BT15_067.cs
  11. 1 0
      Assets/CardEffect/BT15/Black/Ryudamon_BT15_056.cs
  12. 257 21
      Assets/CardEffect/BT15/Black/WaruMonzaemon_BT15_065.cs
  13. 1 1
      Assets/CardEffect/BT15/Blue/Garurumon_BT15_024.cs
  14. 69 33
      Assets/CardEffect/BT15/Blue/Gomamon_X_Antibody_BT15_021.cs
  15. 1 1
      Assets/CardEffect/BT15/Blue/Matt_Ishida_BT15_083.cs
  16. 123 35
      Assets/CardEffect/BT15/Blue/MegaSeadramon_BT15_029.cs
  17. 68 26
      Assets/CardEffect/BT15/Blue/Metalseadramon_BT15_031.cs
  18. 68 25
      Assets/CardEffect/BT15/Blue/Plesiomon_X_Antibody_BT15_032.cs
  19. 96 19
      Assets/CardEffect/BT15/Blue/Pukumon_BT15_030.cs
  20. 64 19
      Assets/CardEffect/BT15/Blue/WereGarurumon_ACE_BT15_026.cs
  21. 100 21
      Assets/CardEffect/BT15/Green/HerculesKabuterimon_BT15_053.cs
  22. 4 1
      Assets/CardEffect/BT15/Green/Izzy_Izumi_BT15_085.cs
  23. 108 18
      Assets/CardEffect/BT15/Green/MegaKabuterimon_ACE_BT15_049.cs
  24. 62 20
      Assets/CardEffect/BT15/Green/Palmon_X_Antibody_BT15_045.cs
  25. 65 23
      Assets/CardEffect/BT15/Green/Puppetmon_BT15_052.cs
  26. 64 15
      Assets/CardEffect/BT15/Purple/Bakemon_BT15_073.cs
  27. 86 8
      Assets/CardEffect/BT15/Purple/Gesomon_BT15_074.cs
  28. 26 32
      Assets/CardEffect/BT15/Purple/Leviamon_X_Antibody_BT15_081.cs
  29. 86 14
      Assets/CardEffect/BT15/Purple/Loogarmon_BT15_075.cs
  30. 1 1
      Assets/CardEffect/BT15/Purple/Mist_Barrier_BT15_098.cs
  31. 111 4
      Assets/CardEffect/BT15/Purple/Myotismon_ACE_BT15_076.cs
  32. 65 23
      Assets/CardEffect/BT15/Purple/Piedmon_BT15_079.cs
  33. 2 6
      Assets/CardEffect/BT15/Purple/Seventh_Lightning_BT15_100.cs
  34. 113 11
      Assets/CardEffect/BT15/Purple/VenomMyotismon_BT15_080.cs
  35. 2 1
      Assets/CardEffect/BT15/Purple/WaruSeadramon_BT15_078.cs
  36. 1 1
      Assets/CardEffect/BT15/White/Apocalymon_BT15_102.cs
  37. 3 7
      Assets/CardEffect/BT15/Yellow/Kari_Kamiya_BT15_084.cs
  38. 5 7
      Assets/CardEffect/BT15/Yellow/Magnadramon_BT15_042.cs
  39. 1 12
      Assets/CardEffect/BT15/Yellow/Revelation_of_Light_BT15_092.cs
  40. 1 1
      Assets/CardEffect/BT8/White/Kimeramon_BT8_084.cs
  41. 1 1
      Assets/CardEffect/BT9/Green/GrandisScissor_BT9_100.cs
  42. 1 4
      Assets/CardEffect/EX2/Yellow/RiCiuChon_EX2_059.cs
  43. 21 18
      Assets/CardEffect/EX4/Black/OmegamonAlterB_EX4_073.cs
  44. 1 1
      Assets/CardEffect/EX5/Red/Glacenovamon_EX5_073.cs
  45. 9 14
      Assets/CardEffect/LM/Black/Espimon_LM_014.cs
  46. 139 32
      Assets/CardEffect/LM/Blue/Amphimon_LM_005.cs
  47. 97 28
      Assets/CardEffect/LM/Blue/Cthyllamon_LM_006.cs
  48. 117 36
      Assets/CardEffect/LM/Blue/Thetismon_LM_004.cs
  49. 0 1
      Assets/CardEffect/LM/Green/Airdramon_LM_009.cs
  50. 1 1
      Assets/CardEffect/LM/Green/Chamblemon_LM_010.cs
  51. 75 18
      Assets/CardEffect/LM/Green/Diarbbitmon_LM_013.cs
  52. 107 26
      Assets/CardEffect/LM/Green/Lamortmon_LM_012.cs
  53. 108 28
      Assets/CardEffect/LM/Green/SymbareAngoramon_LM_011.cs
  54. 3 7
      Assets/CardEffect/LM/Purple/Gammamon_LM_016.cs
  55. 136 10
      Assets/CardEffect/LM/Purple/Regulusmon_LM_017.cs
  56. 179 43
      Assets/CardEffect/LM/Red/Siriusmon_LM_001.cs
  57. 1 19
      Assets/CardEffect/LM/Yellow/Publimon_LM_007.cs
  58. 126 113
      Assets/CardEffect/P/Blue/Veemon_P_117.cs
  59. 3 3
      Assets/CardEffect/RB1/Purple/Arkturusmon_RB1_031.cs
  60. 5 2
      Assets/CardEffect/ST17/Blue/Magnamon_ST17_13.cs
  61. 4 2
      Assets/CardEffect/ST17/Green/DoubleTyphoon_ST17_11.cs
  62. 26 88
      Assets/CardEffect/ST17/Green/Rapidmon_ST17_07.cs
  63. 0 1
      Assets/Editor/CsvLoader_CardEntity.cs
  64. 3 3
      Assets/Image/Background_home1.png.meta
  65. 3 3
      Assets/Image/Confused_01_00.png.meta
  66. 3 3
      Assets/Image/Confused_01_01.png.meta
  67. 3 3
      Assets/Image/Confused_01_02.png.meta
  68. 3 3
      Assets/Image/Confused_01_03.png.meta
  69. 3 3
      Assets/Image/DigiXrosAnim1.png.meta
  70. 3 3
      Assets/Image/DigiXrosAnim2.png.meta
  71. 3 3
      Assets/Image/UI/claw.png.meta
  72. 3 3
      Assets/Image/UI/titleLogo5.png.meta
  73. 3 3
      Assets/Image/burst/light0.png.meta
  74. 3 3
      Assets/Image/burst/light1.png.meta
  75. 3 3
      Assets/Image/burst/light2.png.meta
  76. 3 3
      Assets/Image/burst/light3.png.meta
  77. 3 3
      Assets/Image/burst/light4.png.meta
  78. 2 2
      Assets/RenderTexture/breakCard_cardSource.renderTexture
  79. 2 2
      Assets/RenderTexture/breakCard_permanent.renderTexture
  80. 2 2
      Assets/RenderTexture/particle_DNA_Blue.renderTexture
  81. 2 2
      Assets/RenderTexture/particle_DNA_Red.renderTexture
  82. 2 2
      Assets/RenderTexture/particle_battle.renderTexture
  83. 2 2
      Assets/RenderTexture/particle_opening.renderTexture
  84. 114 120
      Assets/Scenes/Opening.unity
  85. 5 10
      Assets/Scripts/CardController.cs
  86. 5 2
      Assets/Scripts/CardEffectCommons/GameContextDeterminarion.cs
  87. 15 6
      Assets/Scripts/CardEffectCommons/MinMax_DP_Cost_Level/Cost/IsMaxCost.cs
  88. 15 6
      Assets/Scripts/CardEffectCommons/MinMax_DP_Cost_Level/Cost/IsMinCost.cs
  89. 2 2
      Assets/Scripts/CardEffectCommons/MinMax_DP_Cost_Level/DP/IsMinDP.cs
  90. 2 5
      Assets/Scripts/CardEffectFactory/CanNotBlock.cs
  91. 0 5
      Assets/Scripts/ICardEffect.cs
  92. 5 6
      Assets/Scripts/MultipleSkills.cs
  93. 35 13
      Assets/Scripts/Permanent.cs
  94. 1 1
      Assets/Scripts/Player.cs
  95. 28 23
      Assets/Scripts/ResultObject.cs
  96. 17 17
      Assets/Scripts/TurnStateMachine.cs
  97. 1 2
      Packages/manifest.json
  98. 1 28
      Packages/packages-lock.json
  99. 2 2
      ProjectSettings/ProjectSettings.asset
  100. 2 2
      ProjectSettings/QualitySettings.asset

+ 1 - 0
.gitignore

@@ -9,6 +9,7 @@
 /[Bb]uilds/
 /[Ll]ogs/
 /[Uu]ser[Ss]ettings/
+/[Ll]fs/[Tt]mp/
 
 # MemoryCaptures can get excessive in size.
 # They also could contain extremely sensitive data

+ 2 - 2
Assets/AddOn/WebGLInput-master/Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF - Fallback.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:5b023a6be3b837bf83442c0693d818f9919434fa3699d6c757986d40ee9a776b
-size 543759
+oid sha256:9eb581d17b4f8505afad852d89f886e762efdac6c541bc460a12ff9871c5ed20
+size 9501

+ 5 - 1
Assets/CardEffect/BT10/Black/Sparrowmon_BT10_060.cs

@@ -27,7 +27,11 @@ public class Sparrowmon_BT10_060 : CEntity_Effect
             {
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => (permanent.IsDigimon || permanent.IsTamer) && (permanent.TopCard.CardTraits.Contains("Xros Heart") || permanent.TopCard.CardTraits.Contains("XrosHeart") || permanent.TopCard.CardTraits.Contains("Twilight"))))
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => 
+                        permanent != card.PermanentOfThisCard() && 
+                        (permanent.IsDigimon || permanent.IsTamer) && 
+                        (permanent.TopCard.CardTraits.Contains("Xros Heart") || 
+                        permanent.TopCard.CardTraits.Contains("XrosHeart") || permanent.TopCard.CardTraits.Contains("Twilight"))))
                     {
                         return true;
                     }

+ 0 - 1
Assets/CardEffect/BT15/Black/Airdramon_BT15_059.cs

@@ -5,7 +5,6 @@ using System.Linq;
 using Photon;
 using System;
 using Photon.Pun;
-using System.Drawing.Printing;
 
 public class Airdramon_BT15_059 : CEntity_Effect
 {

+ 11 - 4
Assets/CardEffect/BT15/Black/Ginryumon_BT15_058.cs

@@ -45,6 +45,7 @@ public class Ginryumon_BT15_058 : CEntity_Effect
             activateClass.SetUpICardEffect("Suspend opponent's Digimon or Tamers with play cost less than this Digimon.", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
             activateClass.SetIsInheritedEffect(true);
+            activateClass.SetHashString("suspend_BT15_058_inherited");
             cardEffects.Add(activateClass);
 
             string EffectDiscription()
@@ -204,9 +205,12 @@ public class Ginryumon_BT15_058 : CEntity_Effect
                         {
                             if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition1))
                             {
-                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendNextActivePhase(
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotUnsuspend(
                                         targetPermanent: selectedPermanent,
-                                        activateClass: activateClass
+                                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                        activateClass: activateClass,
+                                        condition: null,
+                                        effectName: "Can't unsuspend"
                                     ));
                             }
                         }
@@ -297,9 +301,12 @@ public class Ginryumon_BT15_058 : CEntity_Effect
                         {
                             if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition1))
                             {
-                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendNextActivePhase(
+                                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotUnsuspend(
                                         targetPermanent: selectedPermanent,
-                                        activateClass: activateClass
+                                        effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                        activateClass: activateClass,
+                                        condition: null,
+                                        effectName: "Can't unsuspend"
                                     ));
                             }
                         }

+ 3 - 1
Assets/CardEffect/BT15/Black/Hisyaryumon_BT15_063.cs

@@ -43,8 +43,9 @@ public class Hisyaryumon_BT15_063 : CEntity_Effect
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Unsuspend a Digimon with the [Beast Dragon] or [DigiPolice] trait.", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
             activateClass.SetIsInheritedEffect(true);
+            activateClass.SetHashString("unsuspend_BT15_063");
             cardEffects.Add(activateClass);
 
             string EffectDiscription()
@@ -204,6 +205,7 @@ public class Hisyaryumon_BT15_063 : CEntity_Effect
 
 
         }
+
         return cardEffects;
     }
 }

+ 1 - 1
Assets/CardEffect/BT15/Black/Kyokyomon_BT15_005.cs

@@ -23,7 +23,7 @@ public class Kyokyomon_BT15_005 : CEntity_Effect
 
             string EffectDiscription()
             {
-                return "[Opponent's Turn][Once Per Turn] When an opponent's Digimon becomes unsuspended, <De-Digivolve 1> that Digimon.";
+                return "[Opponent's Turn] [Once Per Turn] When a Digimon becomes unsuspended, <Draw 1>.";
             }
 
             bool PermanentCondition(Permanent permanent)

+ 0 - 1
Assets/CardEffect/BT15/Black/Megadramon_BT15_064.cs

@@ -5,7 +5,6 @@ using UnityEngine;
 using Photon;
 using System;
 using Photon.Pun;
-using System.Runtime.Remoting;
 
 public class Megadramon_BT15_064 : CEntity_Effect
 {

+ 1 - 2
Assets/CardEffect/BT15/Black/Numemon_X_Antibody_BT15_057.cs

@@ -5,7 +5,6 @@ using UnityEngine;
 using Photon;
 using System;
 using Photon.Pun;
-using System.Runtime.Remoting;
 
 public class Numemon_X_Antibody_BT15_057 : CEntity_Effect
 {
@@ -175,7 +174,7 @@ public class Numemon_X_Antibody_BT15_057 : CEntity_Effect
 
             bool CanActivateCondition(Hashtable hashtable)
             {
-                if (CardEffectCommons.CanActivateOnDeletion(card))
+                if (CardEffectCommons.CanActivateOnDeletionInherited(hashtable, card))
                 {
                     if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardCondition(cardSource)))
                     {

+ 1 - 0
Assets/CardEffect/BT15/Black/Ouryumon_BT15_067.cs

@@ -43,6 +43,7 @@ public class Ouryumon_BT15_067 : CEntity_Effect
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Play 1 Digimon card with the [Beast Dragon] or [DigiPolice] trait with 5000DP or less from your hand.", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+            activateClass.SetHashString("PlayDigimon_BT15_067");
             cardEffects.Add(activateClass);
 
             string EffectDiscription()

+ 1 - 0
Assets/CardEffect/BT15/Black/Ryudamon_BT15_056.cs

@@ -193,6 +193,7 @@ public class Ryudamon_BT15_056 : CEntity_Effect
             activateClass.SetUpICardEffect("Suspend opponent's Digimon or Tamers with play cost less than this Digimon.", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
             activateClass.SetIsInheritedEffect(true);
+            activateClass.SetHashString("suspend_BT15_056_inherited");
             cardEffects.Add(activateClass);
 
             string EffectDiscription()

+ 257 - 21
Assets/CardEffect/BT15/Black/WaruMonzaemon_BT15_065.cs

@@ -5,7 +5,6 @@ using UnityEngine;
 using Photon;
 using System;
 using Photon.Pun;
-using System.Runtime.Remoting;
 
 public class WaruMonzaemon_BT15_065 : CEntity_Effect
 {
@@ -153,7 +152,7 @@ public class WaruMonzaemon_BT15_065 : CEntity_Effect
         }
         #endregion
 
-        #region On Play/When Digivolving - Trash 1 card from hand to DeDigivolve an opponent's Digimon.
+        #region On Play - Trash 1 card from hand to DeDigivolve an opponent's Digimon.
         if (timing == EffectTiming.OnEnterFieldAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
@@ -191,7 +190,7 @@ public class WaruMonzaemon_BT15_065 : CEntity_Effect
 
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
             }
 
             bool CanActivateCondition(Hashtable hashtable)
@@ -209,29 +208,266 @@ public class WaruMonzaemon_BT15_065 : CEntity_Effect
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
+                bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
+                bool canSelectDigivolutionCards = CardEffectCommons.IsExistOnBattleArea(card)
+                && card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectCardCondition) >= 1;
+
+                if (canSelectHand || canSelectDigivolutionCards)
                 {
+                    if (canSelectHand && canSelectDigivolutionCards)
+                    {
+                        List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                        {
+                            new SelectionElement<bool>(message: $"From hand", value : true, spriteIndex: 0),
+                            new SelectionElement<bool>(message: $"From digivolution cards", value : false, spriteIndex: 1),
+                        };
+
+                        string selectPlayerMessage = "From which area do you play a card?";
+                        string notSelectPlayerMessage = "The opponent is choosing from which area to play a card.";
+
+                        GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                    }
+                    else
+                    {
+                        GManager.instance.userSelectionManager.SetBool(canSelectHand);
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+
+                    bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
+
                     bool discarded = false;
 
                     int discardCount = 1;
 
-                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
-
-                    selectHandEffect.SetUp(
-                        selectPlayer: card.Owner,
-                        canTargetCondition: CanSelectCardCondition,
-                        canTargetCondition_ByPreSelecetedList: null,
-                        canEndSelectCondition: null,
-                        maxCount: discardCount,
-                        canNoSelect: true,
-                        canEndNotMax: false,
-                        isShowOpponent: true,
-                        selectCardCoroutine: null,
-                        afterSelectCardCoroutine: AfterSelectCardCoroutine,
-                        mode: SelectHandEffect.Mode.Discard,
-                        cardEffect: activateClass);
-
-                    yield return StartCoroutine(selectHandEffect.Activate());
+                    if (fromHand)
+                    {
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: discardCount,
+                            canNoSelect: true,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                            mode: SelectHandEffect.Mode.Discard,
+                            cardEffect: activateClass);
+
+                        yield return StartCoroutine(selectHandEffect.Activate());
+                    }
+                    else
+                    {
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                            canTargetCondition: CanSelectCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => true,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                            message: "Select 1 card to trash.",
+                            maxCount: discardCount,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.Discard,
+                            root: SelectCardEffect.Root.DigivolutionCards,
+                            customRootCardList: card.PermanentOfThisCard().DigivolutionCards,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+
+                        selectCardEffect.SetUpCustomMessage("Select 1 digivolution card to trash.", "The opponent is selecting 1 digivolution card to trash.");
+
+                        yield return StartCoroutine(selectCardEffect.Activate());
+                    }
+
+                    IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
+                    {
+                        if (cardSources.Count >= 1)
+                        {
+                            discarded = true;
+
+                            yield return null;
+                        }
+                    }
+
+                    if (discarded)
+                    {
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectPermanentCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                maxCount: maxCount,
+                                canNoSelect: false,
+                                canEndNotMax: false,
+                                selectPermanentCoroutine: SelectPermanentCoroutine,
+                                afterSelectPermanentCoroutine: null,
+                                mode: SelectPermanentEffect.Mode.Custom,
+                                cardEffect: activateClass);
+
+                            selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to De-Digivolve.", "The opponent is selecting 1 Digimon to De-Digivolve.");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                Permanent selectedPermanent = permanent;
+
+                                yield return ContinuousController.instance.StartCoroutine(new IDegeneration(selectedPermanent, 1, activateClass).Degeneration());
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        #endregion
+
+        #region When Digivolving - Trash 1 card from hand to DeDigivolve an opponent's Digimon.
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Trash 1 card from hand to DeDigivolve an opponent's Digimon.", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+            activateClass.SetHashString("DeDigivolve_BT15_065");
+            cardEffects.Add(activateClass);
+
+            string EffectDiscription()
+            {
+                return "[On Play] [When Digivolving] By trashing 1 card with [Numemon] in it's name in your hand or from the bottom of this Digimon's digivolution cards, [De-Digivolve 1] 1 of your opponent's Digimon.";
+            }
+
+            bool CanSelectCardCondition(CardSource cardSource)
+            {
+                if (cardSource.ContainsCardName("Numemon"))
+                {
+                    return true;
+                }
+
+                return false;
+            }
+
+            bool CanSelectPermanentCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                {
+                    if (permanent.TopCard.HasLevel)
+                    {
+                        return true;
+                    }
+                }
+                return false;
+            }
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    if (card.Owner.HandCards.Count >= 1)
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
+                bool canSelectDigivolutionCards = CardEffectCommons.IsExistOnBattleArea(card)
+                && card.PermanentOfThisCard().DigivolutionCards.Count(CanSelectCardCondition) >= 1;
+
+                if (canSelectHand || canSelectDigivolutionCards)
+                {
+                    if (canSelectHand && canSelectDigivolutionCards)
+                    {
+                        List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
+                        {
+                            new SelectionElement<bool>(message: $"From hand", value : true, spriteIndex: 0),
+                            new SelectionElement<bool>(message: $"From digivolution cards", value : false, spriteIndex: 1),
+                        };
+
+                        string selectPlayerMessage = "From which area do you play a card?";
+                        string notSelectPlayerMessage = "The opponent is choosing from which area to play a card.";
+
+                        GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+                    }
+                    else
+                    {
+                        GManager.instance.userSelectionManager.SetBool(canSelectHand);
+                    }
+
+                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+
+                    bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                    bool discarded = false;
+
+                    int discardCount = 1;
+
+                    if (fromHand)
+                    {
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: discardCount,
+                            canNoSelect: true,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                            mode: SelectHandEffect.Mode.Discard,
+                            cardEffect: activateClass);
+
+                        yield return StartCoroutine(selectHandEffect.Activate());
+                    }
+                    else
+                    {
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                            canTargetCondition: CanSelectCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            canNoSelect: () => true,
+                            selectCardCoroutine: null,
+                            afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                            message: "Select 1 card to trash.",
+                            maxCount: discardCount,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            mode: SelectCardEffect.Mode.Discard,
+                            root: SelectCardEffect.Root.Custom,
+                            customRootCardList: card.PermanentOfThisCard().DigivolutionCards,
+                            canLookReverseCard: true,
+                            selectPlayer: card.Owner,
+                            cardEffect: activateClass);
+
+                        selectCardEffect.SetUpCustomMessage("Select 1 digivolution card to trash.", "The opponent is selecting 1 digivolution card to trash.");
+
+                        yield return StartCoroutine(selectCardEffect.Activate());
+                    }
 
                     IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                     {

+ 1 - 1
Assets/CardEffect/BT15/Blue/Garurumon_BT15_024.cs

@@ -39,7 +39,7 @@ public class Garurumon_BT15_024 : CEntity_Effect
         if (timing == EffectTiming.OnEnterFieldAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("This Digimon digivolves", CanUseCondition, card);
+            activateClass.SetUpICardEffect("Draw 1 or Play 1 tamer", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
             cardEffects.Add(activateClass);
 

+ 69 - 33
Assets/CardEffect/BT15/Blue/Gomamon_X_Antibody_BT15_021.cs

@@ -24,60 +24,96 @@ public class Gomamon_X_Antibody_BT15_021 : CEntity_Effect
         }
         #endregion
 
-        #region On Play/When Digivolving
-        if (timing == EffectTiming.OnEnterFieldAnyone)
+        #region On Play/When Digivolving Shared
+        string EffectSharedDiscription()
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-            cardEffects.Add(activateClass);
+            return "[On Play] [When Digivolving] Reveal the top 3 cards of your deck. Add 1 card with the [Sea Beast], [Plesiosaur], [Beastkin] or [X Antibody] trait among them to the hand.";
+        }
 
-            string EffectDiscription()
+        bool CanSelectCardCondition(CardSource cardSource)
+        {
+            if (cardSource.ContainsTraits("Sea Beast"))
             {
-                return "[On Play] [When Digivolving] Reveal the top 3 cards of your deck. Add 1 card with the [Sea Beast], [Plesiosaur], [Beastkin] or [X Antibody] trait among them to the hand.";
+                return true;
             }
 
-            bool CanSelectCardCondition(CardSource cardSource)
+            if (cardSource.ContainsTraits("Plesiosaur"))
             {
-                if (cardSource.ContainsTraits("Sea Beast"))
-                {
-                    return true;
-                }
+                return true;
+            }
 
-                if (cardSource.ContainsTraits("Plesiosaur"))
-                {
-                    return true;
-                }
+            if (cardSource.ContainsTraits("Beastkin"))
+            {
+                return true;
+            }
 
-                if (cardSource.ContainsTraits("Beastkin"))
-                {
-                    return true;
-                }
+            if (cardSource.HasXAntibodyTraits)
+            {
+                return true;
+            }
 
-                if (cardSource.HasXAntibodyTraits)
+            return false;
+        }
+
+        bool CanActivateSharedCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
+            {
+                if (card.Owner.LibraryCards.Count >= 1)
                 {
                     return true;
                 }
-
-                return false;
             }
 
+            return false;
+        }
+        #endregion
+
+        #region On Play
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card); 
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card); 
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
-                {
-                    if (card.Owner.LibraryCards.Count >= 1)
+                yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                    revealCount: 3,
+                    simplifiedSelectCardConditions:
+                    new SimplifiedSelectCardConditionClass[]
                     {
-                        return true;
-                    }
-                }
+                        new SimplifiedSelectCardConditionClass(
+                            canTargetCondition:CanSelectCardCondition,
+                            message: "Select 1 card.",
+                            mode: SelectCardEffect.Mode.AddHand,
+                            maxCount: 1,
+                            selectCardCoroutine: null),
+                    },
+                    remainingCardsPlace: RemainingCardsPlace.DeckBottom,
+                    activateClass: activateClass
+                ));
+            }
+        }
+        #endregion
 
-                return false;
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return  CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)

+ 1 - 1
Assets/CardEffect/BT15/Blue/Matt_Ishida_BT15_083.cs

@@ -89,7 +89,7 @@ public class Matt_Ishida_BT15_083 : CEntity_Effect
 
             string EffectDiscription()
             {
-                return "[Your Turn][Once Per Turn] When one of your Digimons effects adds cards to your hand, this Digimon gets +1000 DP for the turn.";
+                return "[Your Turn] When one of your Digimon's effects adds cards to your hand, by suspending this Tamer, gain 1 memory.";
             }
 
             bool CanUseCondition(Hashtable hashtable)

+ 123 - 35
Assets/CardEffect/BT15/Blue/MegaSeadramon_BT15_029.cs

@@ -10,65 +10,155 @@ public class MegaSeadramon_BT15_029 : CEntity_Effect
     {
         List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-        #region On Play/When Digivolving
-        if (timing == EffectTiming.OnEnterFieldAnyone)
+        #region On Play/When Digivolving Shared
+        string EffectSharedDiscription()
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Place 1 Digimon card to digivolution cards to return 1 of your opponent's Digimon whose level is less than or equal to the placed card's level to the bottom of the deck.", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
-            cardEffects.Add(activateClass);
-
-            string EffectDiscription()
-            {
-                return "[On Play] [When Digivolving] By placing 1 of your other blue Digimon as this Digimon's bottom digivolution card, return 1 of your opponent's Digimon whose level is less than or equal to the placed card's level to the bottom of the deck.";
-            }
+            return "[On Play] [When Digivolving] By placing 1 of your other blue Digimon as this Digimon's bottom digivolution card, return 1 of your opponent's Digimon whose level is less than or equal to the placed card's level to the bottom of the deck.";
+        }
 
-            bool CanSelectOwnPermanentCondition(Permanent permanent)
+        bool CanSelectSharedOwnPermanentCondition(Permanent permanent)
+        {
+            if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
             {
-                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                if (permanent.TopCard.CardColors.Contains(CardColor.Blue))
                 {
-                    if (permanent.TopCard.CardColors.Contains(CardColor.Blue))
-                    {
-                        if (!permanent.TopCard.Equals(card))
-                            return true;
-                    }
+                    if (!permanent.TopCard.Equals(card))
+                        return true;
                 }
+            }
 
-                return false;
+            return false;
+        }
+
+        bool CanSelectPermanentCondition(Permanent permanent)
+        {
+            if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+            {
+                if (permanent.Level <= card.PermanentOfThisCard().cardSources.Last().Level)
+                    return true;
             }
 
-            bool CanSelectPermanentCondition(Permanent permanent)
+            return false;
+        }
+
+        bool CanActivateSharedCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
             {
-                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                if (card.Owner.GetBattleAreaDigimons().Count > 1)
                 {
-                    if (permanent.Level <= card.PermanentOfThisCard().cardSources.Last().Level)
-                        return true;
+                    return true;
                 }
-
-                return false;
             }
 
+            return false;
+        }
+        #endregion
+
+        #region On Play
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Place 1 Digimon card to digivolution cards to return 1 of your opponent's Digimon whose level is less than or equal to the placed card's level to the bottom of the deck.", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                if (CanActivateSharedCondition(_hashtable))
                 {
-                    if (card.Owner.GetBattleAreaDigimons().Count > 1)
+                    List<CardSource> selectedCards = new List<CardSource>();
+
+                    int maxCount = 1;
+
+                    SelectPermanentEffect selectPermanentSourcecEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentSourcecEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectSharedOwnPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: SelectPermanentSourceCoroutine,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Custom,
+                        cardEffect: activateClass);
+
+                    selectPermanentSourcecEffect.SetUpCustomMessage("Select 1 card to place on bottom of digivolution cards.", "The opponent is selecting 1 card to place on bottom of digivolution cards.");
+
+                    yield return StartCoroutine(selectPermanentSourcecEffect.Activate());
+
+                    IEnumerator SelectPermanentSourceCoroutine(Permanent permanent)
                     {
-                        return true;
+                        selectedCards.Add(permanent.TopCard);
+
+                        yield return null;
+                    }
+
+                    if (selectedCards.Count >= 1)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(
+                            selectedCards,
+                            activateClass));
+
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        {
+                            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 return to bottom of deck.",
+                                "The opponent is selecting 1 Digimon to return to bottom of deck.");
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                            IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new DeckBottomBounceClass(new List<Permanent> { permanent }, _hashtable).DeckBounce());
+                            }
+                        }
                     }
                 }
+            }
+        }
+        #endregion
 
-                return false;
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Place 1 Digimon card to digivolution cards to return 1 of your opponent's Digimon whose level is less than or equal to the placed card's level to the bottom of the deck.", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CanActivateCondition(_hashtable))
+                if (CanActivateSharedCondition(_hashtable))
                 {
                     List<CardSource> selectedCards = new List<CardSource>();
 
@@ -78,7 +168,7 @@ public class MegaSeadramon_BT15_029 : CEntity_Effect
 
                     selectPermanentSourcecEffect.SetUp(
                         selectPlayer: card.Owner,
-                        canTargetCondition: CanSelectOwnPermanentCondition,
+                        canTargetCondition: CanSelectSharedOwnPermanentCondition,
                         canTargetCondition_ByPreSelecetedList: null,
                         canEndSelectCondition: null,
                         maxCount: maxCount,
@@ -106,8 +196,6 @@ public class MegaSeadramon_BT15_029 : CEntity_Effect
                             selectedCards,
                             activateClass));
 
-                        //yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
-
                         if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                         {
                             maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));

+ 68 - 26
Assets/CardEffect/BT15/Blue/Metalseadramon_BT15_031.cs

@@ -43,50 +43,92 @@ public class MetalSeadramon_BT15_031 : CEntity_Effect
         }
         #endregion
 
-        #region On Play/When Attacking
-        if (timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnAllyAttack)
+        #region On Play/When Attacking Shared
+        string EffectSharedDiscription()
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Return 1 level 5 or lower Digimon to hand", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-            cardEffects.Add(activateClass);
+            return "[On Play] [When Attacking] Return 1 of your opponent's level 5 or lower Digimon to the bottom of their deck.";
+        }
 
-            string EffectDiscription()
+        bool CanSelectPermanentCondition(Permanent permanent)
+        {
+            if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
             {
-                return "[On Play] [When Attacking] Return 1 of your opponent's level 5 or lower Digimon to the bottom of their deck.";
+                if (permanent.TopCard.HasLevel)
+                {
+                    if (permanent.Level <= 5)
+                    {
+                        return true;
+                    }
+                }
             }
+            return false;
+        }
 
-            bool CanSelectPermanentCondition(Permanent permanent)
+        bool CanActivateSharedCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
             {
-                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
-                    if (permanent.TopCard.HasLevel)
-                    {
-                        if (permanent.Level <= 5)
-                        {
-                            return true;
-                        }
-                    }
+                    return true;
                 }
-                return false;
             }
 
+            return false;
+        }
+        #endregion
+
+        #region On Play
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Return 1 level 5 or lower Digimon to hand", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerOnAttack(hashtable,card);
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                    {
-                        return true;
-                    }
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Bounce,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                 }
+            }
+        }
+        #endregion
 
-                return false;
+        #region When Attacking
+        if (timing == EffectTiming.OnAllyAttack)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Return 1 level 5 or lower Digimon to hand", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)

+ 68 - 25
Assets/CardEffect/BT15/Blue/Plesiomon_X_Antibody_BT15_032.cs

@@ -28,49 +28,92 @@ public class Plesiomon_X_Antibody_BT15_032 : CEntity_Effect
                 condition: null));
         }
 
-        #region When Digivolving/On Attack
-        if (timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnAllyAttack)
+        #region When Attacking/When Digivolving Shared
+        string EffectSharedDescription()
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Return 1 Digimon to hand", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
-            activateClass.SetHashString("Bounce_BT15_032");
-            cardEffects.Add(activateClass);
-
-            string EffectDiscription()
-            {
-                return "[When Digivolving] [When Attacking] [Once per Turn] Return 1 of your opponent's Digimon with as many or fewer digivolution cards as this Digimon to the hand.";
-            }
+            return "[When Digivolving] [When Attacking] [Once per Turn] Return 1 of your opponent's Digimon with as many or fewer digivolution cards as this Digimon to the hand.";
+        }
 
-            bool CanSelectPermanentCondition(Permanent permanent)
+        bool CanSelectPermanentCondition(Permanent permanent)
+        {
+            if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
             {
-                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    if (permanent.DigivolutionCards.Count <= card.PermanentOfThisCard().DigivolutionCards.Count)
                     {
-                        if (permanent.DigivolutionCards.Count <= card.PermanentOfThisCard().DigivolutionCards.Count)
-                        {
-                            return true;
-                        }
+                        return true;
                     }
                 }
+            }
 
-                return false;
+            return false;
+        }
+
+        bool CanActivateSharedCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
+            {
+                return true;
             }
 
+            return false;
+        }
+        #endregion
+
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Return 1 Digimon to hand", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, 1, false, EffectSharedDescription());
+            activateClass.SetHashString("Bounce_BT15_032");
+            cardEffects.Add(activateClass);
+
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card) || CardEffectCommons.CanTriggerOnAttack(hashtable, card); 
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card); 
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
-                    return true;
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Bounce,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                 }
+            }
+        }
+        #endregion
 
-                return false;
+        #region When Attacking
+        if (timing == EffectTiming.OnAllyAttack)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Return 1 Digimon to hand", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, 1, false, EffectSharedDescription());
+            activateClass.SetHashString("Bounce_BT15_032");
+            cardEffects.Add(activateClass);
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)

+ 96 - 19
Assets/CardEffect/BT15/Blue/Pukumon_BT15_030.cs

@@ -17,19 +17,37 @@ public class Pukumon_BT15_030 : CEntity_Effect
             cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
         }
 
-        #region When Digivolving/On Deletion
-        if (timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnDestroyedAnyone)
+        #region On Deletion/On Play Shared
+        string EffectDiscription()
+        {
+            return "[On Play] [On Deletion] Trash the top 2 digivolution cards of all of your opponent's Digimon. Then, return 2 of your opponent's Digimon with no digivolution cards to the deck bottom";
+        }
+
+        
+
+        bool CanSelectPermanentCondition1(Permanent permanent)
+        {
+            if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+            {
+                if (permanent.HasNoDigivolutionCards)
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+
+        #endregion
+
+        #region On Play
+        if (timing == EffectTiming.OnEnterFieldAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Trash digivolution cards and return 1 Digimon without digivolution cards to the deck bottom", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
             cardEffects.Add(activateClass);
 
-            string EffectDiscription()
-            {
-                return "[When Digivolving] [On Deletion] Trash the top 2 digivolution cards of all of your opponent's Digimon. Then, return 2 of your opponent's Digimon with no digivolution cards to the deck bottom";
-            }
-
             bool CanSelectPermanentCondition(Permanent permanent)
             {
                 if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
@@ -46,47 +64,106 @@ public class Pukumon_BT15_030 : CEntity_Effect
                 return false;
             }
 
-            bool CanSelectPermanentCondition1(Permanent permanent)
+            bool CanUseCondition(Hashtable hashtable)
             {
-                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
-                    if (permanent.HasNoDigivolutionCards)
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        return true;
+                        if (CardEffectCommons.CanTriggerOnPlay(hashtable, card))
+                        {
+                            return true;
+                        }
                     }
                 }
 
+
                 return false;
             }
 
-            bool CanUseCondition(Hashtable hashtable)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerOnDeletion(hashtable, card); ;
+                foreach (Permanent selectedPermanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                {
+                    if (CanSelectPermanentCondition(selectedPermanent))
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.TrashDigivolutionCardsFromTopOrBottom(targetPermanent: selectedPermanent, trashCount: 2, isFromTop: true, activateClass: activateClass));
+                    }
+                }
+
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition1))
+                {
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition1));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition1,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                }
             }
+        }
+        #endregion
 
-            bool CanActivateCondition(Hashtable hashtable)
+        #region On Deletion
+        if (timing == EffectTiming.OnDestroyedAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Trash digivolution cards and return 1 Digimon without digivolution cards to the deck bottom", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            cardEffects.Add(activateClass);
+
+            bool CanSelectPermanentCondition(Permanent permanent)
             {
-                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    if (permanent.DigivolutionCards.Count((cardSource) => !cardSource.CanNotTrashFromDigivolutionCards(activateClass)) >= 1)
                     {
-                        if (CardEffectCommons.CanTriggerOnPlay(hashtable, card))
+                        if (!permanent.TopCard.CanNotBeAffected(activateClass))
                         {
                             return true;
                         }
                     }
+                }
 
+                return false;
+            }
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerOnDeletion(hashtable, card); ;
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                {
                     if (CardEffectCommons.CanActivateOnDeletion(card))
                     {
                         return true;
                     }
                 }
-                    
+
 
                 return false;
             }
 
-
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
                 foreach (Permanent selectedPermanent in card.Owner.Enemy.GetBattleAreaDigimons())

+ 64 - 19
Assets/CardEffect/BT15/Blue/WereGarurumon_ACE_BT15_026.cs

@@ -37,40 +37,85 @@ public class WereGarurumon_ACE_BT15_026 : CEntity_Effect
             cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
         }
 
-        #region On Play/When Digivolving
+        #region On Play/When Digivolving Shared
+        string EffectSharedDiscription()
+        {
+            return "[On Play] [When Digivolving] Trigger <Draw 1>. (Draw 1 card from your deck.)";
+        }
+
+        bool CanActivateSharedCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
+            {
+                if (card.Owner.LibraryCards.Count >= 1)
+                {
+                    return true;
+                }
+
+                if (card.Owner.HandCards.Count >= 5)
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+        #endregion
+
+        #region On Play
         if (timing == EffectTiming.OnEnterFieldAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Draw 1 and trash 1 card from hand", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
             cardEffects.Add(activateClass);
 
-            string EffectDiscription()
-            {
-                return "[On Play] [When Digivolving] Trigger <Draw 1>. (Draw 1 card from your deck.)";
-            }
-
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card); 
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card); 
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+
+                if (card.Owner.HandCards.Count >= 5)
                 {
-                    if (card.Owner.LibraryCards.Count >= 1)
-                    {
-                        return true;
-                    }
+                    int discardCount = 1;
 
-                    if (card.Owner.HandCards.Count >= 5)
-                    {
-                        return true;
-                    }
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: (cardSource) => true,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: discardCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        selectCardCoroutine: null,
+                        afterSelectCardCoroutine: null,
+                        mode: SelectHandEffect.Mode.Discard,
+                        cardEffect: activateClass);
+
+                    yield return StartCoroutine(selectHandEffect.Activate());
                 }
+            }
+        }
+        #endregion
 
-                return false;
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Draw 1 and trash 1 card from hand", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)

+ 100 - 21
Assets/CardEffect/BT15/Green/HerculesKabuterimon_BT15_053.cs

@@ -11,40 +11,124 @@ public class HerculesKabuterimon_BT15_053 : CEntity_Effect
   {
         List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-        #region Start of Your Main Phase/ When Digivolving
-        if (timing == EffectTiming.OnStartMainPhase || timing == EffectTiming.OnEnterFieldAnyone)
+        #region Start of Your Main Phase/ When Digivolving Shared
+        string EffectDiscription()
+        {
+            return "[Start of Your Main Phase] [When Digivolving] Suspend 1 of your opponent's Digimon. 1 of your Digimon gains <Piercing> for the turn.";
+        }
+
+        bool CanSelectPermanentCondition(Permanent permanent)
+        {
+            return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+        }
+
+        bool CanSelectOwnerPermanentCondition(Permanent permanent)
+        {
+            return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+        }
+
+        bool CanActivateCondition(Hashtable hashtable)
+        {
+            return CardEffectCommons.IsExistOnBattleArea(card);
+        }
+        #endregion
+
+        #region Start of Your Main Phase
+        if (timing == EffectTiming.OnStartMainPhase)
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Suspend 1 Digimon and your 1 Digimon gains Pierce", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
             cardEffects.Add(activateClass);
 
-            string EffectDiscription()
+            bool CanUseCondition(Hashtable hashtable)
             {
-                return "[Start of Your Main Phase] [When Digivolving] Suspend 1 of your opponent's Digimon. 1 of your Digimon gains <Piercing> for the turn.";
-            }
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    if (CardEffectCommons.IsOwnerTurn(card))
+                    {
+                        return true;
+                    }
+                }
 
-            bool CanSelectPermanentCondition(Permanent permanent)
-            {
-                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                return false;
             }
 
-            bool CanSelectOwnerPermanentCondition(Permanent permanent)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                {
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Tap,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                }
+
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectOwnerPermanentCondition))
+                {
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectOwnerPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectOwnerPermanentCondition,
+                        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 that will gain Pierce.",
+                        "The opponent is selecting 1 Digimon that will gain Pierce.");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainPierce(
+                            targetPermanent: permanent,
+                            effectDuration: EffectDuration.UntilEachTurnEnd,
+                            activateClass: activateClass));
+                    }
+                }
             }
+        }
+        #endregion
+
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Suspend 1 Digimon and your 1 Digimon gains Pierce", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            cardEffects.Add(activateClass);
 
             bool CanUseCondition(Hashtable hashtable)
             {
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (CardEffectCommons.IsOwnerTurn(card))
+                    if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
                     {
-                        if (timing == EffectTiming.OnEnterFieldAnyone)
-                        {
-                            return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
-                        }
-
                         return true;
                     }
                 }
@@ -52,11 +136,6 @@ public class HerculesKabuterimon_BT15_053 : CEntity_Effect
                 return false;
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                return CardEffectCommons.IsExistOnBattleArea(card);
-            }
-
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
                 if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))

+ 4 - 1
Assets/CardEffect/BT15/Green/Izzy_Izumi_BT15_085.cs

@@ -37,7 +37,10 @@ public class Izzy_Izumi_BT15_085 : CEntity_Effect
                 {
                     if (permanent.TopCard.CardTraits.Contains("Insectoid"))
                     {
-                        return true;
+                        if (permanent.IsSuspended)
+                        {
+                            return true;
+                        }
                     }
                 }
 

+ 108 - 18
Assets/CardEffect/BT15/Green/MegaKabuterimon_ACE_BT15_049.cs

@@ -17,7 +17,43 @@ public class MegaKabuterimon_ACE_BT15_049 : CEntity_Effect
             cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
         }
 
-        #region On Play/When Digivolving
+        #region On Play/When Digivolving Shared
+        string EffectDiscription()
+        {
+            return "[On Play] [When Digivolving] 1 of your Digimon gets +3000 DP until the end of your opponent's turn. Then, if one of their Digimon is attacking, you may switch the target of attack to this Digimon.";
+        }
+
+        bool CanSelectPermanentCondition(Permanent permanent)
+        {
+            return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+        }
+
+        bool CanActivateCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
+            {
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                {
+                    return true;
+                }
+
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(GManager.instance.attackProcess.AttackingPermanent, card))
+                {
+                    if (GManager.instance.attackProcess.IsAttacking)
+                    {
+                        if (GManager.instance.attackProcess.AttackingPermanent.CanSwitchAttackTarget)
+                        {
+                            return true;
+                        }
+                    }
+                }
+            }
+
+            return false;
+        }
+        #endregion
+
+        #region On Play
         if (timing == EffectTiming.OnEnterFieldAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
@@ -25,43 +61,97 @@ public class MegaKabuterimon_ACE_BT15_049 : CEntity_Effect
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
             cardEffects.Add(activateClass);
 
-            string EffectDiscription()
-            {
-                return "[On Play] [When Digivolving] 1 of your Digimon gets +3000 DP until the end of your opponent's turn. Then, if one of their Digimon is attacking, you may switch the target of attack to this Digimon.";
-            }
-
-            bool CanSelectPermanentCondition(Permanent permanent)
-            {
-                return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
-            }
-
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Custom,
+                        cardEffect: activateClass);
+
+                    selectPermanentEffect.SetUpCustomMessage(
+                        "Select 1 Digimon that will get DP +3000.",
+                        "The opponent is selecting 1 Digimon that will get DP +3000.");
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
                     {
-                        return true;
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                            targetPermanent: permanent,
+                            changeValue: 3000,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass));
                     }
+                }
 
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
                     if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(GManager.instance.attackProcess.AttackingPermanent, card))
                     {
                         if (GManager.instance.attackProcess.IsAttacking)
                         {
                             if (GManager.instance.attackProcess.AttackingPermanent.CanSwitchAttackTarget)
                             {
-                                return true;
+                                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),
+                        };
+
+                                string selectPlayerMessage = "Will you switch the attack target?";
+                                string notSelectPlayerMessage = "The opponent is selecting whether to switch the attack target.";
+
+                                GManager.instance.userSelectionManager.SetBoolSelection(selectionElements: selectionElements, selectPlayer: card.Owner, selectPlayerMessage: selectPlayerMessage, notSelectPlayerMessage: notSelectPlayerMessage);
+
+                                yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+
+                                bool doSwitch = GManager.instance.userSelectionManager.SelectedBoolValue;
+
+                                if (doSwitch)
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.attackProcess.SwitchDefender(
+                                        activateClass,
+                                        false,
+                                        card.PermanentOfThisCard()));
+                                }
                             }
                         }
                     }
                 }
+            }
+        }
+        #endregion
 
-                return false;
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Your 1 Digimon gains DP +3000 and switch attack target", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            cardEffects.Add(activateClass);
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)

+ 62 - 20
Assets/CardEffect/BT15/Green/Palmon_X_Antibody_BT15_045.cs

@@ -28,40 +28,82 @@ public class Palmon_X_Antibody_BT15_045 : CEntity_Effect
                 condition: null));
         }
 
-        #region On Play/When Digivolving
-        if (timing == EffectTiming.OnEnterFieldAnyone)
+        #region On Play/When Digivolving Shared
+        string EffectSharedDiscription()
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Suspend 1 Digimon", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-            cardEffects.Add(activateClass);
+            return "[On Play] [When Digivolving] Suspend 1 of your opponent's Digimon.";
+        }
 
-            string EffectDiscription()
-            {
-                return "[On Play] [When Digivolving] Suspend 1 of your opponent's Digimon.";
-            }
+        bool CanSelectPermanentCondition(Permanent permanent)
+        {
+            return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+        }
 
-            bool CanSelectPermanentCondition(Permanent permanent)
+        bool CanActivateSharedCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
             {
-                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                {
+                    return true;
+                }
             }
 
+            return false;
+        }
+        #endregion
+
+        #region On Play
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Suspend 1 Digimon", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                    {
-                        return true;
-                    }
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Tap,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                 }
+            }
+        }
+        #endregion
 
-                return false;
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Suspend 1 Digimon", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)

+ 65 - 23
Assets/CardEffect/BT15/Green/Puppetmon_BT15_052.cs

@@ -42,45 +42,87 @@ public class Puppetmon_BT15_052 : CEntity_Effect
             );
         }
 
-        #region On Play/When Attacking
-        if (timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnAllyAttack)
+        #region On Play/When Attacking Shared
+        string EffectSharedDescription()
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Return 1 suspended Digimon to the bottom of deck", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-            cardEffects.Add(activateClass);
+            return "[On Play] [When Attacking] Return 1 of your opponent's suspended Digimon to the bottom of the deck.";
+        }
 
-            string EffectDiscription()
+        bool CanSelectPermanentCondition(Permanent permanent)
+        {
+            if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
             {
-                return "[On Play] [When Attacking] Return 1 of your opponent's suspended Digimon to the bottom of the deck.";
+                if (permanent.IsSuspended)
+                {
+                    return true;
+                }
             }
+            return false;
+        }
 
-            bool CanSelectPermanentCondition(Permanent permanent)
+        bool CanActivateSharedCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
             {
-                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
-                {
-                    if (permanent.IsSuspended)
-                    {
-                        return true;
-                    }
-                }
-                return false;
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    return true;
             }
 
+            return false;
+        }
+        #endregion
+
+        #region On Play
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Return 1 suspended Digimon to the bottom of deck", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDescription());
+            cardEffects.Add(activateClass);          
+
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        return true;
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.PutLibraryBottom,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                 }
+            }
+        }
+        #endregion
 
-                return false;
+        #region When Attacking
+        if (timing == EffectTiming.OnAllyAttack)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Return 1 suspended Digimon to the bottom of deck", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDescription());
+            cardEffects.Add(activateClass);
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)

+ 64 - 15
Assets/CardEffect/BT15/Purple/Bakemon_BT15_073.cs

@@ -12,37 +12,85 @@ public class Bakemon_BT15_073 : CEntity_Effect
     {
         List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-        if (timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnDestroyedAnyone)
+        #region When Digivolving/On Deletion Shared
+        string EffectDiscription()
+        {
+            return "[When Digivolving] [On Deletion] <Draw 1>. Then, trash 1 card in your hand.";
+        }
+        #endregion
+
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Draw 1 and trash 1 card from hand", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
             cardEffects.Add(activateClass);
 
-            string EffectDiscription()
+            bool CanUseCondition(Hashtable hashtable)
             {
-                return "[When Digivolving] [On Deletion] <Draw 1>. Then, trash 1 card in your hand.";
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    if (CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
+                        return true;
+                }
+
+                return false;
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+
+                if (card.Owner.HandCards.Count >= 1)
+                {
+                    int discardCount = 1;
+
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: (cardSource) => true,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: discardCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        selectCardCoroutine: null,
+                        afterSelectCardCoroutine: null,
+                        mode: SelectHandEffect.Mode.Discard,
+                        cardEffect: activateClass);
+
+                    yield return StartCoroutine(selectHandEffect.Activate());
+                }
             }
+        }
+        #endregion
+
+        #region On Deletion
+        if (timing == EffectTiming.OnDestroyedAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Draw 1 and trash 1 card from hand", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            cardEffects.Add(activateClass);
 
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card) || CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
+                return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
             }
 
             bool CanActivateCondition(Hashtable hashtable)
             {
-                if (card.Owner.LibraryCards.Count >= 1 || card.Owner.HandCards.Count >= 1)
+                if (CardEffectCommons.CanActivateOnDeletion(card))
                 {
-                    if(CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if(CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card))
-                            return true;
-                    }
-
-                    if (CardEffectCommons.CanActivateOnDeletion(card))
-                    {
-                        return true;
-                    }
+                    return true;
                 }
 
                 return false;
@@ -76,6 +124,7 @@ public class Bakemon_BT15_073 : CEntity_Effect
                 }
             }
         }
+        #endregion
 
         if (timing == EffectTiming.OnDestroyedAnyone)
         {

+ 86 - 8
Assets/CardEffect/BT15/Purple/Gesomon_BT15_074.cs

@@ -17,24 +17,49 @@ public class Gesomon_BT15_074 : CEntity_Effect
             cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
         }
 
-        #region On Play/When Digivolving
+        #region On Play/When Digivolving Shared
+        string EffectSharedDiscription()
+        {
+            return "[On Play] [When Digivolving] Your opponent may trash 1 Digimon card in their hand. If they don't, gain 1 memory.";
+        }
+
+        bool CanSelectCardCondition(CardSource cardSource)
+        {
+            if (cardSource.Owner == card.Owner.Enemy)
+            {
+                if (cardSource.IsDigimon)
+                {
+                    return true;
+                }
+            }
+
+            return false;
+        }
+        #endregion
+
+        #region On Play
         if (timing == EffectTiming.OnEnterFieldAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Opponent trashes 1 Digimon card, or you gain Memory +1", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
             cardEffects.Add(activateClass);
 
-            string EffectDiscription()
+            bool CanUseCondition(Hashtable hashtable)
             {
-                return "[On Play] [When Digivolving] Your opponent may trash 1 Digimon card in their hand. If they don't, gain 1 memory.";
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
             }
 
-            bool CanSelectCardCondition(CardSource cardSource)
+            bool CanActivateCondition(Hashtable hashtable)
             {
-                if (cardSource.Owner == card.Owner.Enemy)
+                if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (cardSource.IsDigimon)
+                    if (card.Owner.Enemy.HandCards.Count >= 1)
+                    {
+                        return true;
+                    }
+
+                    if (card.Owner.CanAddMemory(activateClass))
                     {
                         return true;
                     }
@@ -43,9 +68,62 @@ public class Gesomon_BT15_074 : CEntity_Effect
                 return false;
             }
 
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                bool discarded = false;
+
+                if (card.Owner.Enemy.HandCards.Count >= 1)
+                {
+                    int discardCount = 1;
+
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner.Enemy,
+                        canTargetCondition: CanSelectCardCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: discardCount,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        selectCardCoroutine: null,
+                        afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                        mode: SelectHandEffect.Mode.Discard,
+                        cardEffect: activateClass);
+
+                    yield return StartCoroutine(selectHandEffect.Activate());
+
+                    IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
+                    {
+                        if (cardSources.Count >= 1)
+                        {
+                            discarded = true;
+
+                            yield return null;
+                        }
+                    }
+                }
+
+                if (!discarded)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1, activateClass));
+                }
+            }
+        }
+        #endregion
+
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Opponent trashes 1 Digimon card, or you gain Memory +1", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
             }
 
             bool CanActivateCondition(Hashtable hashtable)

+ 26 - 32
Assets/CardEffect/BT15/Purple/Leviamon_X_Antibody_BT15_081.cs

@@ -197,7 +197,7 @@ public class Leviamon_X_Antibody_BT15_081 : CEntity_Effect
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Delete 1 Tamer and 1 level 3, 5, and 7  Digimon", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
             cardEffects.Add(activateClass);
 
             string EffectDiscription()
@@ -271,16 +271,7 @@ public class Leviamon_X_Antibody_BT15_081 : CEntity_Effect
 
             bool CanUseCondition(Hashtable hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
-                {
-
-                    if(card.Owner.GetBattleAreaPermanents().Count(PermanentCondition) <= card.Owner.Enemy.GetBattleAreaPermanents().Count(PermanentCondition))
-                    {
-                        return true;
-                    }
-                }
-
-                return false;
+                return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
             }
 
             bool CanActivateCondition(Hashtable hashtable)
@@ -294,28 +285,31 @@ public class Leviamon_X_Antibody_BT15_081 : CEntity_Effect
                 {
                     List<Permanent> selectedPermanents = new List<Permanent>();
 
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectTamerCondition))
+                    if (card.Owner.GetBattleAreaPermanents().Count(PermanentCondition) <= card.Owner.Enemy.GetBattleAreaPermanents().Count(PermanentCondition))
                     {
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectTamerCondition));
-
-                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                        selectPermanentEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectTamerCondition,
-                            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 Tamer to delete.", "The opponent is selecting 1 Tamer to delete.");
-
-                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectTamerCondition))
+                        {
+                            int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectTamerCondition));
+
+                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                            selectPermanentEffect.SetUp(
+                                selectPlayer: card.Owner,
+                                canTargetCondition: CanSelectTamerCondition,
+                                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 Tamer to delete.", "The opponent is selecting 1 Tamer to delete.");
+
+                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                        }
                     }
 
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectLevel3Condition))

+ 86 - 14
Assets/CardEffect/BT15/Purple/Loogarmon_BT15_075.cs

@@ -40,35 +40,107 @@ public class Loogarmon_BT15_075 : CEntity_Effect
         }
         #endregion
 
-        #region When Digivolving/On Attack
-        if (timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnAllyAttack)
+        #region When Digivolving/When Attacking Shared
+        string EffectSharedDiscription()
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("DP +2000 and Draw 1", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
-            cardEffects.Add(activateClass);
+            return "[When Digivolving][When Attacking] By trashing 1 card in your hand, this Digimon gets +2000 DP for the turn. If a Tamer card with the [SoC] trait is in this Digimon's digivolution cards, <Draw 1>.";
+        }
 
-            string EffectDiscription()
+        bool CanActivateSharedCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
             {
-                return "[When Digivolving] Delete 1 of your opponent's Digimon with 4000 DP or less. If an opponent's Digimon isn't deleted by this effect, you may digivolve this Digimon into a level 6 Digimon card with [Gallantmon] in its name in your hand for its digivolution cost. When this Digimon would digivolve with this effect, reduce the digivolution cost by 1.";
+                if (card.Owner.HandCards.Count >= 1)
+                {
+                    return true;
+                }
             }
 
+            return false;
+        }
+        #endregion
+
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("DP +2000 and Draw 1", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card) || CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                if (card.Owner.HandCards.Count >= 1)
                 {
-                    if (card.Owner.HandCards.Count >= 1)
+                    bool discarded = false;
+
+                    int discardCount = 1;
+
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: cardSource => true,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: discardCount,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        selectCardCoroutine: null,
+                        afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                        mode: SelectHandEffect.Mode.Discard,
+                        cardEffect: activateClass);
+
+                    yield return StartCoroutine(selectHandEffect.Activate());
+
+                    IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                     {
-                        return true;
+                        if (cardSources.Count >= 1)
+                        {
+                            discarded = true;
+
+                            yield return null;
+                        }
+                    }
+
+                    if (discarded)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(
+                                targetPermanent: card.PermanentOfThisCard(),
+                                changeValue: 2000,
+                                effectDuration: EffectDuration.UntilEachTurnEnd,
+                                activateClass: activateClass));
+
+                        if (CardEffectCommons.IsExistOnBattleArea(card))
+                        {
+                            if (card.PermanentOfThisCard().DigivolutionCards.Some(cardSource => cardSource.IsTamer && cardSource.CardTraits.Contains("SoC")))
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+                            }
+                        }
                     }
                 }
+            }
+        }
+        #endregion
 
-                return false;
+        #region When Attack
+        if (timing == EffectTiming.OnAllyAttack)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("DP +2000 and Draw 1", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)

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

@@ -138,7 +138,7 @@ public class Mist_Barrier_BT15_098 : CEntity_Effect
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Play 1 Digimon", CanUseCondition, card);
-            activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
             cardEffects.Add(activateClass);
 
             #region Delay Effect - When deleted

+ 111 - 4
Assets/CardEffect/BT15/Purple/Myotismon_ACE_BT15_076.cs

@@ -21,7 +21,14 @@ public class Myotismon_ACE_BT15_076 : CEntity_Effect
             cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
         }
 
-        #region OnPlay/When Digivolving
+        #region On Play/When Digivolving Shared
+        string EffectDiscription()
+        {
+            return "[On Play] [When Digivolving] You may play 1 purple level 3 Digimon card or 1 purple Tamer card from your trash without paying the cost.";
+        }
+        #endregion
+
+        #region On Play
         if (timing == EffectTiming.OnEnterFieldAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
@@ -29,10 +36,110 @@ public class Myotismon_ACE_BT15_076 : CEntity_Effect
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
             cardEffects.Add(activateClass);
 
-            string EffectDiscription()
+            bool CanSelectCardCondition(CardSource cardSource)
+            {
+                if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: false, cardEffect: activateClass))
+                {
+                    if (cardSource.CardColors.Contains(CardColor.Purple))
+                    {
+                        if (cardSource.IsDigimon)
+                        {
+                            if (cardSource.Level == 3)
+                            {
+                                if (cardSource.HasLevel)
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+
+                        if (cardSource.IsTamer)
+                        {
+                            return true;
+                        }
+                    }
+                }
+
+                return false;
+            }
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                    {
+                        return true;
+                    }
+                }
+
+                return false;
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                return "[On Play] [When Digivolving] You may play 1 purple level 3 Digimon card or 1 purple Tamer card from your trash without paying the cost.";
+                if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition))
+                {
+                    int maxCount = Math.Min(1, card.Owner.TrashCards.Count(CanSelectCardCondition));
+
+                    List<CardSource> selectedCards = new List<CardSource>();
+
+                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                    selectCardEffect.SetUp(
+                                canTargetCondition: CanSelectCardCondition,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: SelectCardCoroutine,
+                                afterSelectCardCoroutine: null,
+                                message: "Select 1 card 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 card 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 ContinuousController.instance.StartCoroutine(CardEffectCommons.PlayPermanentCards(
+                        cardSources: selectedCards,
+                        activateClass: activateClass,
+                        payCost: false,
+                        isTapped: false,
+                        root: SelectCardEffect.Root.Trash,
+                        activateETB: true));
+                }
             }
+        }
+        #endregion
+
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Play 1 Digimon or Tamer from trash", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+            cardEffects.Add(activateClass);
 
             bool CanSelectCardCondition(CardSource cardSource)
             {
@@ -63,7 +170,7 @@ public class Myotismon_ACE_BT15_076 : CEntity_Effect
 
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
             }
 
             bool CanActivateCondition(Hashtable hashtable)

+ 65 - 23
Assets/CardEffect/BT15/Purple/Piedmon_BT15_079.cs

@@ -12,47 +12,89 @@ public class Piedmon_BT15_079 : CEntity_Effect
     {
         List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-        #region On Play/When Attacking
-        if (timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnAllyAttack)
+        #region On Play/When Attacking Shared
+        string EffectSharedDiscription()
         {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Delete 1 unsuspened Digimon", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-            cardEffects.Add(activateClass);
+            return "[On Play] [When Attacking] Delete 1 of your opponent's unsuspended Digimon.";
+        }
 
-            string EffectDiscription()
+        bool CanSelectPermanentCondition(Permanent permanent)
+        {
+            if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
             {
-                return "[On Play] [When Attacking] Delete 1 of your opponent's unsuspended Digimon.";
+                if (!permanent.IsSuspended)
+                {
+                    return true;
+                }
             }
+            return false;
+        }
 
-            bool CanSelectPermanentCondition(Permanent permanent)
+        bool CanActivateSharedCondition(Hashtable hashtable)
+        {
+            if (CardEffectCommons.IsExistOnBattleArea(card))
             {
-                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
-                    if (!permanent.IsSuspended)
-                    {
-                        return true;
-                    }
+                    return true;
                 }
-                return false;
             }
 
+            return false;
+        }
+        #endregion
+
+        #region On Play
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Delete 1 unsuspened Digimon", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                 {
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                    {
-                        return true;
-                    }
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Destroy,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                 }
+            }
+        }
+        #endregion
 
-                return false;
+        #region When Attacking
+        if (timing == EffectTiming.OnAllyAttack)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Delete 1 unsuspened Digimon", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateSharedCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+            cardEffects.Add(activateClass);
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return  CardEffectCommons.CanTriggerOnAttack(hashtable, card);
             }
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)

+ 2 - 6
Assets/CardEffect/BT15/Purple/Seventh_Lightning_BT15_100.cs

@@ -76,13 +76,9 @@ public class Seventh_Lightning_BT15_100 : CEntity_Effect
             {
                 if (CardEffectCommons.IsExistOnTrash(card))
                 {
-                    if (CardEffectCommons.IsOwnerTurn(card))
+                    if (CardEffectCommons.CanTriggerWhenPermanentDigivolving(hashtable, PermanentCondition))
                     {
-                        if (CardEffectCommons.CanTriggerWhenPermanentDigivolving(hashtable, PermanentCondition))
-                        {
-                            return true;
-
-                        }
+                        return true;
                     }
                 }
 

+ 113 - 11
Assets/CardEffect/BT15/Purple/VenomMyotismon_BT15_080.cs

@@ -17,36 +17,92 @@ public class VenomMyotismon_BT15_080 : CEntity_Effect
             cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
         }
 
-        if (timing == EffectTiming.OnEnterFieldAnyone || timing == EffectTiming.OnDestroyedAnyone)
+        #region On Play/When Digivolving/On Deletion Shared
+        string EffectDiscription()
+        {
+            return "[On Play] [When Digivolving] [On Deletion] Delete 1 of your opponent's level 5 or lower Digimon.";
+        }
+
+        bool CanSelectPermanentCondition(Permanent permanent)
+        {
+            if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+            {
+                if (permanent.Level <= 5)
+                {
+                    if (permanent.TopCard.HasLevel)
+                    {
+                        return true;
+                    }
+                }
+            }
+            return false;
+        }
+        #endregion
+
+        #region On Play
+        if (timing == EffectTiming.OnEnterFieldAnyone)
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Delete 1 level 5 or lower Digimon", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
             cardEffects.Add(activateClass);
 
-            string EffectDiscription()
+            bool CanUseCondition(Hashtable hashtable)
             {
-                return "[On Play] [When Digivolving] [On Deletion] Delete 1 of your opponent's level 5 or lower Digimon.";
+                return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
             }
 
-            bool CanSelectPermanentCondition(Permanent permanent)
+            bool CanActivateCondition(Hashtable hashtable)
             {
-                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (permanent.Level <= 5)
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     {
-                        if (permanent.TopCard.HasLevel)
-                        {
-                            return true;
-                        }
+                        return true;
                     }
                 }
+
                 return false;
             }
 
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                {
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Destroy,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                }
+            }
+        }
+        #endregion
+
+        #region When Digivolving
+        if (timing == EffectTiming.OnEnterFieldAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Delete 1 level 5 or lower Digimon", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            cardEffects.Add(activateClass);
+
             bool CanUseCondition(Hashtable hashtable)
             {
-                return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card) || CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
+                return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
             }
 
             bool CanActivateCondition(Hashtable hashtable)
@@ -59,6 +115,51 @@ public class VenomMyotismon_BT15_080 : CEntity_Effect
                     }
                 }
 
+                return false;
+            }
+
+            IEnumerator ActivateCoroutine(Hashtable _hashtable)
+            {
+                if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                {
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: null,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Destroy,
+                        cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                }
+            }
+        }
+        #endregion
+
+        #region On Deletion
+        if (timing == EffectTiming.OnDestroyedAnyone)
+        {
+            ActivateClass activateClass = new ActivateClass();
+            activateClass.SetUpICardEffect("Delete 1 level 5 or lower Digimon", CanUseCondition, card);
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            cardEffects.Add(activateClass);
+
+            bool CanUseCondition(Hashtable hashtable)
+            {
+                return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
+            }
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
                 if (CardEffectCommons.CanActivateOnDeletion(card))
                 {
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
@@ -95,6 +196,7 @@ public class VenomMyotismon_BT15_080 : CEntity_Effect
                 }
             }
         }
+        #endregion
 
         return cardEffects;
     }

+ 2 - 1
Assets/CardEffect/BT15/Purple/WaruSeadramon_BT15_078.cs

@@ -14,7 +14,8 @@ public class WaruSeadramon_BT15_078 : CEntity_Effect
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("All Opponents digimon, gain Memory -1", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+            activateClass.SetHashString("LoseMemory_BT15_078");
             cardEffects.Add(activateClass);
 
             string EffectDiscription()

+ 1 - 1
Assets/CardEffect/BT15/White/Apocalymon_BT15_102.cs

@@ -388,7 +388,7 @@ public class Apocalymon_BT15_102 : CEntity_Effect
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Place 1 digimon from trash under this Digimon's digivolution cards", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
             cardEffects.Add(activateClass);
 
             string EffectDiscription()

+ 3 - 7
Assets/CardEffect/BT15/Yellow/Kari_Kamiya_BT15_084.cs

@@ -111,11 +111,6 @@ public class Kari_Kamiya_BT15_084 : CEntity_Effect
                 return "[All Turns] When an effect removes a card from your security stack, by suspending this Tamer, 1 of your opponent's Digimon gains [Security A-1] until the end of your opponent's turn.";
             }
 
-            bool CardCondition(CardSource cardSource)
-            {
-                return true;
-            }
-
             bool CanSelectPermanentCondition(Permanent permanent)
             {
                 return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
@@ -125,8 +120,9 @@ public class Kari_Kamiya_BT15_084 : CEntity_Effect
             {
                 if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, player => player == card.Owner)){
-                        if (CardEffectCommons.IsByEffect(hashtable, null))
+                    if (CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, player => player == card.Owner))
+                    {
+                        if (!GManager.instance.attackProcess.DoSecurityCheck)
                         {
                             return true;
                         }

+ 5 - 7
Assets/CardEffect/BT15/Yellow/Magnadramon_BT15_042.cs

@@ -42,6 +42,8 @@ public class Magnadramon_BT15_042 : CEntity_Effect
                 {
                     if (CardEffectCommons.CanTriggerWhenLoseSecurity(hashtable, player => player == card.Owner))
                     {
+                        return true;
+
                         if (card.Owner.SecurityCards.Count() <= 3)
                         {
                             return true;
@@ -63,9 +65,9 @@ public class Magnadramon_BT15_042 : CEntity_Effect
 
             IEnumerator ActivateCoroutine(Hashtable _hashtable)
             {
-                if (card.Owner.CanAddSecurity(activateClass))
-                {
-                    if (card.Owner.SecurityCards.Count <= 3)
+                 if (card.Owner.SecurityCards.Count <= 3)
+                 {
+                    if (card.Owner.CanAddSecurity(activateClass))
                     {
                         if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
                         {
@@ -154,15 +156,11 @@ public class Magnadramon_BT15_042 : CEntity_Effect
                                         yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(card.Owner).AddSecurity());
                                     }
                                 }
-
                             }
-
                         }
-
                     }
                 }
             }
-
         }
         #endregion
 

+ 1 - 12
Assets/CardEffect/BT15/Yellow/Revelation_of_Light_BT15_092.cs

@@ -55,7 +55,7 @@ public class Revelation_of_Light_BT15_092 : CEntity_Effect
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Play 1 Digimon from security", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
             cardEffects.Add(activateClass);
 
             string EffectDiscription()
@@ -84,16 +84,6 @@ public class Revelation_of_Light_BT15_092 : CEntity_Effect
                 return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
             }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (card.Owner.SecurityCards.Count >= 1)
-                {
-                    return true;
-                }
-
-                return false;
-            }
-
             bool PermanentCondition(Permanent permanent)
             {
                 if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
@@ -174,7 +164,6 @@ public class Revelation_of_Light_BT15_092 : CEntity_Effect
                     yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(card.Owner));
 
                     yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(card.Owner).AddSecurity());
-
                 }
             }
         }

+ 1 - 1
Assets/CardEffect/BT8/White/Kimeramon_BT8_084.cs

@@ -248,7 +248,7 @@ public class Kimeramon_BT8_084 : CEntity_Effect
                                 mode: SelectPermanentEffect.Mode.Custom,
                                 cardEffect: activateClass);
 
-                            selectPermanentEffect.SetUpCustomMessage($"Select 1 Digimon to DP -{minusDP}.", $"The opponent is selecting 1 Digimon to DP -{minusDP}.");
+                            selectPermanentEffect.SetUpCustomMessage($"Select up to 4 Digimon to DP -{minusDP}.", $"The opponent is selecting up to 4 Digimon to DP -{minusDP}.");
 
                             yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 

+ 1 - 1
Assets/CardEffect/BT9/Green/GrandisScissor_BT9_100.cs

@@ -83,7 +83,7 @@ public class GrandisScissor_BT9_100 : CEntity_Effect
                         canTargetCondition_ByPreSelecetedList: null,
                         canEndSelectCondition: null,
                         maxCount: maxCount,
-                        canNoSelect: false,
+                        canNoSelect: true,
                         canEndNotMax: false,
                         selectPermanentCoroutine: null,
                         afterSelectPermanentCoroutine: AfterSelectPermanentCoroutine,

+ 1 - 4
Assets/CardEffect/EX2/Yellow/RiCiuChon_EX2_059.cs

@@ -150,10 +150,7 @@ public class RiCiuChon_EX2_059 : CEntity_Effect
             {
                 if (isExistOnField(card))
                 {
-                    if (card.Owner.CanAddMemory(activateClass))
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
-                    }
+                    yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
                 }
             }
         }

+ 21 - 18
Assets/CardEffect/EX4/Black/OmegamonAlterB_EX4_073.cs

@@ -312,24 +312,27 @@ public class OmegamonAlterB_EX4_073 : CEntity_Effect
                     {
                         if (card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition) >= 1)
                         {
-                            int maxCount = Math.Min(trashCount, card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition));
-
-                            SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                            selectPermanentEffect.SetUp(
-                                selectPlayer: card.Owner,
-                                canTargetCondition: CanSelectPermanentCondition,
-                                canTargetCondition_ByPreSelecetedList: null,
-                                canEndSelectCondition: null,
-                                maxCount: maxCount,
-                                canNoSelect: false,
-                                canEndNotMax: false,
-                                selectPermanentCoroutine: null,
-                                afterSelectPermanentCoroutine: null,
-                                mode: SelectPermanentEffect.Mode.Destroy,
-                                cardEffect: activateClass);
-
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            for(int i = 0; i < trashCount; i++)
+                            {
+                                int maxCount = Math.Min(trashCount-i, card.Owner.Enemy.GetBattleAreaPermanents().Count(CanSelectPermanentCondition));
+
+                                SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                                selectPermanentEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectPermanentCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount,
+                                    canNoSelect: false,
+                                    canEndNotMax: false,
+                                    selectPermanentCoroutine: null,
+                                    afterSelectPermanentCoroutine: null,
+                                    mode: SelectPermanentEffect.Mode.Destroy,
+                                    cardEffect: activateClass);
+
+                                yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            }
                         }
 
                         if (trashCount == 3)

+ 1 - 1
Assets/CardEffect/EX5/Red/Glacenovamon_EX5_073.cs

@@ -281,7 +281,7 @@ public class Glacenovamon_EX5_073 : CEntity_Effect
         if (timing == EffectTiming.WhenRemoveField)
         {
             ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Prevent this Digimon from being deleted or returned to hand or deck", CanUseCondition, card);
+            activateClass.SetUpICardEffect("Prevent this Digimon from being leaving the battle area by opponent's effect", CanUseCondition, card);
             activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
             activateClass.SetHashString("Substitute_EX5_073");
             cardEffects.Add(activateClass);

+ 9 - 14
Assets/CardEffect/LM/Black/Espimon_LM_014.cs

@@ -22,14 +22,15 @@ namespace DCGO.CardEffects.LM
                     return "[On Play] Reveal the top 3 cards of your deck. Add 1 card with <Blocker> or 1 Tamer card among them to the hand. Return the rest to the bottom of the deck.";
                 }
 
-                bool CanSelectBlockerCondition(CardSource cardSource)
+                bool CanSelectCondition(CardSource cardSource)
                 {
-                    return cardSource.HasBlocker;
-                }
 
-                bool CanSelectTamerCondition(CardSource cardSource)
-                {
-                    return cardSource.IsTamer;
+                    if(cardSource.HasBlocker || cardSource.IsTamer)
+                    {
+                        return true;
+                    }
+
+                    return false;
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -58,14 +59,8 @@ namespace DCGO.CardEffects.LM
                         new SimplifiedSelectCardConditionClass[]
                         {
                         new SimplifiedSelectCardConditionClass(
-                            canTargetCondition:CanSelectBlockerCondition,
-                            message: "Select 1 card with [Blocker].",
-                            mode: SelectCardEffect.Mode.AddHand,
-                            maxCount: 1,
-                            selectCardCoroutine: null),
-                        new SimplifiedSelectCardConditionClass(
-                            canTargetCondition:CanSelectTamerCondition,
-                            message:  "Select 1 Tamer card.",
+                            canTargetCondition:CanSelectCondition,
+                            message: "Select 1 card with <Blocker> or 1 Tamer.",
                             mode: SelectCardEffect.Mode.AddHand,
                             maxCount: 1,
                             selectCardCoroutine: null),

+ 139 - 32
Assets/CardEffect/LM/Blue/Amphimon_LM_005.cs

@@ -17,29 +17,58 @@ namespace DCGO.CardEffects.LM
                 cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
             }
 
-            #region OnPlay/When Digivolving
-            if (timing == EffectTiming.OnEnterFieldAnyone)
+            #region On Play/When Digivolving Shared
+            string EffectDiscription()
             {
-                ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Trash sources, return 1 Digimon/Tamer to hand", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-                cardEffects.Add(activateClass);
+                return "[On Play] [When Digivolving] You may trash up to 4 blue cards in your hand. For each one, trash any 1 card under your opponent's Digimon or Tamers. Then, return 1 of their Digimon or Tamers without cards under it to the hand.";
+            }
 
-                string EffectDiscription()
+            bool CanSelectCardTrashingCondition(CardSource cardSource)
+            {
+                if (cardSource.CardColors.Contains(CardColor.Blue))
                 {
-                    return "[On Play] [When Digivolving] You may trash up to 4 blue cards in your hand. For each one, trash any 1 card under your opponent's Digimon or Tamers. Then, return 1 of their Digimon or Tamers without cards under it to the hand.";
+                    return true;
                 }
+                return false;
+            }
 
-                bool CanSelectCardTrashingCondition(CardSource cardSource)
+            #region trashing sources conditions
+
+            bool CanSelectBounceCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
                 {
-                    if (cardSource.CardColors.Contains(CardColor.Blue))
+                    if (permanent.DigivolutionCards.Count() == 0)
                     {
                         return true;
                     }
-                    return false;
                 }
 
-                #region trashing sources conditions
+                return false;
+            }
+            #endregion
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    if (card.Owner.HandCards.Count >= 1)
+                    {
+                        return true;
+                    }
+                }
+                return false;
+            }
+            #endregion
+
+            #region On Play
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Trash sources, return 1 Digimon/Tamer to hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
                     return !cardSource.CanNotTrashFromDigivolutionCards(activateClass);
@@ -49,46 +78,124 @@ namespace DCGO.CardEffects.LM
                 {
                     if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
                     {
-                        if (permanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                        if (!permanent.TopCard.IsDigiEgg)
                         {
-                            return true;
+                            if (permanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                            {
+                                return true;
+                            }
                         }
                     }
 
                     return false;
                 }
 
-                bool CanSelectBounceCondition(Permanent permanent)
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    List<CardSource> discardedCards = new List<CardSource>();
+
+                    int maxCount = Math.Min(4, card.Owner.HandCards.Count(CanSelectCardCondition));
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectCardTrashingCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: true,
+                        canEndNotMax: true,
+                        isShowOpponent: true,
+                        selectCardCoroutine: null,
+                        afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                        mode: SelectHandEffect.Mode.Discard,
+                        cardEffect: activateClass);
+
+                    yield return StartCoroutine(selectHandEffect.Activate());
+
+                    IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                     {
-                        if (permanent.DigivolutionCards.Count() == 0)
-                        {
-                            return true;
-                        }
+                        discardedCards = cardSources.Clone();
+
+                        yield return null;
                     }
 
-                    return false;
+                    foreach (CardSource cardSource in discardedCards)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.SelectTrashDigivolutionCards(
+                            permanentCondition: CanSelectPermanentCondition,
+                            cardCondition: CanSelectCardCondition,
+                            maxCount: 1,
+                            canNoTrash: false,
+                            isFromOnly1Permanent: true,
+                            activateClass: activateClass
+                        ));
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectBounceCondition))
+                    {
+                        int maxBounceCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectBounceCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectBounceCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxBounceCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Bounce,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
                 }
-                #endregion
+            }
+            #endregion
 
-                bool CanUseCondition(Hashtable hashtable)
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Trash sources, return 1 Digimon/Tamer to hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                bool CanSelectCardCondition(CardSource cardSource)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return !cardSource.CanNotTrashFromDigivolutionCards(activateClass);
                 }
 
-                bool CanActivateCondition(Hashtable hashtable)
+                bool CanSelectPermanentCondition(Permanent permanent)
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
                     {
-                        if (card.Owner.HandCards.Count >= 1)
+                        if (!permanent.TopCard.IsDigiEgg)
                         {
-                            return true;
+                            if (permanent.DigivolutionCards.Count(CanSelectCardCondition) >= 1)
+                            {
+                                return true;
+                            }
                         }
                     }
+
                     return false;
                 }
 
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                     List<CardSource> discardedCards = new List<CardSource>();
@@ -157,14 +264,14 @@ namespace DCGO.CardEffects.LM
             #endregion
 
             #region When Attacking
-            if(timing == EffectTiming.OnAllyAttack)
+            if (timing == EffectTiming.OnAllyAttack)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Security Attack +1", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateAttackCondition, ActivateCoroutine, -1, true, AttackDescription());
                 cardEffects.Add(activateClass);
 
-                string EffectDiscription()
+                string AttackDescription()
                 {
                     return "[When Attacking] By returning 3 cards with [Jellymon] in their texts from your trash to the bottom of your deck, this Digimon gains <Security A. +1> for the turn.";
                 }
@@ -179,7 +286,7 @@ namespace DCGO.CardEffects.LM
                     return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
                 }
 
-                bool CanActivateCondition(Hashtable hashtable)
+                bool CanActivateAttackCondition(Hashtable hashtable)
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {

+ 97 - 28
Assets/CardEffect/LM/Blue/Cthyllamon_LM_006.cs

@@ -17,10 +17,10 @@ namespace DCGO.CardEffects.LM
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Play this card for reduced cost", CanUseCondition, card);
-                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, false, TrashEffectDiscription());
                 cardEffects.Add(activateClass);
 
-                string EffectDiscription()
+                string TrashEffectDiscription()
                 {
                     return "[Trash] [Main] By returning 1 of your Tamers to the bottom of the deck, play this card with the play cost reduced by the play cost of the returned Tamer.";
                 }
@@ -176,19 +176,32 @@ namespace DCGO.CardEffects.LM
             }
             #endregion
 
-            #region OnPlay/When Digivolving
-            if(timing == EffectTiming.OnEnterFieldAnyone)
+            #region On Play/When Digivolving Shared
+            string EffectDiscription()
+            {
+                return "[On Play] [When Digivolving] Trash the bottom 3 digivolution cards of 1 of your opponent's Digimon. Then, until the end of their turn, none of their Digimon with no digivolution cards can't attack.";
+            }
+
+            
+
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
+                {
+                    return true;
+                }
+                return false;
+            }
+            #endregion
+
+            #region On Play
+            if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
 
-                string EffectDiscription()
-                {
-                    return "[On Play] [When Digivolving] Trash the bottom 3 digivolution cards of 1 of your opponent's Digimon. Then, until the end of their turn, none of their Digimon with no digivolution cards can't attack.";
-                }
-
                 bool CanSelectPermanentCondition(Permanent permanent)
                 {
                     if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
@@ -204,18 +217,89 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
-                bool CanActivateCondition(Hashtable hashtable)
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        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)
+                        {
+                            Permanent selectedPermanent = permanent;
+
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.TrashDigivolutionCardsFromTopOrBottom(targetPermanent: selectedPermanent, trashCount: 3, isFromTop: false, activateClass: activateClass));
+                        }
+                    }
+
+                    bool DefenderCondition(Permanent defender)
                     {
                         return true;
                     }
+
+                    foreach(Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                    {
+                        if (permanent.DigivolutionCards.Count == 0)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotAttack(
+                                targetPermanent: permanent,
+                                defenderCondition: DefenderCondition,
+                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                                activateClass: activateClass,
+                                effectName: "Can't Attack"));
+                        }
+                    }
+
+                    
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect(card.BaseENGCardNameFromEntity, CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                bool CanSelectPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    {
+                        if (permanent.DigivolutionCards.Count((cardSource) => !cardSource.CanNotTrashFromDigivolutionCards(activateClass)) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
                     return false;
                 }
 
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
@@ -247,25 +331,12 @@ namespace DCGO.CardEffects.LM
                         }
                     }
 
-                    bool AttackerCondition(Permanent attacker)
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(attacker, card))
-                        {
-                            if (attacker.HasNoDigivolutionCards)
-                            {
-                                return true;
-                            }
-                        }
-
-                        return false;
-                    }
-
                     bool DefenderCondition(Permanent defender)
                     {
                         return true;
                     }
 
-                    foreach(Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                    foreach (Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
                     {
                         if (permanent.DigivolutionCards.Count == 0)
                         {
@@ -277,8 +348,6 @@ namespace DCGO.CardEffects.LM
                                 effectName: "Can't Attack"));
                         }
                     }
-
-                    
                 }
             }
             #endregion

+ 117 - 36
Assets/CardEffect/LM/Blue/Thetismon_LM_004.cs

@@ -11,63 +11,144 @@ namespace DCGO.CardEffects.LM
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region OnPlay/When Digivolving
-            if (timing == EffectTiming.OnEnterFieldAnyone)
+            #region On Play/When Digivolving
+            string EffectDiscription()
             {
-                ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Can't be deleted by battle", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-                cardEffects.Add(activateClass);
+                return "[On Play] [When Digivolving] By trashing 2 blue cards in your hand, unsuspend 1 of your Digimon and 1 of your [Kiyoshiro Higashimitarai], and this Digimon gains <Blocker> until the end of your opponent's turn.";
+            }
 
-                string EffectDiscription()
+            bool CanSelectCardCondition(CardSource cardSource)
+            {
+                if (cardSource.CardColors.Contains(CardColor.Blue))
                 {
-                    return "[On Play] [When Digivolving] By trashing 2 blue cards in your hand, unsuspend 1 of your Digimon and 1 of your [Kiyoshiro Higashimitarai], and this Digimon gains <Blocker> until the end of your opponent's turn.";
+                    return true;
                 }
+                return false;
+            }
+
+            bool CanSelectDigimonCondition(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
+            }
 
-                bool CanSelectCardCondition(CardSource cardSource)
+            bool CanSelectTamerCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
                 {
-                    if (cardSource.CardColors.Contains(CardColor.Blue))
+                    if (permanent.IsTamer)
                     {
-                        return true;
+                        if (permanent.TopCard.CardNames.Contains("Kiyoshiro Higashimitarai") || permanent.TopCard.CardNames.Contains("KiyoshiroHigashimitarai"))
+                            return true;
                     }
-                    return false;
                 }
 
-                bool CanSelectDigimonCondition(Permanent permanent)
-                {
-                    return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card);
-                }
+                return false;
+            }
 
-                bool CanSelectTamerCondition(Permanent permanent)
+            bool CanActivateCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    if (card.Owner.HandCards.Count >= 2)
                     {
-                        if (permanent.IsTamer)
-                        {
-                            if (permanent.TopCard.CardNames.Contains("Kiyoshiro Higashimitarai") || permanent.TopCard.CardNames.Contains("KiyoshiroHigashimitarai"))
-                                return true;
-                        }
+                        return true;
                     }
-
-                    return false;
                 }
+                return false;
+            }
+            #endregion
 
+            #region On Play
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Can't be deleted by battle", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
-                bool CanActivateCondition(Hashtable hashtable)
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    bool discarded = false;
+
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectCardCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: 2,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        selectCardCoroutine: null,
+                        afterSelectCardCoroutine: AfterSelectCardCoroutine,
+                        mode: SelectHandEffect.Mode.Discard,
+                        cardEffect: activateClass);
+
+                    yield return StartCoroutine(selectHandEffect.Activate());
+
+                    IEnumerator AfterSelectCardCoroutine(List<CardSource> cardSources)
                     {
-                        if (card.Owner.HandCards.Count >= 2)
+                        if (cardSources.Count == 2)
                         {
-                            return true;
+                            discarded = true;
+
+                            yield return null;
                         }
                     }
-                    return false;
+
+                    if (discarded)
+                    {
+                        yield return UnsuspendTargetPermenants(CanSelectDigimonCondition);
+                        yield return UnsuspendTargetPermenants(CanSelectTamerCondition);
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(targetPermanent: card.PermanentOfThisCard(), effectDuration: EffectDuration.UntilOpponentTurnEnd, activateClass: activateClass));
+                    }
+                }
+
+                IEnumerator UnsuspendTargetPermenants(Func<Permanent,bool> selectCondition)
+                {
+                    if (CardEffectCommons.HasMatchConditionPermanent(selectCondition))
+                    {
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(selectCondition));
+
+                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: selectCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.UnTap,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Can't be deleted by battle", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
@@ -110,7 +191,7 @@ namespace DCGO.CardEffects.LM
                     }
                 }
 
-                IEnumerator UnsuspendTargetPermenants(Func<Permanent,bool> selectCondition)
+                IEnumerator UnsuspendTargetPermenants(Func<Permanent, bool> selectCondition)
                 {
                     if (CardEffectCommons.HasMatchConditionPermanent(selectCondition))
                     {
@@ -138,15 +219,15 @@ namespace DCGO.CardEffects.LM
             #endregion
 
             #region All Turns - Inherited Effect
-            if(timing == EffectTiming.OnDiscardHand)
+            if (timing == EffectTiming.OnDiscardHand)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Unsuspend this Digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateAllTurnsCondition, ActivateCoroutine, 1, true, EffectAllTurnsDiscription());
                 activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
 
-                string EffectDiscription()
+                string EffectAllTurnsDiscription()
                 {
                     return "[All Turns] [Once Per Turn] When a card with [Jellymon] in its text is trashed from your hand, you may unsuspend this Digimon.";
                 }
@@ -180,7 +261,7 @@ namespace DCGO.CardEffects.LM
                     return false;
                 }
 
-                bool CanActivateCondition(Hashtable hashtable)
+                bool CanActivateAllTurnsCondition(Hashtable hashtable)
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {

+ 0 - 1
Assets/CardEffect/LM/Green/Airdramon_LM_009.cs

@@ -250,7 +250,6 @@ namespace DCGO.CardEffects.LM
             }
             #endregion
 
-
             return cardEffects;
         }
     }

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

@@ -10,7 +10,7 @@ namespace DCGO.CardEffects.LM
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region OnPlay
+            #region On Play
             if(timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();

+ 75 - 18
Assets/CardEffect/LM/Green/Diarbbitmon_LM_013.cs

@@ -18,43 +18,100 @@ namespace DCGO.CardEffects.LM
                 cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
             }
 
-            #region OnPlay/When Digivolving
+            #region On Play/When Digivolving Shared
+            string SharedEffectDiscription()
+            {
+                return "[On Play] [When Digivolving] Suspend 1 of your opponent's Digimon. Then, if they have no unsuspended Digimon, gain 2 memory.";
+            }
+
+            bool CanSelectSharedPermanentCondition(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+            }
+
+            bool HasNoUnsuspendDigimon()
+            {
+                if (card.Owner.Enemy.GetBattleAreaDigimons().Count == 0)
+                {
+                    return true;
+                }
+
+                foreach (Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                {
+                    if (!permanent.IsSuspended)
+                        return false;
+                }
+
+                return true;
+            }
+            #endregion
+
+            #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Gain Memory +2", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, SharedEffectDiscription());
                 cardEffects.Add(activateClass);
 
-                string EffectDiscription()
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    return "[On Play] [When Digivolving] Suspend 1 of your opponent's Digimon. Then, if they have no unsuspended Digimon, gain 2 memory.";
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
-                bool CanSelectPermanentCondition(Permanent permanent)
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                    return CardEffectCommons.IsExistOnBattleArea(card);
                 }
 
-                bool HasNoUnsuspendDigimon()
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if(card.Owner.Enemy.GetBattleAreaDigimons().Count == 0)
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectSharedPermanentCondition))
                     {
-                        return true;
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedPermanentCondition));
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSharedPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Tap,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to Suspend.", "The opponent is selecting 1 Digimon to Suspend.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                     }
 
-                    foreach (Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                    if (card.Owner.CanAddMemory(activateClass))
                     {
-                        if (!permanent.IsSuspended)
-                            return false;
+                        if (HasNoUnsuspendDigimon())
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(2, activateClass));
+                        }
                     }
-
-                    return true;
                 }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Gain Memory +2", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, SharedEffectDiscription());
+                cardEffects.Add(activateClass);
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -66,13 +123,13 @@ namespace DCGO.CardEffects.LM
                 {
                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectSharedPermanentCondition))
                     {
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedPermanentCondition));
 
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition: CanSelectSharedPermanentCondition,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,

+ 107 - 26
Assets/CardEffect/LM/Green/Lamortmon_LM_012.cs

@@ -10,48 +10,129 @@ namespace DCGO.CardEffects.LM
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region OnPlay/When Digivolving
+            #region On Play/When Digivolving Shared
+            string EffectSharedDiscription()
+            {
+                return "[On Play] [When Digivolving] Suspend 1 of your opponent's Digimon. Then, if they have no unsuspended Digimon, 1 of their Digimon can't unsuspend until the end of their turn.";
+            }
+
+            bool CanSelectSharedPermanentCondition(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+            }
+
+            bool CanSelectSharedUnsuspendCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                {
+                    return HasNoUnsuspendDigimon();
+                }
+
+                return false;
+            }
+
+            bool HasNoUnsuspendDigimon()
+            {
+                foreach (Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                {
+                    if (!permanent.IsSuspended)
+                        return false;
+                }
+
+                return true;
+            }
+            #endregion
+
+            #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Can't Unsuspend", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
                 cardEffects.Add(activateClass);
 
-                string EffectDiscription()
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    return "[On Play] [When Digivolving] Suspend 1 of your opponent's Digimon. Then, if they have no unsuspended Digimon, 1 of their Digimon can't unsuspend until the end of their turn.";
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
-                bool CanSelectPermanentCondition(Permanent permanent)
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                    return CardEffectCommons.IsExistOnBattleArea(card);
                 }
 
-                bool CanSelectUnsuspendCondition(Permanent permanent)
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectSharedPermanentCondition))
                     {
-                        return HasNoUnsuspendDigimon();
-                    }
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedPermanentCondition));
 
-                    return false;
-                }
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSharedPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Tap,
+                            cardEffect: activateClass);
 
-                bool HasNoUnsuspendDigimon()
-                {
-                    foreach (Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
-                    {
-                        if (!permanent.IsSuspended)
-                            return false;
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to Suspend.", "The opponent is selecting 1 Digimon to Suspend.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                     }
 
-                    return true;
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectSharedUnsuspendCondition))
+                    {
+                        int blockerCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedUnsuspendCondition));
+
+                        selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSharedUnsuspendCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: blockerCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectBlockerPermanent,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that can't unsuspend.", "The opponent is selecting 1 Digimon that can't unsuspend.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectBlockerPermanent(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCantUnsuspendUntilOpponentTurnEnd(
+                                targetPermanent: permanent,
+                                activateClass: activateClass
+                            ));
+                        }
+                    }
                 }
+            }
+            #endregion
+
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Can't Unsuspend", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+                cardEffects.Add(activateClass);
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -63,13 +144,13 @@ namespace DCGO.CardEffects.LM
                 {
                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectPermanentCondition))
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectSharedPermanentCondition))
                     {
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedPermanentCondition));
 
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition: CanSelectSharedPermanentCondition,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,
@@ -85,15 +166,15 @@ namespace DCGO.CardEffects.LM
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                     }
 
-                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectUnsuspendCondition))
+                    if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, CanSelectSharedUnsuspendCondition))
                     {
-                        int blockerCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectUnsuspendCondition));
+                        int blockerCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedUnsuspendCondition));
 
                         selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectUnsuspendCondition,
+                            canTargetCondition: CanSelectSharedUnsuspendCondition,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: blockerCount,

+ 108 - 28
Assets/CardEffect/LM/Green/SymbareAngoramon_LM_011.cs

@@ -11,53 +11,133 @@ namespace DCGO.CardEffects.LM
         {
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
-            #region OnPlay/When Digivolving
+            #region On Play/When Digivolving
+            string EffectSharedDiscription()
+            {
+                return "[On Play] [When Digivolving] Suspend 1 of your opponent's Digimon. Then, if they have no unsuspended Digimon, 1 of your Digimon gains <Blocker> until the end of your opponent's turn.";
+            }
+
+            bool CanSelectSharedPermanentCondition(Permanent permanent)
+            {
+                return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+            }
+
+            bool CanSelectBlockerCondition(Permanent permanent)
+            {
+                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                {
+                    return HasNoUnsuspendDigimon();
+                }
+
+                return false;
+            }
+
+            bool HasNoUnsuspendDigimon()
+            {
+                if (card.Owner.Enemy.GetBattleAreaDigimons().Count == 0)
+                {
+                    return true;
+                }
+
+                foreach (Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                {
+                    if (!permanent.IsSuspended)
+                        return false;
+                }
+
+                return true;
+            }
+            #endregion
+
+            #region On Play
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Gain <Blocker>", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
                 cardEffects.Add(activateClass);
 
-                string EffectDiscription()
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    return "[On Play] [When Digivolving] Suspend 1 of your opponent's Digimon. Then, if they have no unsuspended Digimon, 1 of your Digimon gains <Blocker> until the end of your opponent's turn.";
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
-                bool CanSelectPermanentCondition(Permanent permanent)
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card);
+                    return CardEffectCommons.IsExistOnBattleArea(card);
                 }
 
-                bool CanSelectBlockerCondition(Permanent permanent)
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    if(CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSharedPermanentCondition))
                     {
-                        return HasNoUnsuspendDigimon();
-                    }
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedPermanentCondition));
 
-                    return false;
-                }
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectSharedPermanentCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: maxCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Tap,
+                            cardEffect: activateClass);
 
-                bool HasNoUnsuspendDigimon()
-                {
-                    if (card.Owner.Enemy.GetBattleAreaDigimons().Count == 0)
-                    {
-                        return true;
-                    } 
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to Suspend.", "The opponent is selecting 1 Digimon to Suspend.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
 
-                    foreach (Permanent permanent in card.Owner.Enemy.GetBattleAreaDigimons())
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectBlockerCondition))
                     {
-                        if (!permanent.IsSuspended)
-                            return false;
+                        int blockerCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectBlockerCondition));
+
+                        selectPermanentEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectBlockerCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: blockerCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: SelectBlockerPermanent,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to gain <Blocker>.", "The opponent is selecting 1 Digimon to gain <Blocker>.");
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectBlockerPermanent(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainBlocker(
+                                targetPermanent: permanent,
+                                EffectDuration.UntilOpponentTurnEnd,
+                                activateClass: activateClass
+                            ));
+                        }
                     }
+                }                    
+            }
+            #endregion
 
-                    return true;
-                }
+            #region When Digivolving
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Gain <Blocker>", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectSharedDiscription());
+                cardEffects.Add(activateClass);
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -69,13 +149,13 @@ namespace DCGO.CardEffects.LM
                 {
                     SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
-                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectSharedPermanentCondition))
                     {
-                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
+                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectSharedPermanentCondition));
 
                         selectPermanentEffect.SetUp(
                             selectPlayer: card.Owner,
-                            canTargetCondition: CanSelectPermanentCondition,
+                            canTargetCondition: CanSelectSharedPermanentCondition,
                             canTargetCondition_ByPreSelecetedList: null,
                             canEndSelectCondition: null,
                             maxCount: maxCount,
@@ -121,7 +201,7 @@ namespace DCGO.CardEffects.LM
                             ));
                         }
                     }
-                }                    
+                }
             }
             #endregion
 

+ 3 - 7
Assets/CardEffect/LM/Purple/Gammamon_LM_016.cs

@@ -65,13 +65,9 @@ namespace DCGO.CardEffects.LM
                     {
                         if (CardEffectCommons.CanTriggerOnPermanentDeleted(hashtable, PermanentCondition))
                         {
-                            if (CardEffectCommons.IsOwnerTurn(card))
+                            if (CardEffectCommons.IsByEffect(hashtable, null))
                             {
-                                if(CardEffectCommons.IsByEffect(hashtable, null))
-                                {
-                                    return true;
-                                }
-                                
+                                return true;
                             }
                         }
                     }
@@ -137,7 +133,7 @@ namespace DCGO.CardEffects.LM
 
                 bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.CanActivateOnDeletion(card))
+                    if (CardEffectCommons.CanActivateOnDeletionInherited(hashtable, card))
                     {
                         if (card.Owner.HandCards.Count >= 1)
                         {

+ 136 - 10
Assets/CardEffect/LM/Purple/Regulusmon_LM_017.cs

@@ -28,32 +28,158 @@ namespace DCGO.CardEffects.LM
                 cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
             }
 
-            #region OnPlay/WhenDigivolving
+            #region On Play/When Digivolving Shared
+            string EffectSharedDiscription()
+            {
+                return "[On Play] [When Digivolving] Trash 1 card in your hand. Then, you may place 1 card with [Gammamon] in its text from your trash as this Digimon's bottom digivolution card.";
+            }
+
+            bool CanSelectSharedCardCondition(CardSource cardSource)
+            {
+                if (CardEffectCommons.IsExistOnTrash(cardSource))
+                {
+                    return cardSource.HasText("Gammamon");
+                }
+                return false;
+            }
+            #endregion
+
+            #region On Play
 
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Trash 1 card from your hand", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
                 cardEffects.Add(activateClass);
 
-                string EffectDiscription()
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    return "[On Play] [When Digivolving] Trash 1 card in your hand. Then, you may place 1 card with [Gammamon] in its text from your trash as this Digimon's bottom digivolution card.";
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
                 }
 
-                bool CanSelectCardCondition(CardSource cardSource)
+                bool CanActivateThenCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsExistOnTrash(cardSource))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        return cardSource.HasText("Gammamon");
+                        if (card.Owner.TrashCards.Count >= 1)
+                        {
+                            if (card.Owner.TrashCards.Any(cardSource => cardSource.HasText("Gammamon")))
+                            {
+                                return true;
+                            }
+                        }
                     }
+
                     return false;
                 }
 
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    List<CardSource> selectedCards = new List<CardSource>();
+
+                    SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                    selectHandEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: (cardSource) => true,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: 1,
+                        canNoSelect: true,
+                        canEndNotMax: false,
+                        isShowOpponent: true,
+                        selectCardCoroutine: null,
+                        afterSelectCardCoroutine: null,
+                        mode: SelectHandEffect.Mode.Discard,
+                        cardEffect: activateClass);
+
+                    selectHandEffect.SetUpCustomMessage("Select 1 card to trash.", "The opponent is selecting 1 card to trash.");
+
+                    yield return StartCoroutine(selectHandEffect.Activate());
+
+                    yield return StartCoroutine(ActivatePlacingSource());
+                }
+
+                IEnumerator ActivatePlacingSource()
+                {
+                    ActivateClass activateClass = new ActivateClass();
+                    activateClass.SetUpICardEffect("Place a Card from hand to digivolution cards to get effects", CanUseCondition, card);
+                    activateClass.SetUpActivateClass(CanActivateThenCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
+                    cardEffects.Add(activateClass);
+
+                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                    List<CardSource> selectedCards = new List<CardSource>();
+
+                    selectCardEffect.SetUp(
+                        canTargetCondition: CanSelectSharedCardCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        canNoSelect: () => true,
+                        selectCardCoroutine: SelectCardCoroutine,
+                        afterSelectCardCoroutine: null,
+                        message: "Select 1 card to place at the bottom of digivolution cards.",
+                        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 card to place at the bottom of digivolution cards.", "The opponent is selecting 1 card to place at the bottom of digivolution cards.");
+
+                    yield return StartCoroutine(selectCardEffect.Activate());
+
+                    IEnumerator SelectCardCoroutine(CardSource cardSource)
+                    {
+                        selectedCards.Add(cardSource);
+
+                        yield return null;
+                    }
+
+                    if (selectedCards.Count >= 1)
+                    {
+                        Permanent selectedPermanent = card.PermanentOfThisCard();
+
+                        if (selectedPermanent != null)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(selectedPermanent.AddDigivolutionCardsBottom(selectedCards, activateClass));
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Trash 1 card from your hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
+                cardEffects.Add(activateClass);
+
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -116,7 +242,7 @@ namespace DCGO.CardEffects.LM
                 {
                     ActivateClass activateClass = new ActivateClass();
                     activateClass.SetUpICardEffect("Place a Card from hand to digivolution cards to get effects", CanUseCondition, card);
-                    activateClass.SetUpActivateClass(CanActivateThenCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                    activateClass.SetUpActivateClass(CanActivateThenCondition, ActivateCoroutine, -1, true, EffectSharedDiscription());
                     cardEffects.Add(activateClass);
 
                     SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
@@ -124,7 +250,7 @@ namespace DCGO.CardEffects.LM
                     List<CardSource> selectedCards = new List<CardSource>();
 
                     selectCardEffect.SetUp(
-                        canTargetCondition: CanSelectCardCondition,
+                        canTargetCondition: CanSelectSharedCardCondition,
                         canTargetCondition_ByPreSelecetedList: null,
                         canEndSelectCondition: null,
                         canNoSelect: () => true,

+ 179 - 43
Assets/CardEffect/LM/Red/Siriusmon_LM_001.cs

@@ -27,7 +27,7 @@ namespace DCGO.CardEffects.LM
                 cardEffects.Add(CardEffectFactory.BlastDigivolveEffect(card: card, condition: null));
             }
 
-            #region OnPlay/WhenDigivolving
+            #region On Play
 
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
@@ -48,7 +48,7 @@ namespace DCGO.CardEffects.LM
 
                 bool CanUseCondition(Hashtable hashtable)
                 {
-                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card) || CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
 
                 bool CanActivateCondition(Hashtable hashtable)
@@ -97,67 +97,203 @@ namespace DCGO.CardEffects.LM
                             selectedCards.Add(cardSource);
                             yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
                         }
+                    }
+
+                    #region Then, Delete 1 of your opponent's Digimon with 8000 DP or less.
+                    int MaxDP()
+                    {
+                        int DP = 8000;
+
+                        List<CardColor> cardColors = new List<CardColor>();
 
-                        #region Then, Delete 1 of your opponent's Digimon with 8000 DP or less.
-                        int MaxDP()
+                        foreach (CardSource source in card.PermanentOfThisCard().cardSources)
                         {
-                            int DP = 8000;
+                            foreach (CardColor cardColor in source.CardColors)
+                            {
+                                if (!cardColors.Contains(cardColor))
+                                    cardColors.Add(cardColor);
+                            }
+                        }
+
+                        cardColors = cardColors.Distinct().ToList();
 
-                            List<CardColor> cardColors = new List<CardColor>();
+                        DP += cardColors.Count * 1000;
 
-                            foreach (CardSource source in card.PermanentOfThisCard().cardSources)
+                        return DP;
+                    }
+
+                    bool CanSelectPermanentCondition(Permanent permanent)
+                    {
+                        if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                        {
+                            if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(MaxDP(), activateClass))
                             {
-                                foreach (CardColor cardColor in source.CardColors)
-                                {
-                                    if (!cardColors.Contains(cardColor))
-                                        cardColors.Add(cardColor);
-                                }
+                                return true;
                             }
+                        }
+
+                        return false;
+                    }
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        int maxDeleteCount = System.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: maxDeleteCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+
+                    #endregion
+                }
+            }
 
-                            cardColors = cardColors.Distinct().ToList();
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Place a Card from hand to digivolution cards to get effects", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                cardEffects.Add(activateClass);
+
+                string EffectDiscription()
+                {
+                    return "[On Play] [When Digivolving] You may place 1 card with [Gammamon] in its text from your hand as this Digimon's bottom digivolution card. Then, delete 1 of your opponent's Digimon with 8000 DP or less. For each color in this Digimon's digivolution cards, add 1000 to this DP deletion effect's maximum.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    return cardSource.HasText("Gammamon");
+                }
 
-                            DP += cardColors.Count * 1000;
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
 
-                            return DP;
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count >= 1)
+                        {
+                            return true;
                         }
+                    }
 
-                        bool CanSelectPermanentCondition(Permanent permanent)
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
+                    {
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        int maxCount = 1;
+
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectCardCondition,
+                            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 card to place on bottom of digivolution cards.", "The opponent is selecting 1 card to place on bottom of digivolution cards.");
+
+                        yield return StartCoroutine(selectHandEffect.Activate());
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
                         {
-                            if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                            selectedCards.Add(cardSource);
+                            yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(selectedCards, activateClass));
+                        }
+                    }
+
+                    #region Then, Delete 1 of your opponent's Digimon with 8000 DP or less.
+                    int MaxDP()
+                    {
+                        int DP = 8000;
+
+                        List<CardColor> cardColors = new List<CardColor>();
+
+                        foreach (CardSource source in card.PermanentOfThisCard().cardSources)
+                        {
+                            foreach (CardColor cardColor in source.CardColors)
                             {
-                                if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(MaxDP(), activateClass))
-                                {
-                                    return true;
-                                }
+                                if (!cardColors.Contains(cardColor))
+                                    cardColors.Add(cardColor);
                             }
-
-                            return false;
                         }
 
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                        cardColors = cardColors.Distinct().ToList();
+
+                        DP += cardColors.Count * 1000;
+
+                        return DP;
+                    }
+
+                    bool CanSelectPermanentCondition(Permanent permanent)
+                    {
+                        if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
                         {
-                            int maxDeleteCount = System.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: maxDeleteCount,
-                                canNoSelect: false,
-                                canEndNotMax: false,
-                                selectPermanentCoroutine: null,
-                                afterSelectPermanentCoroutine: null,
-                                mode: SelectPermanentEffect.Mode.Destroy,
-                                cardEffect: activateClass);
-
-                            yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                            if (permanent.DP <= card.Owner.MaxDP_DeleteEffect(MaxDP(), activateClass))
+                            {
+                                return true;
+                            }
                         }
 
-                        #endregion
+                        return false;
                     }
+
+                    if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
+                    {
+                        int maxDeleteCount = System.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: maxDeleteCount,
+                            canNoSelect: false,
+                            canEndNotMax: false,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: null,
+                            mode: SelectPermanentEffect.Mode.Destroy,
+                            cardEffect: activateClass);
+
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+
+                    #endregion
                 }
             }
 

+ 1 - 19
Assets/CardEffect/LM/Yellow/Publimon_LM_007.cs

@@ -44,25 +44,7 @@ namespace DCGO.CardEffects.LM
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateDebuffEffect(card.PermanentOfThisCard()));
-
-                        CardSource cardSource = card.PermanentOfThisCard().TopCard;
-                        Permanent permanent = card.PermanentOfThisCard();
-
-                        yield return ContinuousController.instance.StartCoroutine(CardObjectController.RemoveFromAllArea(cardSource));
-
-                        permanent.ShowingPermanentCard.ShowPermanentData(true);
-
-                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().RemoveDigivolveRootEffect(cardSource, permanent));
-
-                        if (!cardSource.IsToken)
-                        {
-                            yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(cardSource));
-
-                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(cardSource.Owner));
-
-                            yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(cardSource.Owner).AddSecurity());
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(new IPutSecurityPermanent(card.PermanentOfThisCard(), CardEffectCommons.CardEffectHashtable(activateClass), toTop: true).PutSecurity());
                     }
                 }
             }

+ 126 - 113
Assets/CardEffect/P/Blue/Veemon_P_117.cs

@@ -5,175 +5,188 @@ using System.Linq;
 using Photon;
 using System;
 using Photon.Pun;
-public class Veemon_P_117 : CEntity_Effect
+
+namespace DCGO.CardEffects.P
 {
-    public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+    public class Veemon_P_117 : CEntity_Effect
     {
-        List<ICardEffect> cardEffects = new List<ICardEffect>();
-
-        #region Activate Cost Reduciton
-        ActivateClass costReduceClass = new ActivateClass();
-        costReduceClass.SetUpICardEffect("Digivolution Cost -1", CanUseReduceCondition, card);
-        costReduceClass.SetUpActivateClass(CanActivateCostReductionCondition, ActivateCostReductionCoroutine, 1, false, EffectDiscription2());
-        costReduceClass.SetIsInheritedEffect(true);
-        costReduceClass.SetNotShowUI(true);
-        costReduceClass.SetIsBackgroundProcess(true);
-        costReduceClass.SetHashString("DigivolutionCost-1_P_117");
-
-        string EffectDiscription2()
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
         {
-            return "[Your Turn] [Once Per Turn] When this Digimon would digivolve into a Digimon card with the [Free] trait, if you have a Tamer, reduce the digivolution cost by 1.";
-        }
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Activate Cost Reduciton
+            ActivateClass costReduceClass = new ActivateClass();
+            costReduceClass.SetUpICardEffect("Digivolution Cost -1", CanUseReduceCondition, card);
+            costReduceClass.SetUpActivateClass(CanActivateCostReductionCondition, ActivateCostReductionCoroutine, 2, false, EffectDiscription2());
+            //costReduceClass.SetIsInheritedEffect(true);
+            //costReduceClass.SetNotShowUI(true);
+            //costReduceClass.SetIsBackgroundProcess(true);
+            costReduceClass.SetHashString("DigivolutionCost-1_P_117");
+
+            string EffectDiscription2()
+            {
+                return "[Your Turn] [Once Per Turn] When this Digimon would digivolve into a Digimon card with the [Free] trait, if you have a Tamer, reduce the digivolution cost by 1.";
+            }
 
-        bool CardSourceCondition(CardSource cardSource)
-        {
-            return cardSource.CardTraits.Contains("Free");
-        }
+            bool CardSourceCondition(CardSource cardSource)
+            {
+                return cardSource.CardTraits.Contains("Free");
+            }
 
-        bool CanUseReduceCondition(Hashtable hashtable)
-        {
-            if (CardEffectCommons.IsExistOnBattleArea(card))
+            bool CanUseReduceCondition(Hashtable hashtable)
             {
-                if (CardEffectCommons.IsOwnerTurn(card))
+                if (CardEffectCommons.IsExistOnBattleArea(card))
                 {
                     if (CardEffectCommons.CanTriggerWhenPermanentWouldDigivolveOfCard(hashtable, CardSourceCondition, card))
                     {
                         return true;
                     }
                 }
+
+
+                return false;
             }
 
-            return false;
-        }
+            bool CanActivateCostReductionCondition(Hashtable hashtable)
+            {
+                if (CardEffectCommons.IsOwnerTurn(card))
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        return true;
+                    }
+                }
 
-        bool CanActivateCostReductionCondition(Hashtable hashtable)
-        {
-            if (CardEffectCommons.IsExistOnBattleArea(card))
+
+                return false;
+            }
+
+            IEnumerator ActivateCostReductionCoroutine(Hashtable _hashtable)
             {
-                return true;
+                yield return null;
             }
 
-            return false;
-        }
 
-        IEnumerator ActivateCostReductionCoroutine(Hashtable _hashtable)
-        {
-            yield return null;
-        }
 
-        if (timing == EffectTiming.OnEnterFieldAnyone)
-        {
-            cardEffects.Add(costReduceClass);
-        }
-        #endregion
 
-        #region Cost reduction
-        if (timing == EffectTiming.None)
-        {
-            ChangeCostClass changeCostClass = new ChangeCostClass();
-            changeCostClass.SetUpICardEffect($"Digivolution Cost -1", CanUseCondition, card);
-            changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
-            cardEffects.Add(changeCostClass);
+            if (timing == EffectTiming.BeforePayCost)
+            {
+                cardEffects.Add(costReduceClass);
+            }
+            #endregion
 
-            bool CanUseCondition(Hashtable hashtable)
+            #region Cost reduction
+            if (timing == EffectTiming.None)
             {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                ChangeCostClass changeCostClass = new ChangeCostClass();
+                changeCostClass.SetUpICardEffect($"Digivolution Cost -1", CanUseCondition, card);
+                changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
+                cardEffects.Add(changeCostClass);
+
+                bool CanUseCondition(Hashtable hashtable)
                 {
-                    if (CardEffectCommons.IsOwnerTurn(card))
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.IsTamer))
+                        if (CardEffectCommons.IsOwnerTurn(card))
                         {
-                            return true;
+                            if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.IsTamer))
+                            {
+                                if (!card.cEntity_EffectController.isOverMaxCountPerTurn(costReduceClass, costReduceClass.MaxCountPerTurn))
+                                {
+                                    return true;
+                                }
+                            }
                         }
                     }
-                }
 
-                return false;
-            }
+                    return false;
+                }
 
-            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 -= 1;
+                            if (PermanentsCondition(targetPermanents))
+                            {
+                                
+                                Cost -= 1;
+                            }
                         }
                     }
-                }
 
-                return Cost;
-            }
+                    return Cost;
+                }
 
-            bool PermanentsCondition(List<Permanent> targetPermanents)
-            {
-                if (targetPermanents != null)
+                bool PermanentsCondition(List<Permanent> targetPermanents)
                 {
-                    if (targetPermanents.Count(PermanentCondition) >= 1)
+                    if (targetPermanents != null)
                     {
-                        return true;
+                        if (targetPermanents.Count(PermanentCondition) >= 1)
+                        {
+                            return true;
+                        }
                     }
+
+                    return false;
                 }
 
-                return false;
-            }
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent == card.PermanentOfThisCard();
+                }
 
-            bool PermanentCondition(Permanent targetPermanent)
-            {
-                return targetPermanent == card.PermanentOfThisCard();
-            }
+                bool RootCondition(SelectCardEffect.Root root)
+                {
+                    return true;
+                }
 
-            bool RootCondition(SelectCardEffect.Root root)
-            {
-                return true;
+                bool isUpDown()
+                {
+                    return true;
+                }
             }
+            #endregion
 
-            bool isUpDown()
+            if (timing == EffectTiming.OnAllyAttack)
             {
-                return true;
-            }
-        }
-        #endregion
-
-        if (timing == EffectTiming.OnAllyAttack)
-        {
-            ActivateClass activateClass = new ActivateClass();
-            activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-            activateClass.SetIsInheritedEffect(true);
-            cardEffects.Add(activateClass);
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
 
-            string EffectDiscription()
-            {
-                return "[When Attacking] If this Digimon has 2 or more colors, <Draw 1> (Draw 1 card from your deck).";
-            }
+                string EffectDiscription()
+                {
+                    return "[When Attacking] If this Digimon has 2 or more colors, <Draw 1> (Draw 1 card from your deck).";
+                }
 
-            bool CanUseCondition(Hashtable hashtable)
-            {
-                return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
-            }
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
 
-            bool CanActivateCondition(Hashtable hashtable)
-            {
-                if (CardEffectCommons.IsExistOnBattleArea(card))
+                bool CanActivateCondition(Hashtable hashtable)
                 {
-                    if (card.PermanentOfThisCard().TopCard.CardColors.Count >= 2)
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        return true;
+                        if (card.PermanentOfThisCard().TopCard.CardColors.Count >= 2)
+                        {
+                            return true;
+                        }
                     }
+
+                    return false;
                 }
 
-                return false;
+                IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
             }
 
-            IEnumerator ActivateCoroutine(Hashtable _hashtable)
-            {
-                yield return ContinuousController.instance.StartCoroutine(new DrawClass(card.Owner, 1, activateClass).Draw());
-            }
+            return cardEffects;
         }
-
-        return cardEffects;
     }
-}
+}

+ 3 - 3
Assets/CardEffect/RB1/Purple/Arkturusmon_RB1_031.cs

@@ -25,7 +25,7 @@ public class Arkturusmon_RB1_031 : CEntity_Effect
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Place 1 card from trash to digivolution cards and delete 1 Digimon", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
             cardEffects.Add(activateClass);
 
             string EffectDiscription()
@@ -151,7 +151,7 @@ public class Arkturusmon_RB1_031 : CEntity_Effect
                         canTargetCondition_ByPreSelecetedList: null,
                         canEndSelectCondition: null,
                         maxCount: maxCount,
-                        canNoSelect: false,
+                        canNoSelect: true,
                         canEndNotMax: false,
                         selectPermanentCoroutine: null,
                         afterSelectPermanentCoroutine: null,
@@ -167,7 +167,7 @@ public class Arkturusmon_RB1_031 : CEntity_Effect
         {
             ActivateClass activateClass = new ActivateClass();
             activateClass.SetUpICardEffect("Return 1 card from trash and play 1 [Proximamon] from hand", CanUseCondition, card);
-            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
+            activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
             cardEffects.Add(activateClass);
 
             string EffectDiscription()

+ 5 - 2
Assets/CardEffect/ST17/Blue/Magnamon_ST17_13.cs

@@ -62,8 +62,11 @@ namespace DCGO.CardEffects.ST17
                 {
                     if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
                     {
-                        if (permanent.IsDigimon)
-                            return true;
+                        if(!permanent.TopCard.CanNotBeAffected(activateClass))
+                        {
+                            if (permanent.IsDigimon)
+                                return true;
+                        }
                     }
 
                     return false;

+ 4 - 2
Assets/CardEffect/ST17/Green/DoubleTyphoon_ST17_11.cs

@@ -255,9 +255,11 @@ namespace DCGO.CardEffects.ST17
                             cardEffect: activateClass);
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                        cardEffects.Add(CardEffectFactory.PlaceSelfDelayOptionSecurityEffect(card));
                     }
+
+                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.PlaceDelayOptionCards(
+                                card: card,
+                                cardEffect: activateClass));
                 }
             }
             #endregion

+ 26 - 88
Assets/CardEffect/ST17/Green/Rapidmon_ST17_07.cs

@@ -57,10 +57,7 @@ namespace DCGO.CardEffects.ST17
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        {
-                            return true;
-                        }
+                        return true;
                     }
 
                     return false;
@@ -115,62 +112,34 @@ namespace DCGO.CardEffects.ST17
                         }
                     }
 
-                        ActivateClass activateClass1 = new ActivateClass();
-                        activateClass1.SetUpICardEffect("Can't be deleted and can't return to hand or deck by opponent's effect", CanUseCondition, card);
-                        activateClass1.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, null);
-                        activateClass1.SetHashString("GainEffect_ST17_07");
-                        cardEffects.Add(activateClass1);
-
-                        bool CanUseCondition(Hashtable hashtable)
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Green) && permanent.IsTamer))
+                    {
+                        bool CardEffectCondition(ICardEffect cardEffect)
                         {
-                            if (CardEffectCommons.IsExistOnBattleArea(card))
-                            {
-                                if (CardEffectCommons.IsOwnerTurn(card))
-                                {
-                                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Green) && permanent.IsTamer))
-                                {
-                                    return true;
-                                }
-                            }
-                            }
-
-                            return false;
+                            return CardEffectCommons.IsOpponentEffect(cardEffect, card);
                         }
 
-                        bool CanActivateCondition(Hashtable hashtable)
-                        {
-                            return CardEffectCommons.IsExistOnBattleArea(card);
-                        }
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotBeDeletedByEffect(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            cardEffectCondition: CardEffectCondition,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass,
+                            effectName: "Can't be deleted by opponent's effects"));
 
-                        IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                        {
-                            bool CardEffectCondition(ICardEffect cardEffect)
-                            {
-                                return CardEffectCommons.IsOpponentEffect(cardEffect, card);
-                            }
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToHand(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            cardEffectCondition: CardEffectCondition,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass,
+                            effectName: "Can't return to hand by opponent's effects"));
 
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotBeDeletedByEffect(
-                                targetPermanent: card.PermanentOfThisCard(),
-                                cardEffectCondition: CardEffectCondition,
-                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                                activateClass: activateClass,
-                                effectName: "Can't be deleted by opponent's effects"));
-
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToHand(
-                                targetPermanent: card.PermanentOfThisCard(),
-                                cardEffectCondition: CardEffectCondition,
-                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                                activateClass: activateClass,
-                                effectName: "Can't return to hand by opponent's effects"));
-
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToDeck(
-                                targetPermanent: card.PermanentOfThisCard(),
-                                cardEffectCondition: CardEffectCondition,
-                                effectDuration: EffectDuration.UntilOpponentTurnEnd,
-                                activateClass: activateClass,
-                                effectName: "Can't return to deck by opponent's effects"));
-                        }
-                    
+                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.GainCanNotReturnToDeck(
+                            targetPermanent: card.PermanentOfThisCard(),
+                            cardEffectCondition: CardEffectCondition,
+                            effectDuration: EffectDuration.UntilOpponentTurnEnd,
+                            activateClass: activateClass,
+                            effectName: "Can't return to deck by opponent's effects"));
+                    }
                 }
             }
 
@@ -203,10 +172,7 @@ namespace DCGO.CardEffects.ST17
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
-                        {
-                            return true;
-                        }
+                        return true;
                     }
 
                     return false;
@@ -261,34 +227,7 @@ namespace DCGO.CardEffects.ST17
                         }
                     }
 
-                    ActivateClass activateClass1 = new ActivateClass();
-                    activateClass1.SetUpICardEffect("Can't be deleted and can't return to hand or deck by opponent's effect", CanUseCondition, card);
-                    activateClass1.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, null);
-                    activateClass1.SetHashString("GainEffect_ST17_07");
-                    cardEffects.Add(activateClass1);
-
-                    bool CanUseCondition(Hashtable hashtable)
-                    {
-                        if (CardEffectCommons.IsExistOnBattleArea(card))
-                        {
-                            if (CardEffectCommons.IsOwnerTurn(card))
-                            {
-                                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Green) && permanent.IsTamer))
-                                {
-                                    return true;
-                                }
-                            }
-                        }
-
-                        return false;
-                    }
-
-                    bool CanActivateCondition(Hashtable hashtable)
-                    {
-                        return CardEffectCommons.IsExistOnBattleArea(card);
-                    }
-
-                    IEnumerator ActivateCoroutine(Hashtable _hashtable)
+                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Green) && permanent.IsTamer))
                     {
                         bool CardEffectCondition(ICardEffect cardEffect)
                         {
@@ -316,7 +255,6 @@ namespace DCGO.CardEffects.ST17
                             activateClass: activateClass,
                             effectName: "Can't return to deck by opponent's effects"));
                     }
-
                 }
             }
 

+ 0 - 1
Assets/Editor/CsvLoader_CardEntity.cs

@@ -8,7 +8,6 @@ using UnityEditor;
 using UnityEngine;
 using System.Linq;
 using System;
-using Codice.Client.Commands;
 
 [CustomEditor(typeof(LoadCSV_CardEntity))]
 public class CsvLoader_CardEntity : Editor

+ 3 - 3
Assets/Image/Background_home1.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 4096
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 10
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/Confused_01_00.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 1024
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/Confused_01_01.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 1024
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/Confused_01_02.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 1024
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/Confused_01_03.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 1024
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/DigiXrosAnim1.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 1024
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/DigiXrosAnim2.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 1024
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/UI/claw.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 2048
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/UI/titleLogo5.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 4096
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/burst/light0.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 4096
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/burst/light1.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 4096
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/burst/light2.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 4096
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/burst/light3.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 4096
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 3 - 3
Assets/Image/burst/light4.png.meta

@@ -79,14 +79,14 @@ TextureImporter:
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3
     buildTarget: Standalone
-    maxTextureSize: 8192
+    maxTextureSize: 4096
     resizeAlgorithm: 0
-    textureFormat: -1
+    textureFormat: 12
     textureCompression: 1
     compressionQuality: 50
     crunchedCompression: 0
     allowsAlphaSplitting: 0
-    overridden: 0
+    overridden: 1
     androidETC2FallbackOverride: 0
     forceMaximumCompressionQuality_BC6H_BC7: 0
   - serializedVersion: 3

+ 2 - 2
Assets/RenderTexture/breakCard_cardSource.renderTexture

@@ -14,8 +14,8 @@ RenderTexture:
   m_DownscaleFallback: 0
   m_IsAlphaChannelOptional: 0
   serializedVersion: 5
-  m_Width: 256
-  m_Height: 256
+  m_Width: 1024
+  m_Height: 1024
   m_AntiAliasing: 1
   m_MipCount: -1
   m_DepthStencilFormat: 94

+ 2 - 2
Assets/RenderTexture/breakCard_permanent.renderTexture

@@ -14,8 +14,8 @@ RenderTexture:
   m_DownscaleFallback: 0
   m_IsAlphaChannelOptional: 0
   serializedVersion: 5
-  m_Width: 256
-  m_Height: 256
+  m_Width: 1024
+  m_Height: 1024
   m_AntiAliasing: 1
   m_MipCount: -1
   m_DepthStencilFormat: 94

+ 2 - 2
Assets/RenderTexture/particle_DNA_Blue.renderTexture

@@ -14,8 +14,8 @@ RenderTexture:
   m_DownscaleFallback: 0
   m_IsAlphaChannelOptional: 0
   serializedVersion: 5
-  m_Width: 512
-  m_Height: 512
+  m_Width: 1024
+  m_Height: 1024
   m_AntiAliasing: 1
   m_MipCount: -1
   m_DepthStencilFormat: 94

+ 2 - 2
Assets/RenderTexture/particle_DNA_Red.renderTexture

@@ -14,8 +14,8 @@ RenderTexture:
   m_DownscaleFallback: 0
   m_IsAlphaChannelOptional: 0
   serializedVersion: 5
-  m_Width: 512
-  m_Height: 512
+  m_Width: 1024
+  m_Height: 1024
   m_AntiAliasing: 1
   m_MipCount: -1
   m_DepthStencilFormat: 94

+ 2 - 2
Assets/RenderTexture/particle_battle.renderTexture

@@ -14,8 +14,8 @@ RenderTexture:
   m_DownscaleFallback: 0
   m_IsAlphaChannelOptional: 0
   serializedVersion: 5
-  m_Width: 256
-  m_Height: 256
+  m_Width: 1024
+  m_Height: 1024
   m_AntiAliasing: 1
   m_MipCount: -1
   m_DepthStencilFormat: 94

+ 2 - 2
Assets/RenderTexture/particle_opening.renderTexture

@@ -14,8 +14,8 @@ RenderTexture:
   m_DownscaleFallback: 0
   m_IsAlphaChannelOptional: 0
   serializedVersion: 5
-  m_Width: 256
-  m_Height: 256
+  m_Width: 1024
+  m_Height: 1024
   m_AntiAliasing: 2
   m_MipCount: -1
   m_DepthStencilFormat: 94

+ 114 - 120
Assets/Scenes/Opening.unity

@@ -43210,33 +43210,27 @@ MonoBehaviour:
   _anim: {fileID: 1049396037}
   _verText: {fileID: 1512034762}
   _localizeTMPro: {fileID: 1232193649}
-  _text_ENG: "Updates:\r\n\t- BT15 cards added\r\n\t- LM cards added\r\n\t- ST17
-    added\r\n\t- DigiEgg cards will now return to DigiEgg deck instead of security
-    or hand\r\n\t- Unblockable added to a card details panel\r\n\t- Changed how checking
-    for the max of DP/Cost is done\r\n\t- Large variety of card bugs fixed (BT1-BT14,
-    EX1-EX5, ST1-ST16, RB1)\n\t- \rUpdated Banlist, Fixed Numemon X, Fixed Apocalymon\n\t-
-    Fixed rule process for inherited [On Deletion] effects activating\n\t- Updated
-    DCGO logo (higher quality)\r\n\t- Added new game play settings:\r\n\t\t- Automatically
-    determine the order in which effects are exerted\r\n\t\t- Automatically determine
-    the order in which revealed cards are placed at \n\t\t   the bottom of the deck\r\n\t\t-
-    Automatically determines the order in which revealed cards are placed on \n\t\t  
-    the top of the deck\r\n\t\t- Automatic selection of the lowest digivolving cost\r\n\t\t-
-    Automatic selection of the highest number of cards\r\n\t\t- automatic hatch in
-    breeding phase\r\n\t- Removed some game play settings:\r\n\t\t- Automate some
-    of the selections\r\n\r\nKnown Issues:\r\n\t- Dragomon (EX5-060) - If the digimon
-    played by opponent is deleted between trigger\n\t   and activation of all turns
-    effect, all turns effect does not activate.\r\n\t- Takato Matsuki (EX2-056) -
-    When attempting to suspend it after you delete something\n                  
-    that deletes your Guil/Growl/Gallant it seems to cause a game freeze.\r\n\t-
-    Fanglongmon (EX5-074) - Protection doesn't work against Digimon effects when
-    using\n\t   a tamer effect to trigger such as Hina Kurihara (EX3-065).\r\n\t-
-    Effects that trigger at [End Of Turn] will activate AFTER an attack that is declared\n\t  
-    During [End Of Turn], when they should activate BEFORE the attack.\n\t   (see
-    Arresterdramon: Superior Mode)\r\n\t- Not all effects are listed under the Digimons
-    detail panel. Effects that are include\n\t   (keywords, DP +/-, security +/-,
-    skills gained). \r\n\t- Effects listed under the Digimon details panel do not
-    consider any conditions of the\n\t   effect, just that it exists. (see Aldamon(BT7-014)
-    ESS)."
+  _text_ENG: "Updates:\r\n\t- Revelation of Light (BT15) Fixed issue where effect
+    was not placing to top of security\r\n\t- Crimson Flare (BT11) Fixed on deletion
+    effect (from ESS) will trigger properly.\r\n\t- Mother D-Reaper (EX2) Fixed issue
+    where it was able to block unblockable Digimon.\r\n\t- Fixed issue where player
+    effects preventing returning to hand/deck would not resolve.\r\n\t- Piercing
+    now properly does not trigger after Barrier is used.\r\n\t- Updated scripting
+    backend for better runtime results.\r\n\r\nKnown Issues:\r\n\t- Fanglongmon (EX5)
+    digimon effects from Secuirty or other sources not working.\r\n\t- Dragomon (EX5)
+    - Timing issue if digimon played by effect is deleted before all turns\r\n\t 
+    effect activates.\r\n\t- Quantumon (LM) Awaiting ruling for being immune to its
+    own ESS effects.\r\n\t- Giant Missile (ST17) Game freezes when attempting to
+    put a card to bottom of deck\r\n\t  when deck size is 0.\r\n\t- Magnadramon (BT15)
+    All Turns effect does not trigger.\r\n\t- Rapidmon (ST17-07) Some instances of
+    protection being granted without a green\r\n\t  tamer.\r\n\t- Gizmon AT (BT13)
+    Delete to reduce play cost is not optional\r\n\t- Shu-Chong Wong (EX2) Start
+    of turn effect will not draw a card if you are at 10\r\n\t  memory.\r\n\t- Lunamon
+    (EX5) does not allow you to digivolve when you play the proper tamer.\r\n\t-
+    Some cards with alliance do not show up in search, when searching for \"Alliance\".\r\n\t-
+    Dedigivolve to tamer during security battle will still proceed with battle.\r\n\t-
+    Piercing does trigger after Barrier is used.\r\n\t- Some card effects do not
+    show up in a cards details, mainly effects granted by other\r\n\t  cards.\r"
   _text_JPN: 
   _scroll: {fileID: 1566222603}
 --- !u!224 &1049396036
@@ -65931,7 +65925,7 @@ MonoBehaviour:
   m_Vertical: 1
   m_MovementType: 2
   m_Elasticity: 0.1
-  m_Inertia: 1
+  m_Inertia: 0
   m_DecelerationRate: 0.135
   m_ScrollSensitivity: 100
   m_Viewport: {fileID: 889398605}
@@ -85766,97 +85760,6 @@ ParticleSystem:
   m_CorrespondingSourceObject: {fileID: 198618510969473888, guid: 64a6cbeea983a514b99bd6020afe62b6, type: 3}
   m_PrefabInstance: {fileID: 438718058}
   m_PrefabAsset: {fileID: 0}
---- !u!21 &1959998981
-Material:
-  serializedVersion: 8
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_Name: Shapes2D Material
-  m_Shader: {fileID: 4800000, guid: 44f74e30da9814584b2fdcdbe799e51a, type: 3}
-  m_ValidKeywords:
-  - FILL_SOLID_COLOR
-  - RECTANGLE
-  m_InvalidKeywords:
-  - _EMISSION
-  m_LightmapFlags: 1
-  m_EnableInstancingVariants: 0
-  m_DoubleSidedGI: 0
-  m_CustomRenderQueue: 3000
-  stringTagMap: {}
-  disabledShaderPasses: []
-  m_SavedProperties:
-    serializedVersion: 3
-    m_TexEnvs:
-    - _BumpMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _DetailAlbedoMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _DetailMask:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _DetailNormalMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _EmissionMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _MainTex:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _MetallicGlossMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _OcclusionMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    - _ParallaxMap:
-        m_Texture: {fileID: 0}
-        m_Scale: {x: 1, y: 1}
-        m_Offset: {x: 0, y: 0}
-    m_Ints: []
-    m_Floats:
-    - _BumpScale: 1
-    - _ColorMask: 15
-    - _Cutoff: 0.5
-    - _DetailNormalMapScale: 1
-    - _DstBlend: 0
-    - _GlossMapScale: 1
-    - _Glossiness: 0.5
-    - _GlossyReflections: 1
-    - _Metallic: 0
-    - _Mode: 0
-    - _OcclusionStrength: 1
-    - _Parallax: 0.02
-    - _Shapes2D_DstAlpha: 1
-    - _Shapes2D_DstBlend: 10
-    - _Shapes2D_SrcAlpha: 1
-    - _Shapes2D_SrcBlend: 1
-    - _SmoothnessTextureChannel: 0
-    - _SpecularHighlights: 1
-    - _SrcBlend: 1
-    - _Stencil: 0
-    - _StencilComp: 8
-    - _StencilOp: 0
-    - _StencilReadMask: 255
-    - _StencilWriteMask: 255
-    - _UVSec: 0
-    - _ZWrite: 1
-    m_Colors:
-    - _Color: {r: 1, g: 1, b: 1, a: 1}
-    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
-  m_BuildTextureStacks: []
 --- !u!1 &1962182280
 GameObject:
   m_ObjectHideFlags: 0
@@ -90599,6 +90502,97 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 2062587030}
   m_CullTransparentMesh: 1
+--- !u!21 &2064281896
+Material:
+  serializedVersion: 8
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_Name: Shapes2D Material
+  m_Shader: {fileID: 4800000, guid: 44f74e30da9814584b2fdcdbe799e51a, type: 3}
+  m_ValidKeywords:
+  - FILL_SOLID_COLOR
+  - RECTANGLE
+  m_InvalidKeywords:
+  - _EMISSION
+  m_LightmapFlags: 1
+  m_EnableInstancingVariants: 0
+  m_DoubleSidedGI: 0
+  m_CustomRenderQueue: 3000
+  stringTagMap: {}
+  disabledShaderPasses: []
+  m_SavedProperties:
+    serializedVersion: 3
+    m_TexEnvs:
+    - _BumpMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailAlbedoMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailMask:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _DetailNormalMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _EmissionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MainTex:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _MetallicGlossMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _OcclusionMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    - _ParallaxMap:
+        m_Texture: {fileID: 0}
+        m_Scale: {x: 1, y: 1}
+        m_Offset: {x: 0, y: 0}
+    m_Ints: []
+    m_Floats:
+    - _BumpScale: 1
+    - _ColorMask: 15
+    - _Cutoff: 0.5
+    - _DetailNormalMapScale: 1
+    - _DstBlend: 0
+    - _GlossMapScale: 1
+    - _Glossiness: 0.5
+    - _GlossyReflections: 1
+    - _Metallic: 0
+    - _Mode: 0
+    - _OcclusionStrength: 1
+    - _Parallax: 0.02
+    - _Shapes2D_DstAlpha: 1
+    - _Shapes2D_DstBlend: 10
+    - _Shapes2D_SrcAlpha: 1
+    - _Shapes2D_SrcBlend: 1
+    - _SmoothnessTextureChannel: 0
+    - _SpecularHighlights: 1
+    - _SrcBlend: 1
+    - _Stencil: 0
+    - _StencilComp: 8
+    - _StencilOp: 0
+    - _StencilReadMask: 255
+    - _StencilWriteMask: 255
+    - _UVSec: 0
+    - _ZWrite: 1
+    m_Colors:
+    - _Color: {r: 1, g: 1, b: 1, a: 1}
+    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
+  m_BuildTextureStacks: []
 --- !u!1 &2066844762
 GameObject:
   m_ObjectHideFlags: 0
@@ -108254,7 +108248,7 @@ MonoBehaviour:
   m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
   m_Name: 
   m_EditorClassIdentifier: 
-  m_Material: {fileID: 1959998981}
+  m_Material: {fileID: 2064281896}
   m_Color: {r: 1, g: 1, b: 1, a: 1}
   m_RaycastTarget: 1
   m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}

+ 5 - 10
Assets/Scripts/CardController.cs

@@ -1237,6 +1237,11 @@ public class PlayPermanentClass
                     yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateFieldPermanentCardEffect(permanent.ShowingPermanentCard, isDigiXros: false, jogressEvoRoots: evoRootTops.ToArray()));
 
                     yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(evoRootTops, "DNA Digivolution Cards", true, true));
+
+                    foreach (CardSource evolutionCard in permanent.DigivolutionCards)
+                    {
+                        evolutionCard.cEntity_EffectController.InitUseCountThisTurn();
+                    }
                 }
             }
 
@@ -2500,7 +2505,6 @@ public class IPutSecurityPermanent
     {
         if (_permanent == null) yield break;
         if (_permanent.TopCard == null) yield break;
-
         ICardEffect cardEffect = CardEffectCommons.GetCardEffectFromHashtable(_hashtable);
 
         if (_permanent.TopCard.CanNotBeAffected(cardEffect) || !_permanent.TopCard.Owner.CanAddSecurity(cardEffect)) yield break;
@@ -2531,7 +2535,6 @@ public class IPutSecurityPermanent
 
         CardSource topCard = _permanent.TopCard;
         if (topCard == null) yield break;
-
         #region add log
         string log = "";
 
@@ -2561,7 +2564,6 @@ public class IPutSecurityPermanent
 
         #region place permanent to security
         yield return ContinuousController.instance.StartCoroutine(_permanent.DiscardEvoRoots());
-
         yield return ContinuousController.instance.StartCoroutine(CardObjectController.RemoveField(_permanent));
 
         if (!topCard.IsToken)
@@ -2577,16 +2579,13 @@ public class IPutSecurityPermanent
                 }
 
                 yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().CreateRecoveryEffect(topCard.Owner));
-
                 yield return ContinuousController.instance.StartCoroutine(new IAddSecurity(topCard.Owner).AddSecurity());
             }
             else
             {
                 yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(new List<CardSource>() { topCard }));
             }
-            
         }
-
         #endregion
     }
 }
@@ -3525,7 +3524,6 @@ public class IBattle
                 {
                     if(permanent.TopCard != null)
                     {
-                        Debug.Log($"LoserPermanents: {LoserPermanents[0]}, {LoserPermanents[0].TopCard.name}");
                         index = LoserPermanents.IndexOf(permanent);
                     }
                 }
@@ -3535,13 +3533,10 @@ public class IBattle
                     LoserPermanents.RemoveAt(index);
                     _LoserPermanents.RemoveAt(index);
 
-                    Debug.Log($"LoserPermanents: {LoserPermanents.Count}, {LoserPermanents.Count}");
                     hashtable["LoserPermanents"] = _LoserPermanents;
                     hashtable["LoserPermanents_real"] = LoserPermanents;
                 }
 
-                
-
                 // "At the end of battle" effect
                 yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.StackSkillInfos(hashtable, EffectTiming.OnEndBattle));
 

+ 5 - 2
Assets/Scripts/CardEffectCommons/GameContextDeterminarion.cs

@@ -9,9 +9,12 @@ public partial class CardEffectCommons
     #region Whether the card is in the field
     public static bool IsExistOnField(CardSource card)
     {
-        if (card.PermanentOfThisCard() != null)
+        if(card != null)
         {
-            return true;
+            if (card.PermanentOfThisCard() != null)
+            {
+                return true;
+            }
         }
 
         return false;

+ 15 - 6
Assets/Scripts/CardEffectCommons/MinMax_DP_Cost_Level/Cost/IsMaxCost.cs

@@ -14,14 +14,23 @@ public partial class CardEffectCommons
         if (permanent.TopCard.Owner != owner) return false;
         if (!IsPermanentExistsOnOwnerBattleArea(permanent, permanent.TopCard)) return false;
         if (!permanent.IsDigimon && !permanent.IsTamer) return false;
-        //if (IsDigimonOnly && permanent.IsTamer) return false;
         if (!permanent.TopCard.HasPlayCost) return false;
 
-        List<int> costs = permanent.TopCard.Owner.GetBattleAreaPermanents().Filter(permanent1 =>
-            (permanent1.IsDigimon || permanent1.IsTamer)
-            && (!IsDigimonOnly || !permanent1.IsTamer)
-            && permanent1.TopCard.HasPlayCost)
-            .Map(permanent1 => permanent1.TopCard.GetCostItself);
+        List<Permanent> permanents = permanent.TopCard.Owner.GetBattleAreaPermanents();
+        List<int> costs = new List<int>();
+
+        if (IsDigimonOnly)
+        {
+            costs = permanent.TopCard.Owner.GetBattleAreaPermanents().Filter(permanent1 =>
+                permanent1.IsDigimon && permanent1.TopCard.HasPlayCost)
+                .Map(permanent1 => permanent1.TopCard.GetCostItself);
+        }
+        else
+        {
+            costs = permanent.TopCard.Owner.GetBattleAreaPermanents().Filter(permanent1 =>
+                (permanent1.IsDigimon || permanent1.IsTamer) && permanent1.TopCard.HasPlayCost)
+                .Map(permanent1 => permanent1.TopCard.GetCostItself);
+        }
 
         return costs.Count >= 1 && permanent.TopCard.GetCostItself == costs.Max();
     }

+ 15 - 6
Assets/Scripts/CardEffectCommons/MinMax_DP_Cost_Level/Cost/IsMinCost.cs

@@ -14,14 +14,23 @@ public partial class CardEffectCommons
         if (permanent.TopCard.Owner != owner) return false;
         if (!IsPermanentExistsOnOwnerBattleArea(permanent, permanent.TopCard)) return false;
         if (!permanent.IsDigimon && !permanent.IsTamer) return false;
-        if (IsDigimonOnly && permanent.IsTamer) return false;
         if (!permanent.TopCard.HasPlayCost) return false;
 
-        List<int> costs = permanent.TopCard.Owner.GetBattleAreaPermanents().Filter(permanent1 =>
-            (permanent1.IsDigimon || permanent1.IsTamer)
-            && (!IsDigimonOnly || !permanent1.IsTamer)
-            && permanent1.TopCard.HasPlayCost)
-            .Map(permanent1 => permanent1.TopCard.GetCostItself);
+        List<Permanent> permanents = permanent.TopCard.Owner.GetBattleAreaPermanents();
+        List<int> costs = new List<int>();
+
+        if (IsDigimonOnly)
+        {
+            costs = permanent.TopCard.Owner.GetBattleAreaPermanents().Filter(permanent1 =>
+                permanent1.IsDigimon && permanent1.TopCard.HasPlayCost)
+                .Map(permanent1 => permanent1.TopCard.GetCostItself);
+        }
+        else
+        {
+            costs = permanent.TopCard.Owner.GetBattleAreaPermanents().Filter(permanent1 =>
+                (permanent1.IsDigimon || permanent1.IsTamer) && permanent1.TopCard.HasPlayCost)
+                .Map(permanent1 => permanent1.TopCard.GetCostItself);
+        }
 
         return costs.Count >= 1 && permanent.TopCard.GetCostItself == costs.Min();
     }

+ 2 - 2
Assets/Scripts/CardEffectCommons/MinMax_DP_Cost_Level/DP/IsMinDP.cs

@@ -13,10 +13,10 @@ public partial class CardEffectCommons
         if (permanent.TopCard == null) return false;
         if (permanent.TopCard.Owner != owner) return false;
         if (!IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, permanent.TopCard)) return false;
-        if (!permanent.TopCard.HasDP) return false;
+        if (!permanent.TopCard.HasDP && (permanent.BaseDP <= 0)) return false;
 
         List<int> DPs = permanent.TopCard.Owner.GetBattleAreaDigimons()
-            .Filter(permanent1 => permanent1.TopCard.HasDP)
+            .Filter(permanent1 => permanent1.TopCard.HasDP || (permanent1.BaseDP > 0))
             .Map(permanent1 => permanent1.DP);
 
         return DPs.Count >= 1 && permanent.DP == DPs.Min();

+ 2 - 5
Assets/Scripts/CardEffectFactory/CanNotBlock.cs

@@ -98,12 +98,9 @@ public partial class CardEffectFactory
         {
             if (CardEffectCommons.IsPermanentExistsOnBattleArea(defender))
             {
-                if (!defender.TopCard.CanNotBeAffected(cannotBlockClass))
+                if (defenderCondition == null || defenderCondition(defender))
                 {
-                    if (defenderCondition == null || defenderCondition(defender))
-                    {
-                        return true;
-                    }
+                    return true;
                 }
             }
 

+ 0 - 5
Assets/Scripts/ICardEffect.cs

@@ -406,11 +406,6 @@ public abstract class ICardEffect
     public void SetIsInheritedEffect(bool isInheritatedEffect)
     {
         IsInheritedEffect = isInheritatedEffect;
-
-        if(IsInheritedEffect)
-        {
-            SetEffectSourcePermanent(_effectSourceCard.PermanentOfThisCard());
-        }
     }
     #endregion
 

+ 5 - 6
Assets/Scripts/MultipleSkills.cs

@@ -111,10 +111,8 @@ public class MultipleSkills : MonoBehaviourPunCallbacks
                     }
                 }
                 #endregion
-            }
 
-            foreach (SkillInfo skillInfo in StackedSkillInfos)
-            {
+                #region Check if the effect can be activated
                 if (!skillInfo.CardEffect.CanActivate(skillInfo.Hashtable))
                 {
                     //Debug.Log($"{skillInfo.CardEffect.EffectName} Can't Activate");
@@ -144,6 +142,7 @@ public class MultipleSkills : MonoBehaviourPunCallbacks
                 }
 
                 skillInfos_active.Add(skillInfo);
+                #endregion
             }
 
             skillInfos_active = skillInfos_active.Filter(skillInfo => skillInfo != null && skillInfo.CardEffect != null
@@ -339,7 +338,7 @@ public class MultipleSkills : MonoBehaviourPunCallbacks
                     {
                         if (cardEffect.CanActivate(hashtable))
                         {
-                            // 割り込み処理なら
+                            // For interrupt processing
                             if (IsCutinEffect(CheckNewTriggredSkill_mainStack))
                             {
                                 // GManager.instance.autoProcessing.AddCutinEffect(cardEffect);
@@ -368,7 +367,7 @@ public class MultipleSkills : MonoBehaviourPunCallbacks
                 }
                 #endregion
 
-                //ルール処理
+                //Rule processing
                 yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.RuleProcess());
 
                 if (GManager.instance.turnStateMachine.endGame)
@@ -376,7 +375,7 @@ public class MultipleSkills : MonoBehaviourPunCallbacks
                     yield break;
                 }
 
-                #region 新しく誘発した効果があればそちらを先に解決
+                #region If there are any newly triggered effects, resolve those first.
                 if (!CheckNewTriggredSkill_mainStack)
                 {
                     yield return ContinuousController.instance.StartCoroutine(_autoProcessing.TriggeredSkillProcess(CheckNewTriggredSkill_mainStack, skipCondition));

+ 35 - 13
Assets/Scripts/Permanent.cs

@@ -436,7 +436,7 @@ public class Permanent
     }
     #endregion
 
-    #region DPマイナス効果を受けないか
+    #region Will it not receive negative DP effect?
     public bool ImmuneFromDPMinus(ICardEffect cardEffect)
     {
         foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
@@ -457,10 +457,7 @@ public class Permanent
                     }
                 }
             }
-        }
 
-        foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
-        {
             foreach (ICardEffect cardEffect1 in player.EffectList(EffectTiming.None))
             {
                 if (cardEffect1 is IImmuneFromDPMinusEffect)
@@ -480,7 +477,7 @@ public class Permanent
     }
     #endregion
 
-    #region 手札に戻らないか
+    #region Can be returned to your hand?
     public bool CannotReturnToHand(ICardEffect cardEffect)
     {
         foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
@@ -500,6 +497,20 @@ public class Permanent
                         }
                     }
                 }
+
+                foreach (ICardEffect cardEffect1 in player.EffectList(EffectTiming.None))
+                {
+                    if (cardEffect1 is ICannotReturnToHandEffect)
+                    {
+                        if (cardEffect1.CanUse(null))
+                        {
+                            if (((ICannotReturnToHandEffect)cardEffect1).CannotReturnToHand(this, cardEffect))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                }
             }
         }
 
@@ -507,7 +518,7 @@ public class Permanent
     }
     #endregion
 
-    #region 山札に戻らないか
+    #region Can be returned to deck?
     public bool CannotReturnToLibrary(ICardEffect cardEffect)
     {
         foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
@@ -527,6 +538,20 @@ public class Permanent
                         }
                     }
                 }
+
+                foreach (ICardEffect cardEffect1 in player.EffectList(EffectTiming.None))
+                {
+                    if (cardEffect1 is ICannotReturnToLibraryEffect)
+                    {
+                        if (cardEffect1.CanUse(null))
+                        {
+                            if (((ICannotReturnToLibraryEffect)cardEffect1).CannotReturnToLibrary(this, cardEffect))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                }
             }
         }
 
@@ -1416,9 +1441,9 @@ public class Permanent
             }
         }
 
-        #region 「ブロックできない」効果
+        #region "Unblockable" effect
 
-        #region 場のパーマネントの効果
+        #region Effects of permanents in play
         foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
         {
             foreach (Permanent permanent in player.GetFieldPermanents())
@@ -1431,10 +1456,7 @@ public class Permanent
                         {
                             if (((ICannotBlockEffect)cardEffect).CannotBlock(AttackingPermanent, this))
                             {
-                                if (!TopCard.CanNotBeAffected(cardEffect))
-                                {
-                                    return false;
-                                }
+                                return false;
                             }
                         }
                     }
@@ -1443,7 +1465,7 @@ public class Permanent
         }
         #endregion
 
-        #region プレイヤーの効果
+        #region player effect
         foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players)
         {
             foreach (ICardEffect cardEffect in player.EffectList(EffectTiming.None))

+ 1 - 1
Assets/Scripts/Player.cs

@@ -765,7 +765,7 @@ public class Player : MonoBehaviour
 
     #region プレイヤーに掛かっている効果
 
-    #region プレイヤーに掛かっている全ての効果
+    #region All effects on the player
     public List<ICardEffect> EffectList(EffectTiming timing)
     {
         List<ICardEffect> PlayerEffects = new List<ICardEffect>();

+ 28 - 23
Assets/Scripts/ResultObject.cs

@@ -49,7 +49,7 @@ public class ResultObject : MonoBehaviour
             }
         }
 
-        else
+        else if (Winner != null)
         {
             ContinuousController.instance.PlaySE(GManager.instance.LoseSE);
 
@@ -63,37 +63,42 @@ public class ResultObject : MonoBehaviour
                     ResultText.text = "You have surrendered.";
                 }
             }
+        }
+        else
+        {
+            WinImage.gameObject.SetActive(false);
+            LoseImage.gameObject.SetActive(true);
 
-            else
-            {
-                bool isDisconnected = true;
+            bool isDisconnected = true;
 
-                if (PhotonNetwork.IsConnected)
+            if (PhotonNetwork.IsConnected)
+            {
+                if (PhotonNetwork.PlayerList.Length == 2)
                 {
-                    if (PhotonNetwork.PlayerList.Length == 2)
-                    {
-                        isDisconnected = false;
-                    }
-
-                    if (GManager.instance.IsAI)
-                    {
-                        isDisconnected = false;
-                    }
+                    isDisconnected = false;
                 }
 
-                if (isDisconnected)
+                if (GManager.instance.IsAI)
                 {
-                    log += $"\nDisconnected";
-
-                    ResultText.text = "Disconnected.";
+                    isDisconnected = false;
                 }
 
-                else
-                {
-                    log += $"\nDraw";
+                WinImage.gameObject.SetActive(true);
+                LoseImage.gameObject.SetActive(false);
+            }
 
-                    ResultText.text = "Draw.";
-                }
+            if (isDisconnected)
+            {
+                log += $"\nDisconnected";
+
+                ResultText.text = "Disconnected.";
+            }
+
+            else
+            {
+                log += $"\nDraw";
+
+                ResultText.text = "Draw.";
             }
         }
 

+ 17 - 17
Assets/Scripts/TurnStateMachine.cs

@@ -30,7 +30,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
     public int TurnCount { get; set; } = 0;
     public bool isSecurityCehck { get; set; } = false;
 
-    #region 初期化
+    #region Initialization
 
 
     public IEnumerator Init()
@@ -297,7 +297,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
     }
     #endregion
 
-    #region ターンの進行を管理
+    #region Manage turn progress
     public IEnumerator GameStateMachine()
     {
         yield return StartCoroutine(StartGame());
@@ -334,7 +334,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
     }
     #endregion
 
-    #region ゲーム開始時
+    #region At the start of the game
     public bool DoneStartGame { get; set; } = false;
 
     bool _isRedraw = false;
@@ -822,12 +822,12 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
             goto EndMainPhase;
         }
 
-        #region ログ追加
+        #region Add log
         GManager.instance.playLog.AddLogString($"\nMain Phase:\n{gameContext.TurnPlayer.PlayerName}\n");
 
         #endregion
 
-        #region 手札のカードと場のカードの選択状態をリセット
+        #region Reset the selection status of cards in your hand and cards on the field.
         OffHandCardTarget(gameContext.TurnPlayer);
         OffFieldCardTarget(gameContext.TurnPlayer);
         #endregion
@@ -841,10 +841,10 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
 
         yield return new WaitWhile(() => !GManager.instance.showPhaseNotificationObject.isClose);
 
-        // メインフェイズ開始時の効果
+        // Effects at the start of main phase
         yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.StackSkillInfos(null, EffectTiming.OnStartMainPhase));
 
-        // 自動処理チェックタイミング
+        // Automatic processing check timing
         yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.AutoProcessCheck());
 
         isSync = false;
@@ -878,7 +878,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
             return false;
         }
 
-        #region ターンプレイヤーが選択できるまで繰り返し
+        #region Repeat until turn player selects
         while (!endGame)
         {
             yield return GManager.instance.photonWaitController.StartWait("SetHandCardPlayablity");
@@ -1206,7 +1206,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
 
     EndMainPhase:;
 
-        #region メインフェイズ終了
+        #region Main phase ends
         GManager.instance.selectCommandPanel.CloseSelectCommandPanel();
         GManager.instance.commandText.CloseCommandText();
 
@@ -1234,19 +1234,19 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
         ResetMainPhaseParameter();
         #endregion
 
-        //自動処理チェックタイミング
+        //Automatic processing check timing
         yield return ContinuousController.instance.StartCoroutine(GManager.instance.autoProcessing.AutoProcessCheck());
 
         //ターン終了
 
-        #region パラメータリセット
+        #region Parameter reset
         void ResetMainPhaseParameter()
         {
             GManager.instance.OffTargetArrow();
 
             GManager.instance.memoryObject.OffMemoryPredictionLine();
 
-            #region 手札のカードと場のカードと枠の表示をリセット
+            #region Reset the display of cards in hand, cards on the field, and frames
             foreach (Player player in gameContext.Players)
             {
                 foreach (FieldCardFrame fieldCardFrame in player.fieldCardFrames)
@@ -1276,7 +1276,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
             }
             #endregion
 
-            #region 手札と場のカードをリセット
+            #region Reset cards in hand and field
             OffHandCardTarget(gameContext.TurnPlayer);
             OffFieldCardTarget(gameContext.TurnPlayer);
 
@@ -2960,7 +2960,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
     }
     #endregion
 
-    #region 起動効果パーマネント決定
+    #region Activation effect permanent determination
     [PunRPC]
     public void SetActSkill(int permanentIndex, int skillIndex)
     {
@@ -2973,7 +2973,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
     }
     #endregion
 
-    #region 起動効果カード決定
+    #region Activation effect card determination
     [PunRPC]
     public void SetActCardSkill(int cardIndex, int skillIndex)
     {
@@ -2986,7 +2986,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
     }
     #endregion
 
-    #region プレイカード決定
+    #region Play card decision
     [PunRPC]
     public void SetPlayCard(int cardIndex, int TargetFrameID, int[] JogressEvoRootsFrameIDs, int BurstTamerFrameID)
     {
@@ -3010,7 +3010,7 @@ public class TurnStateMachine : MonoBehaviourPunCallbacks
     }
     #endregion
 
-    #region 攻撃パーマネント決定
+    #region Attack permanent determination
     [PunRPC]
     public void SetAttackingPermaent(int permanentIndex, int attackTargetPermanentIndex)
     {

+ 1 - 2
Packages/manifest.json

@@ -2,14 +2,13 @@
   "dependencies": {
     "com.unity.2d.sprite": "1.0.0",
     "com.unity.cinemachine": "2.8.9",
-    "com.unity.collab-proxy": "1.17.7",
     "com.unity.editorcoroutines": "1.0.0",
     "com.unity.ide.rider": "3.0.16",
     "com.unity.ide.visualstudio": "2.0.22",
     "com.unity.ide.vscode": "1.2.5",
     "com.unity.render-pipelines.universal": "12.1.8",
     "com.unity.test-framework": "1.1.31",
-    "com.unity.textmeshpro": "3.0.6",
+    "com.unity.textmeshpro": "3.0.8",
     "com.unity.timeline": "1.6.4",
     "com.unity.ugui": "1.0.0",
     "com.unity.modules.ai": "1.0.0",

+ 1 - 28
Packages/packages-lock.json

@@ -24,15 +24,6 @@
       },
       "url": "https://packages.unity.com"
     },
-    "com.unity.collab-proxy": {
-      "version": "1.17.7",
-      "depth": 0,
-      "source": "registry",
-      "dependencies": {
-        "com.unity.services.core": "1.0.1"
-      },
-      "url": "https://packages.unity.com"
-    },
     "com.unity.editorcoroutines": {
       "version": "1.0.0",
       "depth": 0,
@@ -79,13 +70,6 @@
       "dependencies": {},
       "url": "https://packages.unity.com"
     },
-    "com.unity.nuget.newtonsoft-json": {
-      "version": "3.0.2",
-      "depth": 2,
-      "source": "registry",
-      "dependencies": {},
-      "url": "https://packages.unity.com"
-    },
     "com.unity.render-pipelines.core": {
       "version": "12.1.8",
       "depth": 1,
@@ -114,17 +98,6 @@
       "dependencies": {},
       "url": "https://packages.unity.com"
     },
-    "com.unity.services.core": {
-      "version": "1.6.0",
-      "depth": 1,
-      "source": "registry",
-      "dependencies": {
-        "com.unity.modules.unitywebrequest": "1.0.0",
-        "com.unity.nuget.newtonsoft-json": "3.0.2",
-        "com.unity.modules.androidjni": "1.0.0"
-      },
-      "url": "https://packages.unity.com"
-    },
     "com.unity.shadergraph": {
       "version": "12.1.8",
       "depth": 1,
@@ -146,7 +119,7 @@
       "url": "https://packages.unity.com"
     },
     "com.unity.textmeshpro": {
-      "version": "3.0.6",
+      "version": "3.0.8",
       "depth": 0,
       "source": "registry",
       "dependencies": {

+ 2 - 2
ProjectSettings/ProjectSettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:f1a4bce7eb5eb8a80f76301eca146da5d354aa845a82496707559d6d1ed33e98
-size 23708
+oid sha256:97409fda984614ccfd475ef175bc52f6b676d0e782044f65a78d58ced89a1731
+size 23707

+ 2 - 2
ProjectSettings/QualitySettings.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:69cccbef4bf46d2c0b3e478ed6a30abc9301a58f24723a99c3dde81a5bae675b
-size 3854
+oid sha256:236e5fa7e584ecd52817e9c7f3a16f5601fca40c05ed65cfc62778b99db9adc4
+size 3737

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff