mbunch_kascope 1 år sedan
förälder
incheckning
89458b3eb8
41 ändrade filer med 727 tillägg och 748 borttagningar
  1. 2 2
      Assets/CardBaseEntity/BT19/Green/Digimon/Chamblemon-BT19-046.asset
  2. 2 9
      Assets/CardEffect/BT18/Black/Kozenimon_BT18_005.cs
  3. 26 58
      Assets/CardEffect/BT18/Black/Machinedramon_BT18_073.cs
  4. 168 376
      Assets/CardEffect/BT18/Black/Sephirothmon_BT18_066.cs
  5. 6 9
      Assets/CardEffect/BT18/Black/Snatchmon_BT18_065.cs
  6. 1 1
      Assets/CardEffect/BT18/Green/FunBeemon_BT18_044.cs
  7. 1 1
      Assets/CardEffect/BT18/Green/Pomumon_BT18_045.cs
  8. 2 1
      Assets/CardEffect/BT18/Green/Puroromon_BT18_004.cs
  9. 3 3
      Assets/CardEffect/BT18/Purple/Duskmon_BT18_078.cs
  10. 7 1
      Assets/CardEffect/BT18/Purple/GospeloftheFallenAngel_BT18_100.cs
  11. 38 10
      Assets/CardEffect/BT18/Purple/LordKnightmonAce_BT18_083.cs
  12. 0 1
      Assets/CardEffect/BT18/Purple/LucemonSatanMode_BT18_101.cs
  13. 4 4
      Assets/CardEffect/BT18/Purple/Velgrmon_BT18_079.cs
  14. 3 4
      Assets/CardEffect/BT18/Purple/Zanbamon_BT18_085.cs
  15. 6 14
      Assets/CardEffect/BT18/Red/Deltamon_BT18_013.cs
  16. 2 2
      Assets/CardEffect/BT18/Red/Kimeramon_BT18_015.cs
  17. 177 89
      Assets/CardEffect/BT18/Red/Millenniummon_BT18_019.cs
  18. 64 6
      Assets/CardEffect/BT18/Red/WindtoFlameIcetoSword_BT18_095.cs
  19. 2 9
      Assets/CardEffect/BT18/White/LucemonLarva_BT18_086.cs
  20. 1 0
      Assets/CardEffect/BT18/White/Susanoomon_BT18_102.cs
  21. 1 1
      Assets/CardEffect/BT18/Yellow/DragonsRoar_BT18_098.cs
  22. 2 2
      Assets/CardEffect/BT18/Yellow/Mistymon_BT18_039.cs
  23. 4 3
      Assets/CardEffect/BT18/Yellow/Patamon_BT18_033.cs
  24. 4 4
      Assets/CardEffect/BT19/Black/DarkKnightmon_BT19_063.cs
  25. 13 12
      Assets/CardEffect/BT19/Black/Machinedramon_BT19_065.cs
  26. 3 3
      Assets/CardEffect/BT19/Green/Chamblemon_BT19_046.cs
  27. 31 17
      Assets/CardEffect/BT19/Green/HornetEraser_BT19_096.cs
  28. 4 2
      Assets/CardEffect/BT19/Green/QueenBeemon_BT19_053.cs
  29. 48 15
      Assets/CardEffect/BT19/Purple/LordKnightmonXAntibody_BT19_073.cs
  30. 12 7
      Assets/CardEffect/BT19/Purple/MoonMillenniummon_BT19_075.cs
  31. 15 4
      Assets/CardEffect/BT19/Yellow/DynasmonXAntibody_BT19_042.cs
  32. 1 2
      Assets/CardEffect/BT19/Yellow/Dynasmon_BT19_041.cs
  33. 2 2
      Assets/CardEffect/BT19/Yellow/LucemonXAntibody_BT19_043.cs
  34. 9 13
      Assets/CardEffect/BT19/Yellow/SeventhDivineCruz_BT19_094.cs
  35. 1 1
      Assets/CardEffect/BT19/Yellow/SkullBaluchimon_BT19_039.cs
  36. 16 25
      Assets/CardEffect/BT19/Yellow/Tapirmon_BT19_029.cs
  37. 2 2
      Assets/CardEffect/BT19/Yellow/WizardmonXAntibody_BT19_036.cs
  38. 1 1
      Assets/Scripts/AutoProcessing.cs
  39. 0 14
      Assets/Scripts/CardEffectCommons/KeyWordEffects/Collision.cs
  40. 40 13
      Assets/Scripts/Permanent.cs
  41. 3 5
      Assets/Scripts/PlayLog.cs

+ 2 - 2
Assets/CardBaseEntity/BT19/Green/Digimon/Chamblemon-BT19-046.asset

@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
 version https://git-lfs.github.com/spec/v1
-oid sha256:dfd44de1498d2d0574fcf91d4c6ef2ec37c45af89c44aaf706f68985c0b1b43a
-size 1241
+oid sha256:483e4efefe3a60c452f00d93b018dc4e5188bedee346b6a1f91f0b476aa1fbf2
+size 1244

+ 2 - 9
Assets/CardEffect/BT18/Black/Kozenimon_BT18_005.cs

@@ -14,7 +14,7 @@ namespace DCGO.CardEffects.BT18
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetIsInheritedEffect(true);
                 activateClass.SetIsInheritedEffect(true);
                 activateClass.SetHashString("AllTurns_BT18-005");
                 activateClass.SetHashString("AllTurns_BT18-005");
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
@@ -30,18 +30,11 @@ namespace DCGO.CardEffects.BT18
                     {
                     {
                         bool WinnerCondition(Permanent permanent) => permanent.cardSources.Contains(card);
                         bool WinnerCondition(Permanent permanent) => permanent.cardSources.Contains(card);
                         bool LoserCondition(Permanent permanent) => CardEffectCommons.IsOpponentPermanent(permanent, card);
                         bool LoserCondition(Permanent permanent) => CardEffectCommons.IsOpponentPermanent(permanent, card);
-                        bool LoserRealCondition(Permanent permanent) => permanent.IsDigimon;
 
 
-                        if (CardEffectCommons.CanTriggerWhenDeleteOpponentDigimonByBattle(
-                            hashtable: hashtable,
-                            winnerCondition: WinnerCondition,
-                            loserCondition: LoserCondition,
-                            loserRealCondition: LoserRealCondition,
-                            isOnlyWinnerSurvive: false))
+                        if (CardEffectCommons.CanTriggerWhenDeleteOpponentDigimonByBattle(hashtable: hashtable, winnerCondition: WinnerCondition, loserCondition: LoserCondition, isOnlyWinnerSurvive: false))
                         {
                         {
                             return true;
                             return true;
                         }
                         }
-
                     }
                     }
 
 
                     return false;
                     return false;

+ 26 - 58
Assets/CardEffect/BT18/Black/Machinedramon_BT18_073.cs

@@ -608,7 +608,7 @@ namespace DCGO.CardEffects.BT18
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)
                 {
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
                     {
                         if (CardEffectCommons.IsOpponentTurn(card))
                         if (CardEffectCommons.IsOpponentTurn(card))
                         {
                         {
@@ -627,7 +627,7 @@ namespace DCGO.CardEffects.BT18
 
 
                 bool CanActivateCondition(Hashtable hashtable)
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
                     {
                         if (GManager.instance.attackProcess.IsAttacking)
                         if (GManager.instance.attackProcess.IsAttacking)
                         {
                         {
@@ -643,67 +643,35 @@ namespace DCGO.CardEffects.BT18
 
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                 {
-                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                    {
-                        if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(GManager.instance.attackProcess.AttackingPermanent, card))
-                        {
-                            if (GManager.instance.attackProcess.IsAttacking)
-                            {
-                                if (GManager.instance.attackProcess.AttackingPermanent.CanSwitchAttackTarget)
-                                {
-                                    List<SelectionElement<bool>> selectionElements = new List<SelectionElement<bool>>()
-                        {
-                            new SelectionElement<bool>(message: $"Switch", value : true, spriteIndex: 0),
-                            new SelectionElement<bool>(message: $"Not switch", value : false, spriteIndex: 1),
-                        };
-
-                                    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);
+                    int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
 
 
-                                    yield return ContinuousController.instance.StartCoroutine(GManager.instance.userSelectionManager.WaitForEndSelect());
+                    SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
 
-                                    bool doSwitch = GManager.instance.userSelectionManager.SelectedBoolValue;
+                    selectPermanentEffect.SetUp(
+                        selectPlayer: card.Owner,
+                        canTargetCondition: CanSelectPermanentCondition,
+                        canTargetCondition_ByPreSelecetedList: null,
+                        canEndSelectCondition: null,
+                        maxCount: maxCount,
+                        canNoSelect: false,
+                        canEndNotMax: false,
+                        selectPermanentCoroutine: SelectPermanentCoroutine,
+                        afterSelectPermanentCoroutine: null,
+                        mode: SelectPermanentEffect.Mode.Custom,
+                        cardEffect: activateClass);
 
 
+                    selectPermanentEffect.SetUpCustomMessage(
+                        "Select 1 Digimon to switch the attack to.",
+                        "The opponent is selecting 1 Digimon to switch the attack to.");
 
 
+                    yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
 
-                                    if (doSwitch)
-                                    {
-                                        int maxCount = Math.Min(1, CardEffectCommons.MatchConditionPermanentCount(CanSelectPermanentCondition));
-
-                                        SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
-
-                                        selectPermanentEffect.SetUp(
-                                            selectPlayer: card.Owner,
-                                            canTargetCondition: CanSelectPermanentCondition,
-                                            canTargetCondition_ByPreSelecetedList: null,
-                                            canEndSelectCondition: null,
-                                            maxCount: maxCount,
-                                            canNoSelect: false,
-                                            canEndNotMax: false,
-                                            selectPermanentCoroutine: SelectPermanentCoroutine,
-                                            afterSelectPermanentCoroutine: null,
-                                            mode: SelectPermanentEffect.Mode.Custom,
-                                            cardEffect: activateClass);
-
-                                        selectPermanentEffect.SetUpCustomMessage(
-                                            "Select 1 Digimon to switch the attack to.",
-                                            "The opponent is selecting 1 Digimon to switch the attack to.");
-
-                                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
-
-                                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
-                                        {
-                                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.attackProcess.SwitchDefender(
-                                            activateClass,
-                                            false,
-                                            permanent));
-                                        }
-                                    }
-                                }
-                            }
-                        }
+                    IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(GManager.instance.attackProcess.SwitchDefender(
+                        activateClass,
+                        false,
+                        permanent));
                     }
                     }
                 }
                 }
             }
             }

+ 168 - 376
Assets/CardEffect/BT18/Black/Sephirothmon_BT18_066.cs

@@ -100,8 +100,8 @@ namespace DCGO.CardEffects.BT18
                 {
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
                     {
-                        bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
-                        bool canSelectTrash = card.Owner.TrashCards.Count(CanSelectCardCondition) >= 1;
+                        bool canSelectHand = CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition);
+                        bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
 
 
                         if (canSelectHand || canSelectTrash)
                         if (canSelectHand || canSelectTrash)
                         {
                         {
@@ -129,142 +129,38 @@ namespace DCGO.CardEffects.BT18
                             bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
                             bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
 
 
                             List<CardSource> selectedCards = new List<CardSource>();
                             List<CardSource> selectedCards = new List<CardSource>();
+                            CardSource selectedCard = null;
 
 
-
-                            if (!fromHand)
+                            if (fromHand)
                             {
                             {
-                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition(cardSource)));
-
-                                IEnumerator SelectCardCoroutine(CardSource cardSource)
-                                {
-                                    selectedCards.Add(cardSource);
-
-                                    yield return null;
-                                }
+                                int maxCount = Math.Min(1, card.Owner.HandCards.Count((cardSource) => CanSelectCardCondition(cardSource)));
 
 
-                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                                SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
 
 
-                                selectCardEffect.SetUp(
+                                selectHandEffect.SetUp(
+                                    selectPlayer: card.Owner,
                                     canTargetCondition: CanSelectCardCondition,
                                     canTargetCondition: CanSelectCardCondition,
                                     canTargetCondition_ByPreSelecetedList: null,
                                     canTargetCondition_ByPreSelecetedList: null,
                                     canEndSelectCondition: null,
                                     canEndSelectCondition: null,
-                                    canNoSelect: () => true,
-                                    selectCardCoroutine: SelectCardCoroutine,
-                                    afterSelectCardCoroutine: null,
-                                    message: "Select 1 card to place on bottom of digivolution cards.",
                                     maxCount: maxCount,
                                     maxCount: maxCount,
+                                    canNoSelect: true,
                                     canEndNotMax: false,
                                     canEndNotMax: false,
                                     isShowOpponent: true,
                                     isShowOpponent: true,
-                                    mode: SelectCardEffect.Mode.Custom,
-                                    root: SelectCardEffect.Root.Trash,
-                                    customRootCardList: null,
-                                    canLookReverseCard: true,
-                                    selectPlayer: card.Owner,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    mode: SelectHandEffect.Mode.Custom,
                                     cardEffect: activateClass);
                                     cardEffect: activateClass);
 
 
-                                selectCardEffect.SetUpCustomMessage(
+                                selectHandEffect.SetUpCustomMessage(
                                     "Select 1 card to place on bottom of digivolution cards.",
                                     "Select 1 card to place on bottom of digivolution cards.",
                                     "The opponent is selecting 1 card to place on bottom of digivolution cards.");
                                     "The opponent is selecting 1 card to place on bottom of digivolution cards.");
-                                selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
-
-                                yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-
-                                CardSource selectedCard = null;
-
-                                if (selectedCards.Count >= 1)
-                                {
-                                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                                    {
-                                        yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(
-                                            selectedCards,
-                                            activateClass));
-
-                                        selectedCard = selectedCards[0];
-                                    }
-                                }
-
-                                if (selectedCard != null)
-                                {
-                                    List<ICardEffect> candidateEffects = selectedCard.EffectList_ForCard(EffectTiming.OnEnterFieldAnyone, card)
-                                        .Clone()
-                                        .Filter(cardEffect => cardEffect != null && cardEffect is ActivateICardEffect && !cardEffect.IsSecurityEffect && cardEffect.IsOnPlay);
-
-                                    if (candidateEffects.Count >= 1)
-                                    {
-                                        ICardEffect selectedEffect = null;
-
-                                        if (candidateEffects.Count == 1)
-                                        {
-                                            selectedEffect = candidateEffects[0];
-                                        }
+                                selectHandEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
 
 
-                                        else
-                                        {
-                                            List<SkillInfo> skillInfos = candidateEffects
-                                                .Map(cardEffect => new SkillInfo(cardEffect, null, EffectTiming.None));
-
-                                            List<CardSource> cardSources = candidateEffects
-                                                .Map(cardEffect => cardEffect.EffectSourceCard);
-
-                                            SelectCardEffect selectSourceCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                            selectSourceCardEffect.SetUp(
-                                                canTargetCondition: (cardSource) => true,
-                                                canTargetCondition_ByPreSelecetedList: null,
-                                                canEndSelectCondition: null,
-                                                canNoSelect: () => false,
-                                                selectCardCoroutine: null,
-                                                afterSelectCardCoroutine: null,
-                                                message: "Select 1 effect to activate.",
-                                                maxCount: 1,
-                                                canEndNotMax: false,
-                                                isShowOpponent: false,
-                                                mode: SelectCardEffect.Mode.Custom,
-                                                root: SelectCardEffect.Root.Custom,
-                                                customRootCardList: cardSources,
-                                                canLookReverseCard: true,
-                                                selectPlayer: card.Owner,
-                                                cardEffect: activateClass);
-
-                                            selectSourceCardEffect.SetNotShowCard();
-                                            selectSourceCardEffect.SetUpSkillInfos(skillInfos);
-                                            selectSourceCardEffect.SetUpAfterSelectIndexCoroutine(AfterSelectIndexCoroutine);
-
-                                            yield return ContinuousController.instance.StartCoroutine(selectSourceCardEffect.Activate());
-
-                                            IEnumerator AfterSelectIndexCoroutine(List<int> selectedIndexes)
-                                            {
-                                                if (selectedIndexes.Count == 1)
-                                                {
-                                                    selectedEffect = candidateEffects[selectedIndexes[0]];
-                                                    yield return null;
-                                                }
-                                            }
-                                        }
-
-                                        if (selectedEffect != null)
-                                        {
-                                            Hashtable effectHashtable = CardEffectCommons.OnPlayCheckHashtableOfCard(card);
-
-                                            if (selectedEffect.CanUse(effectHashtable))
-                                            {
-                                                yield return ContinuousController.instance.StartCoroutine(
-                                                    ((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
-                                            }
-                                        }
-                                    }
-                                }
+                                yield return StartCoroutine(selectHandEffect.Activate());
                             }
                             }
                             else
                             else
                             {
                             {
-                                int maxCount = Math.Min(1, card.Owner.HandCards.Count((cardSource) => CanSelectCardCondition(cardSource)));
-
-                                IEnumerator SelectCardCoroutine(CardSource cardSource)
-                                {
-                                    selectedCards.Add(cardSource);
-
-                                    yield return null;
-                                }
+                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition(cardSource)));
 
 
                                 SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
                                 SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
 
 
@@ -280,7 +176,7 @@ namespace DCGO.CardEffects.BT18
                                     canEndNotMax: false,
                                     canEndNotMax: false,
                                     isShowOpponent: true,
                                     isShowOpponent: true,
                                     mode: SelectCardEffect.Mode.Custom,
                                     mode: SelectCardEffect.Mode.Custom,
-                                    root: SelectCardEffect.Root.Hand,
+                                    root: SelectCardEffect.Root.Trash,
                                     customRootCardList: null,
                                     customRootCardList: null,
                                     canLookReverseCard: true,
                                     canLookReverseCard: true,
                                     selectPlayer: card.Owner,
                                     selectPlayer: card.Owner,
@@ -292,89 +188,89 @@ namespace DCGO.CardEffects.BT18
                                 selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
                                 selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
 
 
                                 yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
                                 yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                            }
 
 
-                                CardSource selectedCard = null;
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCard = cardSource;
 
 
-                                if (selectedCards.Count >= 1)
-                                {
-                                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                                    {
-                                        yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(
-                                            selectedCards,
-                                            activateClass));
+                                yield return null;
+                            }
 
 
-                                        selectedCard = selectedCards[0];
-                                    }
+                            if (selectedCard != null)
+                            {
+                                if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(
+                                        new List<CardSource> {  selectedCard },
+                                        activateClass));
                                 }
                                 }
 
 
-                                if (selectedCard != null)
-                                {
-                                    List<ICardEffect> candidateEffects = selectedCard.EffectList_ForCard(EffectTiming.OnEnterFieldAnyone, card)
+                                List<ICardEffect> candidateEffects = selectedCard.EffectList_ForCard(EffectTiming.OnEnterFieldAnyone, card)
                                         .Clone()
                                         .Clone()
                                         .Filter(cardEffect => cardEffect != null && cardEffect is ActivateICardEffect && !cardEffect.IsSecurityEffect && cardEffect.IsOnPlay);
                                         .Filter(cardEffect => cardEffect != null && cardEffect is ActivateICardEffect && !cardEffect.IsSecurityEffect && cardEffect.IsOnPlay);
 
 
-                                    if (candidateEffects.Count >= 1)
-                                    {
-                                        ICardEffect selectedEffect = null;
+                                if (candidateEffects.Count >= 1)
+                                {
+                                    ICardEffect selectedEffect = null;
 
 
-                                        if (candidateEffects.Count == 1)
-                                        {
-                                            selectedEffect = candidateEffects[0];
-                                        }
+                                    if (candidateEffects.Count == 1)
+                                    {
+                                        selectedEffect = candidateEffects[0];
+                                    }
 
 
-                                        else
+                                    else
+                                    {
+                                        List<SkillInfo> skillInfos = candidateEffects
+                                            .Map(cardEffect => new SkillInfo(cardEffect, null, EffectTiming.None));
+
+                                        List<CardSource> cardSources = candidateEffects
+                                            .Map(cardEffect => cardEffect.EffectSourceCard);
+
+                                        SelectCardEffect selectSourceCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                        selectSourceCardEffect.SetUp(
+                                            canTargetCondition: (cardSource) => true,
+                                            canTargetCondition_ByPreSelecetedList: null,
+                                            canEndSelectCondition: null,
+                                            canNoSelect: () => false,
+                                            selectCardCoroutine: null,
+                                            afterSelectCardCoroutine: null,
+                                            message: "Select 1 effect to activate.",
+                                            maxCount: 1,
+                                            canEndNotMax: false,
+                                            isShowOpponent: false,
+                                            mode: SelectCardEffect.Mode.Custom,
+                                            root: SelectCardEffect.Root.Custom,
+                                            customRootCardList: cardSources,
+                                            canLookReverseCard: true,
+                                            selectPlayer: card.Owner,
+                                            cardEffect: activateClass);
+
+                                        selectSourceCardEffect.SetNotShowCard();
+                                        selectSourceCardEffect.SetUpSkillInfos(skillInfos);
+                                        selectSourceCardEffect.SetUpAfterSelectIndexCoroutine(AfterSelectIndexCoroutine);
+
+                                        yield return ContinuousController.instance.StartCoroutine(selectSourceCardEffect.Activate());
+
+                                        IEnumerator AfterSelectIndexCoroutine(List<int> selectedIndexes)
                                         {
                                         {
-                                            List<SkillInfo> skillInfos = candidateEffects
-                                                .Map(cardEffect => new SkillInfo(cardEffect, null, EffectTiming.None));
-
-                                            List<CardSource> cardSources = candidateEffects
-                                                .Map(cardEffect => cardEffect.EffectSourceCard);
-
-                                            SelectCardEffect selectSourceCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                            selectSourceCardEffect.SetUp(
-                                                canTargetCondition: (cardSource) => true,
-                                                canTargetCondition_ByPreSelecetedList: null,
-                                                canEndSelectCondition: null,
-                                                canNoSelect: () => false,
-                                                selectCardCoroutine: null,
-                                                afterSelectCardCoroutine: null,
-                                                message: "Select 1 effect to activate.",
-                                                maxCount: 1,
-                                                canEndNotMax: false,
-                                                isShowOpponent: false,
-                                                mode: SelectCardEffect.Mode.Custom,
-                                                root: SelectCardEffect.Root.Custom,
-                                                customRootCardList: cardSources,
-                                                canLookReverseCard: true,
-                                                selectPlayer: card.Owner,
-                                                cardEffect: activateClass);
-
-                                            selectSourceCardEffect.SetNotShowCard();
-                                            selectSourceCardEffect.SetUpSkillInfos(skillInfos);
-                                            selectSourceCardEffect.SetUpAfterSelectIndexCoroutine(AfterSelectIndexCoroutine);
-
-                                            yield return ContinuousController.instance.StartCoroutine(selectSourceCardEffect.Activate());
-
-                                            IEnumerator AfterSelectIndexCoroutine(List<int> selectedIndexes)
+                                            if (selectedIndexes.Count == 1)
                                             {
                                             {
-                                                if (selectedIndexes.Count == 1)
-                                                {
-                                                    selectedEffect = candidateEffects[selectedIndexes[0]];
-                                                    yield return null;
-                                                }
+                                                selectedEffect = candidateEffects[selectedIndexes[0]];
+                                                yield return null;
                                             }
                                             }
                                         }
                                         }
+                                    }
 
 
-                                        if (selectedEffect != null)
-                                        {
-                                            Hashtable effectHashtable = CardEffectCommons.OnPlayCheckHashtableOfCard(card);
+                                    if (selectedEffect != null)
+                                    {
+                                        Hashtable effectHashtable = CardEffectCommons.OnPlayCheckHashtableOfCard(card);
 
 
-                                            if (selectedEffect.CanUse(effectHashtable))
-                                            {
-                                                yield return ContinuousController.instance.StartCoroutine(
-                                                    ((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
-                                            }
+                                        if (selectedEffect.CanUse(effectHashtable))
+                                        {
+                                            yield return ContinuousController.instance.StartCoroutine(
+                                                ((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
                                         }
                                         }
                                     }
                                     }
                                 }
                                 }
@@ -444,8 +340,8 @@ namespace DCGO.CardEffects.BT18
                 {
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
                     {
-                        bool canSelectHand = card.Owner.HandCards.Count(CanSelectCardCondition) >= 1;
-                        bool canSelectTrash = card.Owner.TrashCards.Count(CanSelectCardCondition) >= 1;
+                        bool canSelectHand = CardEffectCommons.HasMatchConditionOwnersHand(card, CanSelectCardCondition);
+                        bool canSelectTrash = CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardCondition);
 
 
                         if (canSelectHand || canSelectTrash)
                         if (canSelectHand || canSelectTrash)
                         {
                         {
@@ -473,142 +369,38 @@ namespace DCGO.CardEffects.BT18
                             bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
                             bool fromHand = GManager.instance.userSelectionManager.SelectedBoolValue;
 
 
                             List<CardSource> selectedCards = new List<CardSource>();
                             List<CardSource> selectedCards = new List<CardSource>();
+                            CardSource selectedCard = null;
 
 
-
-                            if (!fromHand)
+                            if (fromHand)
                             {
                             {
-                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition(cardSource)));
-
-                                IEnumerator SelectCardCoroutine(CardSource cardSource)
-                                {
-                                    selectedCards.Add(cardSource);
-
-                                    yield return null;
-                                }
+                                int maxCount = Math.Min(1, card.Owner.HandCards.Count((cardSource) => CanSelectCardCondition(cardSource)));
 
 
-                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                                SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
 
 
-                                selectCardEffect.SetUp(
+                                selectHandEffect.SetUp(
+                                    selectPlayer: card.Owner,
                                     canTargetCondition: CanSelectCardCondition,
                                     canTargetCondition: CanSelectCardCondition,
                                     canTargetCondition_ByPreSelecetedList: null,
                                     canTargetCondition_ByPreSelecetedList: null,
                                     canEndSelectCondition: null,
                                     canEndSelectCondition: null,
-                                    canNoSelect: () => true,
-                                    selectCardCoroutine: SelectCardCoroutine,
-                                    afterSelectCardCoroutine: null,
-                                    message: "Select 1 card to place on bottom of digivolution cards.",
                                     maxCount: maxCount,
                                     maxCount: maxCount,
+                                    canNoSelect: true,
                                     canEndNotMax: false,
                                     canEndNotMax: false,
                                     isShowOpponent: true,
                                     isShowOpponent: true,
-                                    mode: SelectCardEffect.Mode.Custom,
-                                    root: SelectCardEffect.Root.Trash,
-                                    customRootCardList: null,
-                                    canLookReverseCard: true,
-                                    selectPlayer: card.Owner,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    mode: SelectHandEffect.Mode.Custom,
                                     cardEffect: activateClass);
                                     cardEffect: activateClass);
 
 
-                                selectCardEffect.SetUpCustomMessage(
+                                selectHandEffect.SetUpCustomMessage(
                                     "Select 1 card to place on bottom of digivolution cards.",
                                     "Select 1 card to place on bottom of digivolution cards.",
                                     "The opponent is selecting 1 card to place on bottom of digivolution cards.");
                                     "The opponent is selecting 1 card to place on bottom of digivolution cards.");
-                                selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
-
-                                yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-
-                                CardSource selectedCard = null;
-
-                                if (selectedCards.Count >= 1)
-                                {
-                                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                                    {
-                                        yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(
-                                            selectedCards,
-                                            activateClass));
-
-                                        selectedCard = selectedCards[0];
-                                    }
-                                }
-
-                                if (selectedCard != null)
-                                {
-                                    List<ICardEffect> candidateEffects = selectedCard.EffectList_ForCard(EffectTiming.OnEnterFieldAnyone, card)
-                                        .Clone()
-                                        .Filter(cardEffect => cardEffect != null && cardEffect is ActivateICardEffect && !cardEffect.IsSecurityEffect && cardEffect.IsOnPlay);
-
-                                    if (candidateEffects.Count >= 1)
-                                    {
-                                        ICardEffect selectedEffect = null;
-
-                                        if (candidateEffects.Count == 1)
-                                        {
-                                            selectedEffect = candidateEffects[0];
-                                        }
+                                selectHandEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
 
 
-                                        else
-                                        {
-                                            List<SkillInfo> skillInfos = candidateEffects
-                                                .Map(cardEffect => new SkillInfo(cardEffect, null, EffectTiming.None));
-
-                                            List<CardSource> cardSources = candidateEffects
-                                                .Map(cardEffect => cardEffect.EffectSourceCard);
-
-                                            SelectCardEffect selectSourceCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                            selectSourceCardEffect.SetUp(
-                                                canTargetCondition: (cardSource) => true,
-                                                canTargetCondition_ByPreSelecetedList: null,
-                                                canEndSelectCondition: null,
-                                                canNoSelect: () => false,
-                                                selectCardCoroutine: null,
-                                                afterSelectCardCoroutine: null,
-                                                message: "Select 1 effect to activate.",
-                                                maxCount: 1,
-                                                canEndNotMax: false,
-                                                isShowOpponent: false,
-                                                mode: SelectCardEffect.Mode.Custom,
-                                                root: SelectCardEffect.Root.Custom,
-                                                customRootCardList: cardSources,
-                                                canLookReverseCard: true,
-                                                selectPlayer: card.Owner,
-                                                cardEffect: activateClass);
-
-                                            selectSourceCardEffect.SetNotShowCard();
-                                            selectSourceCardEffect.SetUpSkillInfos(skillInfos);
-                                            selectSourceCardEffect.SetUpAfterSelectIndexCoroutine(AfterSelectIndexCoroutine);
-
-                                            yield return ContinuousController.instance.StartCoroutine(selectSourceCardEffect.Activate());
-
-                                            IEnumerator AfterSelectIndexCoroutine(List<int> selectedIndexes)
-                                            {
-                                                if (selectedIndexes.Count == 1)
-                                                {
-                                                    selectedEffect = candidateEffects[selectedIndexes[0]];
-                                                    yield return null;
-                                                }
-                                            }
-                                        }
-
-                                        if (selectedEffect != null)
-                                        {
-                                            Hashtable effectHashtable = CardEffectCommons.OnPlayCheckHashtableOfCard(card);
-
-                                            if (selectedEffect.CanUse(effectHashtable))
-                                            {
-                                                yield return ContinuousController.instance.StartCoroutine(
-                                                    ((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
-                                            }
-                                        }
-                                    }
-                                }
+                                yield return StartCoroutine(selectHandEffect.Activate());
                             }
                             }
                             else
                             else
                             {
                             {
-                                int maxCount = Math.Min(1, card.Owner.HandCards.Count((cardSource) => CanSelectCardCondition(cardSource)));
-
-                                IEnumerator SelectCardCoroutine(CardSource cardSource)
-                                {
-                                    selectedCards.Add(cardSource);
-
-                                    yield return null;
-                                }
+                                int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardCondition(cardSource)));
 
 
                                 SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
                                 SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
 
 
@@ -624,7 +416,7 @@ namespace DCGO.CardEffects.BT18
                                     canEndNotMax: false,
                                     canEndNotMax: false,
                                     isShowOpponent: true,
                                     isShowOpponent: true,
                                     mode: SelectCardEffect.Mode.Custom,
                                     mode: SelectCardEffect.Mode.Custom,
-                                    root: SelectCardEffect.Root.Hand,
+                                    root: SelectCardEffect.Root.Trash,
                                     customRootCardList: null,
                                     customRootCardList: null,
                                     canLookReverseCard: true,
                                     canLookReverseCard: true,
                                     selectPlayer: card.Owner,
                                     selectPlayer: card.Owner,
@@ -636,89 +428,89 @@ namespace DCGO.CardEffects.BT18
                                 selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
                                 selectCardEffect.SetUpCustomMessage_ShowCard("Digivolution Card");
 
 
                                 yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
                                 yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+                            }
 
 
-                                CardSource selectedCard = null;
+                            IEnumerator SelectCardCoroutine(CardSource cardSource)
+                            {
+                                selectedCard = cardSource;
 
 
-                                if (selectedCards.Count >= 1)
-                                {
-                                    if (CardEffectCommons.IsExistOnBattleArea(card))
-                                    {
-                                        yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(
-                                            selectedCards,
-                                            activateClass));
+                                yield return null;
+                            }
 
 
-                                        selectedCard = selectedCards[0];
-                                    }
+                            if (selectedCard != null)
+                            {
+                                if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
+                                {
+                                    yield return ContinuousController.instance.StartCoroutine(card.PermanentOfThisCard().AddDigivolutionCardsBottom(
+                                        new List<CardSource> { selectedCard },
+                                        activateClass));
                                 }
                                 }
 
 
-                                if (selectedCard != null)
-                                {
-                                    List<ICardEffect> candidateEffects = selectedCard.EffectList_ForCard(EffectTiming.OnEnterFieldAnyone, card)
+                                List<ICardEffect> candidateEffects = selectedCard.EffectList_ForCard(EffectTiming.OnEnterFieldAnyone, card)
                                         .Clone()
                                         .Clone()
                                         .Filter(cardEffect => cardEffect != null && cardEffect is ActivateICardEffect && !cardEffect.IsSecurityEffect && cardEffect.IsOnPlay);
                                         .Filter(cardEffect => cardEffect != null && cardEffect is ActivateICardEffect && !cardEffect.IsSecurityEffect && cardEffect.IsOnPlay);
 
 
-                                    if (candidateEffects.Count >= 1)
-                                    {
-                                        ICardEffect selectedEffect = null;
+                                if (candidateEffects.Count >= 1)
+                                {
+                                    ICardEffect selectedEffect = null;
 
 
-                                        if (candidateEffects.Count == 1)
-                                        {
-                                            selectedEffect = candidateEffects[0];
-                                        }
+                                    if (candidateEffects.Count == 1)
+                                    {
+                                        selectedEffect = candidateEffects[0];
+                                    }
 
 
-                                        else
+                                    else
+                                    {
+                                        List<SkillInfo> skillInfos = candidateEffects
+                                            .Map(cardEffect => new SkillInfo(cardEffect, null, EffectTiming.None));
+
+                                        List<CardSource> cardSources = candidateEffects
+                                            .Map(cardEffect => cardEffect.EffectSourceCard);
+
+                                        SelectCardEffect selectSourceCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                        selectSourceCardEffect.SetUp(
+                                            canTargetCondition: (cardSource) => true,
+                                            canTargetCondition_ByPreSelecetedList: null,
+                                            canEndSelectCondition: null,
+                                            canNoSelect: () => false,
+                                            selectCardCoroutine: null,
+                                            afterSelectCardCoroutine: null,
+                                            message: "Select 1 effect to activate.",
+                                            maxCount: 1,
+                                            canEndNotMax: false,
+                                            isShowOpponent: false,
+                                            mode: SelectCardEffect.Mode.Custom,
+                                            root: SelectCardEffect.Root.Custom,
+                                            customRootCardList: cardSources,
+                                            canLookReverseCard: true,
+                                            selectPlayer: card.Owner,
+                                            cardEffect: activateClass);
+
+                                        selectSourceCardEffect.SetNotShowCard();
+                                        selectSourceCardEffect.SetUpSkillInfos(skillInfos);
+                                        selectSourceCardEffect.SetUpAfterSelectIndexCoroutine(AfterSelectIndexCoroutine);
+
+                                        yield return ContinuousController.instance.StartCoroutine(selectSourceCardEffect.Activate());
+
+                                        IEnumerator AfterSelectIndexCoroutine(List<int> selectedIndexes)
                                         {
                                         {
-                                            List<SkillInfo> skillInfos = candidateEffects
-                                                .Map(cardEffect => new SkillInfo(cardEffect, null, EffectTiming.None));
-
-                                            List<CardSource> cardSources = candidateEffects
-                                                .Map(cardEffect => cardEffect.EffectSourceCard);
-
-                                            SelectCardEffect selectSourceCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                            selectSourceCardEffect.SetUp(
-                                                canTargetCondition: (cardSource) => true,
-                                                canTargetCondition_ByPreSelecetedList: null,
-                                                canEndSelectCondition: null,
-                                                canNoSelect: () => false,
-                                                selectCardCoroutine: null,
-                                                afterSelectCardCoroutine: null,
-                                                message: "Select 1 effect to activate.",
-                                                maxCount: 1,
-                                                canEndNotMax: false,
-                                                isShowOpponent: false,
-                                                mode: SelectCardEffect.Mode.Custom,
-                                                root: SelectCardEffect.Root.Custom,
-                                                customRootCardList: cardSources,
-                                                canLookReverseCard: true,
-                                                selectPlayer: card.Owner,
-                                                cardEffect: activateClass);
-
-                                            selectSourceCardEffect.SetNotShowCard();
-                                            selectSourceCardEffect.SetUpSkillInfos(skillInfos);
-                                            selectSourceCardEffect.SetUpAfterSelectIndexCoroutine(AfterSelectIndexCoroutine);
-
-                                            yield return ContinuousController.instance.StartCoroutine(selectSourceCardEffect.Activate());
-
-                                            IEnumerator AfterSelectIndexCoroutine(List<int> selectedIndexes)
+                                            if (selectedIndexes.Count == 1)
                                             {
                                             {
-                                                if (selectedIndexes.Count == 1)
-                                                {
-                                                    selectedEffect = candidateEffects[selectedIndexes[0]];
-                                                    yield return null;
-                                                }
+                                                selectedEffect = candidateEffects[selectedIndexes[0]];
+                                                yield return null;
                                             }
                                             }
                                         }
                                         }
+                                    }
 
 
-                                        if (selectedEffect != null)
-                                        {
-                                            Hashtable effectHashtable = CardEffectCommons.OnPlayCheckHashtableOfCard(card);
+                                    if (selectedEffect != null)
+                                    {
+                                        Hashtable effectHashtable = CardEffectCommons.OnPlayCheckHashtableOfCard(card);
 
 
-                                            if (selectedEffect.CanUse(effectHashtable))
-                                            {
-                                                yield return ContinuousController.instance.StartCoroutine(
-                                                    ((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
-                                            }
+                                        if (selectedEffect.CanUse(effectHashtable))
+                                        {
+                                            yield return ContinuousController.instance.StartCoroutine(
+                                                ((ActivateICardEffect)selectedEffect).Activate_Optional_Effect_Execute(effectHashtable));
                                         }
                                         }
                                     }
                                     }
                                 }
                                 }

+ 6 - 9
Assets/CardEffect/BT18/Black/Snatchmon_BT18_065.cs

@@ -197,28 +197,25 @@ namespace DCGO.CardEffects.BT18
                 {
                 {
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     {
                     {
-                        if (permanent.TopCard.CardNames.Contains("Vemmon"))
+                        if (!permanent.TopCard.EqualsCardName("Vemmon"))
                         {
                         {
-                            return true;
+                            return false;
                         }
                         }
                     }
                     }
-                    return false;
+
+                    return true;
                 }
                 }
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)
                 {
                 {
-                    if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectPermanentCondition1))
-                    {
-                        return true;
-                    }
-                    return false;
+                    return CardEffectCommons.HasMatchConditionOwnersPermanent(card, CanSelectPermanentCondition1);
                 }
                 }
 
 
                 int GetCount(CardSource cardSource)
                 int GetCount(CardSource cardSource)
                 {
                 {
                     if (cardSource == card)
                     if (cardSource == card)
                     {
                     {
-                        return 100;
+                        return 4;
                     }
                     }
 
 
                     return 0;
                     return 0;

+ 1 - 1
Assets/CardEffect/BT18/Green/FunBeemon_BT18_044.cs

@@ -85,7 +85,7 @@ namespace DCGO.CardEffects.BT18
 
 
                     IEnumerator CardSelected(CardSource cardSource)
                     IEnumerator CardSelected(CardSource cardSource)
                     {
                     {
-                        if(cardSource == null)
+                        if (cardSource != null)
                             cardAdded = true;
                             cardAdded = true;
 
 
                         yield return null;
                         yield return null;

+ 1 - 1
Assets/CardEffect/BT18/Green/Pomumon_BT18_045.cs

@@ -46,7 +46,7 @@ namespace DCGO.CardEffects.BT18
                 cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
                 cardEffects.Add(CardEffectFactory.ChangeDPStaticEffect(
                 permanentCondition: PermanentCondition,
                 permanentCondition: PermanentCondition,
                 changeValue: 1000,
                 changeValue: 1000,
-                isInheritedEffect: true,
+                isInheritedEffect: false,
                 card: card,
                 card: card,
                 condition: Condition,
                 condition: Condition,
                 effectName: EffectDiscription));
                 effectName: EffectDiscription));

+ 2 - 1
Assets/CardEffect/BT18/Green/Puroromon_BT18_004.cs

@@ -69,7 +69,7 @@ namespace DCGO.CardEffects.BT18
 
 
                     IEnumerator CardSelected(CardSource cardSource)
                     IEnumerator CardSelected(CardSource cardSource)
                     {
                     {
-                        if (cardSource == null)
+                        if (cardSource != null)
                             cardAdded = true;
                             cardAdded = true;
 
 
                         yield return null;
                         yield return null;
@@ -84,6 +84,7 @@ namespace DCGO.CardEffects.BT18
                         yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
                         yield return ContinuousController.instance.StartCoroutine(new IReduceSecurity(
                             player: card.Owner,
                             player: card.Owner,
                             refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
                             refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
+
                     }
                     }
                 }
                 }
             }
             }

+ 3 - 3
Assets/CardEffect/BT18/Purple/Duskmon_BT18_078.cs

@@ -304,9 +304,9 @@ namespace DCGO.CardEffects.BT18
                 bool DigivolveFromPermanentCondition(Permanent permanent)
                 bool DigivolveFromPermanentCondition(Permanent permanent)
                 {
                 {
                     return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card) &&
                     return CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card) &&
-                           (permanent.IsDigimon || permanent.IsTamer);// &&
-                           //card.Owner.TrashCards.Where(DigivolveToCardCondition).Any(cardSource =>
-                           //    cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass));
+                           (permanent.IsDigimon || permanent.IsTamer) &&
+                           card.Owner.TrashCards.Where(DigivolveToCardCondition).Any(cardSource =>
+                               cardSource.CanPlayCardTargetFrame(permanent.PermanentFrame, false, activateClass, SelectCardEffect.Root.Trash));
                 }
                 }
 
 
                 bool DigivolveToCardCondition(CardSource cardSource)
                 bool DigivolveToCardCondition(CardSource cardSource)

+ 7 - 1
Assets/CardEffect/BT18/Purple/GospeloftheFallenAngel_BT18_100.cs

@@ -38,7 +38,13 @@ namespace DCGO.CardEffects.BT18
 
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
                 {
-                    return cardSource.IsDigimon && cardSource.EqualsCardName("Lucemon");
+                    return cardSource.IsDigimon && cardSource.EqualsCardName("Lucemon") &&
+                           cardSource.CanPlayCardTargetFrame(
+                               frame: card.Owner.GetBreedingAreaPermanents()[0].PermanentFrame,
+                               PayCost: false,
+                               cardEffect: activateClass,
+                               root: SelectCardEffect.Root.Trash,
+                               isBreedingArea: true);
                 }
                 }
 
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 IEnumerator ActivateCoroutine(Hashtable hashtable)

+ 38 - 10
Assets/CardEffect/BT18/Purple/LordKnightmonAce_BT18_083.cs

@@ -157,25 +157,53 @@ namespace DCGO.CardEffects.BT18
 
 
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
+                AddSkillClass addSkillClass = new AddSkillClass();
+                addSkillClass.SetUpICardEffect("Your Digimons gain Collision", CanUseCondition, card);
+                addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
+                cardEffects.Add(addSkillClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                }
+
                 bool PermanentCondition(Permanent permanent)
                 bool PermanentCondition(Permanent permanent)
                 {
                 {
                     return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent) &&
                     return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent) &&
                            permanent.DP <= card.PermanentOfThisCard().DP;
                            permanent.DP <= card.PermanentOfThisCard().DP;
                 }
                 }
 
 
-                bool CanUseCondition()
+                bool CardSourceCondition(CardSource cardSource)
                 {
                 {
-                    return CardEffectCommons.IsExistOnBattleAreaDigimon(card);
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(cardSource))
+                    {
+                        if (cardSource == cardSource.PermanentOfThisCard().TopCard)
+                        {
+                            if (PermanentCondition(cardSource.PermanentOfThisCard()))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
                 }
                 }
-                
-                // Change to Collision
-                cardEffects.Add(CardEffectFactory.CollisionStaticEffect(
-                    permanentCondition: PermanentCondition,
-                    isInheritedEffect: false,
-                    card: card,
-                    condition: CanUseCondition));
-            }
 
 
+                List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming _timing)
+                {
+                    if (_timing == EffectTiming.OnCounterTiming)
+                    {
+                        bool Condition()
+                        {
+                            return CardSourceCondition(cardSource);
+                        }
+
+                        cardEffects.Add(CardEffectFactory.CollisionSelfStaticEffect(false, cardSource, Condition));
+                    }
+
+                    return cardEffects;
+                }
+            }
             #endregion
             #endregion
 
 
             return cardEffects;
             return cardEffects;

+ 0 - 1
Assets/CardEffect/BT18/Purple/LucemonSatanMode_BT18_101.cs

@@ -154,7 +154,6 @@ namespace DCGO.CardEffects.BT18
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Trash opponent's top security card", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Trash opponent's top security card", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDescription());
-                activateClass.SetIsInheritedEffect(true);
                 activateClass.SetHashString("Trash_BT18-101");
                 activateClass.SetHashString("Trash_BT18-101");
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 

+ 4 - 4
Assets/CardEffect/BT18/Purple/Velgrmon_BT18_079.cs

@@ -107,8 +107,8 @@ namespace DCGO.CardEffects.BT18
                 {
                 {
                     int trashCount = OpponentColorCount();
                     int trashCount = OpponentColorCount();
 
 
-                    int ownerTrashed = Math.Max(0, card.Owner.SecurityCards.Count - trashCount);
-                    int opponentTrashed = Math.Max(0, card.Owner.Enemy.SecurityCards.Count - trashCount);
+                    int ownerTrashed = Math.Min(card.Owner.LibraryCards.Count, trashCount);
+                    int opponentTrashed = Math.Min(card.Owner.Enemy.LibraryCards.Count, trashCount);
 
 
                     yield return ContinuousController.instance.StartCoroutine(new IAddTrashCardsFromLibraryTop(
                     yield return ContinuousController.instance.StartCoroutine(new IAddTrashCardsFromLibraryTop(
                         trashCount,
                         trashCount,
@@ -154,8 +154,8 @@ namespace DCGO.CardEffects.BT18
                 {
                 {
                     int trashCount = OpponentColorCount();
                     int trashCount = OpponentColorCount();
 
 
-                    int ownerTrashed = Math.Max(0, card.Owner.SecurityCards.Count - trashCount);
-                    int opponentTrashed = Math.Max(0, card.Owner.Enemy.SecurityCards.Count - trashCount);
+                    int ownerTrashed = Math.Min(card.Owner.LibraryCards.Count, trashCount);
+                    int opponentTrashed = Math.Min(card.Owner.Enemy.LibraryCards.Count, trashCount);
 
 
                     yield return ContinuousController.instance.StartCoroutine(new IAddTrashCardsFromLibraryTop(
                     yield return ContinuousController.instance.StartCoroutine(new IAddTrashCardsFromLibraryTop(
                         trashCount,
                         trashCount,

+ 3 - 4
Assets/CardEffect/BT18/Purple/Zanbamon_BT18_085.cs

@@ -67,13 +67,12 @@ namespace DCGO.CardEffects.BT18
 
 
             #region Your Turn
             #region Your Turn
 
 
-            if (timing == EffectTiming.None)
+            /*if (timing == EffectTiming.None)
             {
             {
                 bool Condition()
                 bool Condition()
                 {
                 {
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
                     return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
-                           CardEffectCommons.IsOwnerTurn(card) &&
-                           OpponentTrashColorCount() > 2;
+                           CardEffectCommons.IsOwnerTurn(card);
                 }
                 }
 
 
                 cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(changeValue: OpponentTrashColorCount() / 2,
                 cardEffects.Add(CardEffectFactory.ChangeSelfSAttackStaticEffect(changeValue: OpponentTrashColorCount() / 2,
@@ -81,7 +80,7 @@ namespace DCGO.CardEffects.BT18
 
 
                 cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000 * (OpponentTrashColorCount() / 2),
                 cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000 * (OpponentTrashColorCount() / 2),
                     isInheritedEffect: false, card: card, condition: Condition));
                     isInheritedEffect: false, card: card, condition: Condition));
-            }
+            }*/
 
 
             #endregion
             #endregion
 
 

+ 6 - 14
Assets/CardEffect/BT18/Red/Deltamon_BT18_013.cs

@@ -172,22 +172,14 @@ namespace DCGO.CardEffects.BT18
 
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
                 {
-                    if (cardSource.IsDigimon)
+                    if (cardSource.EqualsTraits("Composite"))
                     {
                     {
-                        if (cardSource.CardTraits.Contains("Composite"))
-                        {
-                            return true;
-                        }
-
-                        if (cardSource.CardTraits.Contains("Wicked God"))
-                        {
-                            return true;
-                        }
+                        return true;
+                    }
 
 
-                        if (cardSource.CardTraits.Contains("WickedGod"))
-                        {
-                            return true;
-                        }
+                    if (cardSource.EqualsTraits("Wicked God"))
+                    {
+                        return true;
                     }
                     }
 
 
                     return false;
                     return false;

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

@@ -248,13 +248,13 @@ namespace DCGO.CardEffects.BT18
                 bool HasMachinedramon(Permanent permanent)
                 bool HasMachinedramon(Permanent permanent)
                 {
                 {
                     return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent) &&
                     return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent) &&
-                           permanent.TopCard.EqualsCardName("Kimeramon");
+                           permanent.TopCard.EqualsCardName("Machinedramon");
                 }
                 }
 
 
                 bool HasKimeramon(CardSource source)
                 bool HasKimeramon(CardSource source)
                 {
                 {
                     return CardEffectCommons.IsExistOnTrash(source) &&
                     return CardEffectCommons.IsExistOnTrash(source) &&
-                           source.EqualsCardName("Machinedramon");
+                           source.EqualsCardName("Kimeramon");
                 }
                 }
 
 
                 bool HasMillenniummon(CardSource source)
                 bool HasMillenniummon(CardSource source)

+ 177 - 89
Assets/CardEffect/BT18/Red/Millenniummon_BT18_019.cs

@@ -74,6 +74,39 @@ namespace DCGO.CardEffects.BT18
 
 
             #endregion
             #endregion
 
 
+            #region Different Levels Shared
+            List <Func <CardSource, bool>> Levels = new List<Func<CardSource, bool>> { Level3Selection, Level4Selection, Level5Selection, Level6Selection, Level7Selection };
+            bool Level3Selection(CardSource source)
+            {
+                return source.IsDigimon &&
+                       source.HasLevel && source.Level == 3;
+            }
+
+            bool Level4Selection(CardSource source)
+            {
+                return source.IsDigimon &&
+                       source.HasLevel && source.Level == 4;
+            }
+
+            bool Level5Selection(CardSource source)
+            {
+                return source.IsDigimon &&
+                       source.HasLevel && source.Level == 5;
+            }
+
+            bool Level6Selection(CardSource source)
+            {
+                return source.IsDigimon &&
+                       source.HasLevel && source.Level == 6;
+            }
+
+            bool Level7Selection(CardSource source)
+            {
+                return source.IsDigimon &&
+                       source.HasLevel && source.Level == 7;
+            }
+            #endregion
+
             #region When Digivolving
             #region When Digivolving
 
 
             if (timing == EffectTiming.OnEnterFieldAnyone)
             if (timing == EffectTiming.OnEnterFieldAnyone)
@@ -136,12 +169,82 @@ namespace DCGO.CardEffects.BT18
                             cardEffect: activateClass);
                             cardEffect: activateClass);
 
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+                    }
+                    if (CardEffectCommons.IsJogress(_hashtable))
+                    {
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        foreach (Func<CardSource, bool> level in Levels)
+                        {
+                            if (CardEffectCommons.HasMatchConditionOpponentsCardInTrash(card, level))
+                            {
+                                SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                                selectCardEffect.SetUp(
+                                    canTargetCondition: level,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    canNoSelect: () => true,
+                                    selectCardCoroutine: LevelSelected,
+                                    afterSelectCardCoroutine: null,
+                                    message: $"Select level {Levels.IndexOf(level) + 3} Digimon card to add to the top of opponent's deck",
+                                    maxCount: 1,
+                                    canEndNotMax: false,
+                                    isShowOpponent: true,
+                                    mode: SelectCardEffect.Mode.Custom,
+                                    root: SelectCardEffect.Root.Custom,
+                                    customRootCardList: card.Owner.Enemy.TrashCards,
+                                    canLookReverseCard: true,
+                                    selectPlayer: card.Owner,
+                                    cardEffect: activateClass);
 
 
-                        if (CardEffectCommons.IsJogress(_hashtable))
+                                yield return StartCoroutine(selectCardEffect.Activate());
+                            }
+                        }
+
+                        IEnumerator LevelSelected(CardSource source)
                         {
                         {
-                            // TODO:
+                            if (source != null)
+                                selectedCards.Add(source);
+
+                            yield return null;
+                        }
+
+                        if (selectedCards.Count >= 1)
+                        {
+
+                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                            selectCardEffect.SetUp(
+                                canTargetCondition: (CardSource) => true,
+                                canTargetCondition_ByPreSelecetedList: null,
+                                canEndSelectCondition: null,
+                                canNoSelect: () => true,
+                                selectCardCoroutine: null,
+                                afterSelectCardCoroutine: AfterSelection,
+                                message: "Select order of cards to add to the top your deck\n(cards will be placed back to the top of the deck so that cards with lower numbers are on top).",
+                                maxCount: 1,
+                                canEndNotMax: false,
+                                isShowOpponent: true,
+                                mode: SelectCardEffect.Mode.Custom,
+                                root: SelectCardEffect.Root.Custom,
+                                customRootCardList: selectedCards,
+                                canLookReverseCard: true,
+                                selectPlayer: card.Owner,
+                                cardEffect: activateClass);
+
+                            yield return StartCoroutine(selectCardEffect.Activate());
+
+                            IEnumerator AfterSelection(List<CardSource> sources)
+                            {
+                                sources.Reverse();
+
+                                yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryTopCards(sources));
+
+                                yield return ContinuousController.instance.StartCoroutine(card.Owner.AddMemory(1 * sources.Count, activateClass));
+                            }
+
                         }
                         }
-                        yield return null;
                     }
                     }
                 }
                 }
             }
             }
@@ -236,7 +339,7 @@ namespace DCGO.CardEffects.BT18
                     {
                     {
                         if (cardSource.Owner == card.Owner)
                         if (cardSource.Owner == card.Owner)
                         {
                         {
-                            if (cardSource.CardNames.Contains("Kimeramon"))
+                            if (cardSource.EqualsCardName("Kimeramon"))
                             {
                             {
                                 return true;
                                 return true;
                             }
                             }
@@ -252,7 +355,7 @@ namespace DCGO.CardEffects.BT18
                     {
                     {
                         if (cardSource.Owner == card.Owner)
                         if (cardSource.Owner == card.Owner)
                         {
                         {
-                            if (cardSource.CardNames.Contains("Machinedramon"))
+                            if (cardSource.EqualsCardName("Machinedramon"))
                             {
                             {
                                 return true;
                                 return true;
                             }
                             }
@@ -297,96 +400,81 @@ namespace DCGO.CardEffects.BT18
                 {
                 {
                     bool returned = false;
                     bool returned = false;
 
 
-                    if (isExistOnField(card))
+                    int maxCount = 2;
+
+                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                    selectCardEffect.SetUp(
+                    canTargetCondition: (cardSource) => CanSelectCardConditionKimeramon(cardSource) || CanSelectCardConditionMachinedramon(cardSource),
+                    canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
+                    canEndSelectCondition: CanEndSelectCondition,
+                    canNoSelect: () => true,
+                    selectCardCoroutine: null,
+                    afterSelectCardCoroutine: AfterSelectCardCoroutine1,
+                    message: "Select cards to place at the bottom of the deck\n(cards will be placed back to the bottom of the deck so that cards with lower numbers are on top).",
+                    maxCount: maxCount,
+                    canEndNotMax: false,
+                    isShowOpponent: false,
+                    mode: SelectCardEffect.Mode.Custom,
+                    root: SelectCardEffect.Root.Trash,
+                    customRootCardList: null,
+                    canLookReverseCard: true,
+                    selectPlayer: card.Owner,
+                    cardEffect: activateClass);
+
+                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
+
+                    bool CanTargetCondition_ByPreSelecetedList(List<CardSource> cardSources, CardSource cardSource)
                     {
                     {
-                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
+                        if (cardSources.Count(CanSelectCardConditionKimeramon) >= 1)
                         {
                         {
-                            if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardConditionKimeramon))
+                            if (CanSelectCardConditionKimeramon(cardSource))
                             {
                             {
-                                if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, CanSelectCardConditionMachinedramon))
+                                if (!CanSelectCardConditionMachinedramon(cardSource))
                                 {
                                 {
-                                    int maxCount = 2;
-
-                                    SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
-
-                                    selectCardEffect.SetUp(
-                                    canTargetCondition: (cardSource) => CanSelectCardConditionKimeramon(cardSource) || CanSelectCardConditionMachinedramon(cardSource),
-                                    canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
-                                    canEndSelectCondition: CanEndSelectCondition,
-                                    canNoSelect: () => true,
-                                    selectCardCoroutine: null,
-                                    afterSelectCardCoroutine: AfterSelectCardCoroutine1,
-                                    message: "Select cards to place at the bottom of the deck\n(cards will be placed back to the bottom of the deck so that cards with lower numbers are on top).",
-                                    maxCount: maxCount,
-                                    canEndNotMax: false,
-                                    isShowOpponent: false,
-                                    mode: SelectCardEffect.Mode.Custom,
-                                    root: SelectCardEffect.Root.Trash,
-                                    customRootCardList: null,
-                                    canLookReverseCard: true,
-                                    selectPlayer: card.Owner,
-                                    cardEffect: activateClass);
-
-                                    selectCardEffect.SetNotShowCard();
-                                    selectCardEffect.SetNotAddLog();
-
-                                    yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
-
-                                    bool CanTargetCondition_ByPreSelecetedList(List<CardSource> cardSources, CardSource cardSource)
-                                    {
-                                        if (cardSources.Count(CanSelectCardConditionKimeramon) >= 1)
-                                        {
-                                            if (CanSelectCardConditionKimeramon(cardSource))
-                                            {
-                                                if (!CanSelectCardConditionMachinedramon(cardSource))
-                                                {
-                                                    return false;
-                                                }
-                                            }
-                                        }
+                                    return false;
+                                }
+                            }
+                        }
 
 
-                                        if (cardSources.Count(CanSelectCardConditionMachinedramon) >= 1)
-                                        {
-                                            if (CanSelectCardConditionMachinedramon(cardSource))
-                                            {
-                                                if (!CanSelectCardConditionKimeramon(cardSource))
-                                                {
-                                                    return false;
-                                                }
-                                            }
-                                        }
+                        if (cardSources.Count(CanSelectCardConditionMachinedramon) >= 1)
+                        {
+                            if (CanSelectCardConditionMachinedramon(cardSource))
+                            {
+                                if (!CanSelectCardConditionKimeramon(cardSource))
+                                {
+                                    return false;
+                                }
+                            }
+                        }
 
 
-                                        return true;
-                                    }
+                        return true;
+                    }
 
 
-                                    bool CanEndSelectCondition(List<CardSource> cardSources)
-                                    {
-                                        if (cardSources.Count(CanSelectCardConditionKimeramon) == 0)
-                                        {
-                                            return false;
-                                        }
+                    bool CanEndSelectCondition(List<CardSource> cardSources)
+                    {
+                        if (cardSources.Count(CanSelectCardConditionKimeramon) == 0)
+                        {
+                            return false;
+                        }
 
 
-                                        if (cardSources.Count(CanSelectCardConditionMachinedramon) == 0)
-                                        {
-                                            return false;
-                                        }
+                        if (cardSources.Count(CanSelectCardConditionMachinedramon) == 0)
+                        {
+                            return false;
+                        }
 
 
-                                        return true;
-                                    }
+                        return true;
+                    }
 
 
-                                    IEnumerator AfterSelectCardCoroutine1(List<CardSource> cardSources)
-                                    {
-                                        if (cardSources.Count == 2)
-                                        {
-                                            yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(cardSources));
+                    IEnumerator AfterSelectCardCoroutine1(List<CardSource> cardSources)
+                    {
+                        if (cardSources.Count == 2)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddLibraryBottomCards(cardSources));
 
 
-                                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(cardSources, "Deck Bottom Cards", true, true));
+                            yield return ContinuousController.instance.StartCoroutine(GManager.instance.GetComponent<Effects>().ShowCardEffect(cardSources, "Deck Bottom Cards", true, true));
 
 
-                                            returned = true;
-                                        }
-                                    }
-                                }
-                            }
+                            returned = true;
                         }
                         }
                     }
                     }
 
 
@@ -394,13 +482,13 @@ namespace DCGO.CardEffects.BT18
                     {
                     {
                         if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardConditionMilleniummon(cardSource)))
                         if (CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, (cardSource) => CanSelectCardConditionMilleniummon(cardSource)))
                         {
                         {
-                            int maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardConditionMilleniummon(cardSource)));
+                            maxCount = Math.Min(1, card.Owner.TrashCards.Count((cardSource) => CanSelectCardConditionMilleniummon(cardSource)));
 
 
                             List<CardSource> selectedCards = new List<CardSource>();
                             List<CardSource> selectedCards = new List<CardSource>();
 
 
-                            SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+                            SelectCardEffect selectPlayEffect = GManager.instance.GetComponent<SelectCardEffect>();
 
 
-                            selectCardEffect.SetUp(
+                            selectPlayEffect.SetUp(
                                         canTargetCondition: CanSelectCardConditionMilleniummon,
                                         canTargetCondition: CanSelectCardConditionMilleniummon,
                                         canTargetCondition_ByPreSelecetedList: null,
                                         canTargetCondition_ByPreSelecetedList: null,
                                         canEndSelectCondition: null,
                                         canEndSelectCondition: null,
@@ -418,10 +506,10 @@ namespace DCGO.CardEffects.BT18
                                         selectPlayer: card.Owner,
                                         selectPlayer: card.Owner,
                                         cardEffect: activateClass);
                                         cardEffect: activateClass);
 
 
-                            selectCardEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
-                            selectCardEffect.SetUpCustomMessage_ShowCard("Played Card");
+                            selectPlayEffect.SetUpCustomMessage("Select 1 card to play.", "The opponent is selecting 1 card to play.");
+                            selectPlayEffect.SetUpCustomMessage_ShowCard("Played Card");
 
 
-                            yield return StartCoroutine(selectCardEffect.Activate());
+                            yield return StartCoroutine(selectPlayEffect.Activate());
 
 
                             IEnumerator SelectCardCoroutine(CardSource cardSource)
                             IEnumerator SelectCardCoroutine(CardSource cardSource)
                             {
                             {

+ 64 - 6
Assets/CardEffect/BT18/Red/WindtoFlameIcetoSword_BT18_095.cs

@@ -2,6 +2,7 @@ using System;
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Linq;
 using System.Linq;
+using System.Security.Cryptography;
 
 
 namespace DCGO.CardEffects.BT18
 namespace DCGO.CardEffects.BT18
 {
 {
@@ -103,8 +104,8 @@ namespace DCGO.CardEffects.BT18
                                 selectHandEffect.SetUp(
                                 selectHandEffect.SetUp(
                                     selectPlayer: card.Owner,
                                     selectPlayer: card.Owner,
                                     canTargetCondition: SelectHybridCardCondition,
                                     canTargetCondition: SelectHybridCardCondition,
-                                    canTargetCondition_ByPreSelecetedList: null,
-                                    canEndSelectCondition: null,
+                                    canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
+                                    canEndSelectCondition: CanEndSelectCondition,
                                     maxCount: Math.Min(5,
                                     maxCount: Math.Min(5,
                                         CardEffectCommons.MatchConditionOwnersCardCountInHand(card, SelectHybridCardCondition)),
                                         CardEffectCommons.MatchConditionOwnersCardCountInHand(card, SelectHybridCardCondition)),
                                     canNoSelect: true,
                                     canNoSelect: true,
@@ -127,8 +128,8 @@ namespace DCGO.CardEffects.BT18
 
 
                                 selectCardEffect.SetUp(
                                 selectCardEffect.SetUp(
                                     canTargetCondition: SelectHybridCardCondition,
                                     canTargetCondition: SelectHybridCardCondition,
-                                    canTargetCondition_ByPreSelecetedList: null,
-                                    canEndSelectCondition: null,
+                                    canTargetCondition_ByPreSelecetedList: CanTargetCondition_ByPreSelecetedList,
+                                    canEndSelectCondition: CanEndSelectCondition,
                                     canNoSelect: () => true,
                                     canNoSelect: () => true,
                                     selectCardCoroutine: null,
                                     selectCardCoroutine: null,
                                     afterSelectCardCoroutine: SelectCardCoroutine,
                                     afterSelectCardCoroutine: SelectCardCoroutine,
@@ -147,6 +148,62 @@ namespace DCGO.CardEffects.BT18
                                 yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
                                 yield return ContinuousController.instance.StartCoroutine(selectCardEffect.Activate());
                             }
                             }
 
 
+                            bool CanTargetCondition_ByPreSelecetedList(List<CardSource> cardSources, CardSource cardSource)
+                            {
+                                List<string> cardNames = new List<string>();
+
+                                foreach (CardSource cardSource1 in cardSources)
+                                {
+                                    if (!cardNames.Any(x => cardSource1.CardNames.Any(y => y == x)))
+                                    {
+                                        cardNames.Add(cardSource1.CardID);
+                                    }
+                                }
+
+                                foreach (CardSource cardSource1 in digivolutionCards)
+                                {
+                                    if (!cardNames.Any(x => cardSource1.CardNames.Any(y => y == x)))
+                                    {
+                                        cardNames.Add(cardSource1.CardID);
+                                    }
+                                }
+
+                                if (cardNames.Any(x => cardSource.CardNames.Any(y => y == x)))
+                                {
+                                    return false;
+                                }
+
+                                return true;
+                            }
+
+                            bool CanEndSelectCondition(List<CardSource> cardSources)
+                            {
+                                List<string> cardNames = new List<string>();
+
+                                foreach (CardSource cardSource1 in cardSources)
+                                {
+                                    if (!cardNames.Any(x => cardSource1.CardNames.Any(y => y == x)))
+                                    {
+                                        cardNames.Add(cardSource1.CardID);
+                                    }
+                                }
+
+                                foreach (CardSource cardSource1 in digivolutionCards)
+                                {
+                                    if (!cardNames.Any(x => cardSource1.CardNames.Any(y => y == x)))
+                                    {
+                                        cardNames.Add(cardSource1.CardID);
+                                    }
+                                }
+
+                                if (cardNames.Count != cardSources.Count + digivolutionCards.Count)
+                                {
+                                    return false;
+                                }
+
+                                return true;
+                            }
+
                             IEnumerator SelectCardCoroutine(List<CardSource> cardSources)
                             IEnumerator SelectCardCoroutine(List<CardSource> cardSources)
                             {
                             {
                                 digivolutionCards.AddRange(cardSources);
                                 digivolutionCards.AddRange(cardSources);
@@ -276,13 +333,14 @@ namespace DCGO.CardEffects.BT18
                                     CardEffectCommons.DigivolveIntoHandOrTrashCard(
                                     CardEffectCommons.DigivolveIntoHandOrTrashCard(
                                         targetPermanent: selectedPermanent,
                                         targetPermanent: selectedPermanent,
                                         cardCondition: DigivolveToCardCondition,
                                         cardCondition: DigivolveToCardCondition,
-                                        payCost: true,
+                                        payCost: false,
                                         reduceCostTuple: null,
                                         reduceCostTuple: null,
                                         fixedCostTuple: null,
                                         fixedCostTuple: null,
                                         ignoreDigivolutionRequirementFixedCost: 0,
                                         ignoreDigivolutionRequirementFixedCost: 0,
                                         isHand: fromHand,
                                         isHand: fromHand,
                                         activateClass: activateClass,
                                         activateClass: activateClass,
-                                        successProcess: null));
+                                        successProcess: null,
+                                        ignoreRequirements:CardEffectCommons.IgnoreRequirement.All));
                             }
                             }
                         }
                         }
                     }
                     }

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

@@ -1,5 +1,6 @@
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
+using System.Diagnostics;
 
 
 namespace DCGO.CardEffects.BT18
 namespace DCGO.CardEffects.BT18
 {
 {
@@ -141,15 +142,7 @@ namespace DCGO.CardEffects.BT18
             {
             {
                 bool PermanentCondition(Permanent permanent)
                 bool PermanentCondition(Permanent permanent)
                 {
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
-                    {
-                        if (permanent.DP == 0)
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return (permanent.DP == 0);
                 }
                 }
 
 
                 bool NonWhiteDigimon(Permanent permanent)
                 bool NonWhiteDigimon(Permanent permanent)

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

@@ -180,6 +180,7 @@ namespace DCGO.CardEffects.BT18
                     "Place Tamer digivolution cards as your bottom security cards to trash Opponent's security cards", CanUseCondition,
                     "Place Tamer digivolution cards as your bottom security cards to trash Opponent's security cards", CanUseCondition,
                     card);
                     card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDescription());
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDescription());
+                activateClass.SetHashString("WhenAttacking_BT18-102");
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDescription()
                 string EffectDescription()

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

@@ -217,7 +217,7 @@ namespace DCGO.CardEffects.BT18
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                     }
                     }
 
 
-                    if (card.Owner.SecurityCards.Count >= 6)
+                    if (card.Owner.SecurityCards.Count == 0)
                     {
                     {
                         yield return ContinuousController.instance.StartCoroutine(new IRecovery(card.Owner, 1, activateClass).Recovery());
                         yield return ContinuousController.instance.StartCoroutine(new IRecovery(card.Owner, 1, activateClass).Recovery());
                     }
                     }

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

@@ -179,14 +179,14 @@ namespace DCGO.CardEffects.BT18
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Unsuspend this Digimon", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Unsuspend this Digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetIsInheritedEffect(true);
                 activateClass.SetIsInheritedEffect(true);
                 activateClass.SetHashString("Unsuspend_BT18_039");
                 activateClass.SetHashString("Unsuspend_BT18_039");
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()
                 {
                 {
-                    return "[All Turns][Once Per Turn] When a card is removed from your security stack, unsuspend this Digimon.";
+                    return "[All Turns] [Once Per Turn] When your security stack is removed from, this Digimon may unsuspend.";
                 }
                 }
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)

+ 4 - 3
Assets/CardEffect/BT18/Yellow/Patamon_BT18_033.cs

@@ -11,7 +11,7 @@ namespace DCGO.CardEffects.BT18
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
 
             #region Main
             #region Main
-            if (timing == EffectTiming.OnEndTurn)
+            if (timing == EffectTiming.OnDeclaration)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Delete your 1 Digimon to play 1 Digimon from hand", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Delete your 1 Digimon to play 1 Digimon from hand", CanUseCondition, card);
@@ -20,7 +20,7 @@ namespace DCGO.CardEffects.BT18
 
 
                 string EffectDiscription()
                 string EffectDiscription()
                 {
                 {
-                    return "[End of Your Turn] If your breeding area is empty, by returning 1 Digimon card with the [Three Great Angels] trait from your trash to the bottom of the deck, play this card in your breeding area without paying the cost.";
+                    return "[Main] If your breeding area is empty, by returning 1 Digimon card with the [Three Great Angels] trait from your trash to the bottom of the deck, play this card in your breeding area without paying the cost.";
                 }
                 }
 
 
                 bool CanSelectCardCondition(CardSource cardSource)
                 bool CanSelectCardCondition(CardSource cardSource)
@@ -38,7 +38,8 @@ namespace DCGO.CardEffects.BT18
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)
                 {
                 {
-                    return card.Owner.GetBreedingAreaPermanents().Count == 0 &&
+                    return CardEffectCommons.IsOwnerTurn(card) &&
+                           card.Owner.GetBreedingAreaPermanents().Count == 0 &&
                            CardEffectCommons.HasMatchConditionOwnersCardInTrash(card,CanSelectCardCondition) &&
                            CardEffectCommons.HasMatchConditionOwnersCardInTrash(card,CanSelectCardCondition) &&
                            card.Owner.HandCards.Contains(card);
                            card.Owner.HandCards.Contains(card);
                 }
                 }

+ 4 - 4
Assets/CardEffect/BT19/Black/DarkKnightmon_BT19_063.cs

@@ -110,7 +110,7 @@ namespace DCGO.CardEffects.BT19
 
 
                 bool CanSelectPermanentCondition1(Permanent permanent)
                 bool CanSelectPermanentCondition1(Permanent permanent)
                 {
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleArea(permanent, card))
+                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
                     {
                     {
                         if(permanent.TopCard.IsDigimon || permanent.TopCard.IsTamer)
                         if(permanent.TopCard.IsDigimon || permanent.TopCard.IsTamer)
                         {
                         {
@@ -189,7 +189,7 @@ namespace DCGO.CardEffects.BT19
                                 canTargetCondition_ByPreSelecetedList: null,
                                 canTargetCondition_ByPreSelecetedList: null,
                                 canEndSelectCondition: null,
                                 canEndSelectCondition: null,
                                 maxCount: maxCount,
                                 maxCount: maxCount,
-                                canNoSelect: false,
+                                canNoSelect: true,
                                 canEndNotMax: false,
                                 canEndNotMax: false,
                                 selectPermanentCoroutine: null,
                                 selectPermanentCoroutine: null,
                                 afterSelectPermanentCoroutine: null,
                                 afterSelectPermanentCoroutine: null,
@@ -223,7 +223,7 @@ namespace DCGO.CardEffects.BT19
 
 
                 bool CanSelectPermanentCondition1(Permanent permanent)
                 bool CanSelectPermanentCondition1(Permanent permanent)
                 {
                 {
-                    if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
+                    if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
                     {
                     {
                         if (permanent.TopCard.IsDigimon || permanent.TopCard.IsTamer)
                         if (permanent.TopCard.IsDigimon || permanent.TopCard.IsTamer)
                         {
                         {
@@ -303,7 +303,7 @@ namespace DCGO.CardEffects.BT19
                                 canTargetCondition_ByPreSelecetedList: null,
                                 canTargetCondition_ByPreSelecetedList: null,
                                 canEndSelectCondition: null,
                                 canEndSelectCondition: null,
                                 maxCount: maxCount,
                                 maxCount: maxCount,
-                                canNoSelect: false,
+                                canNoSelect: true,
                                 canEndNotMax: false,
                                 canEndNotMax: false,
                                 selectPermanentCoroutine: null,
                                 selectPermanentCoroutine: null,
                                 afterSelectPermanentCoroutine: null,
                                 afterSelectPermanentCoroutine: null,

+ 13 - 12
Assets/CardEffect/BT19/Black/Machinedramon_BT19_065.cs

@@ -30,7 +30,7 @@ namespace DCGO.CardEffects.BT19
                 {
                 {
                     if (cardSource == card)
                     if (cardSource == card)
                     {
                     {
-                        DigiXrosConditionElement element = new DigiXrosConditionElement(CanSelectCardCondition, "1 Digimon card with [Xros Heart] or [Blue Flare] trait");
+                        DigiXrosConditionElement element = new DigiXrosConditionElement(CanSelectCardCondition, "5 Lv.5 or lower [Cyborg]/[Composite] trait Digimon cards w/different card numbers.");
 
 
                         bool CanSelectCardCondition(CardSource cardSource)
                         bool CanSelectCardCondition(CardSource cardSource)
                         {
                         {
@@ -40,14 +40,17 @@ namespace DCGO.CardEffects.BT19
                                 {
                                 {
                                     if (cardSource.IsDigimon)
                                     if (cardSource.IsDigimon)
                                     {
                                     {
-                                        if (cardSource.EqualsTraits("Cyborg"))
+                                        if(cardSource.HasLevel && cardSource.Level <= 5)
                                         {
                                         {
-                                            return true;
-                                        }
-
-                                        if (cardSource.EqualsTraits("Composite"))
-                                        {
-                                            return true;
+                                            if (cardSource.EqualsTraits("Cyborg"))
+                                            {
+                                                return true;
+                                            }
+
+                                            if (cardSource.EqualsTraits("Composite"))
+                                            {
+                                                return true;
+                                            }
                                         }
                                         }
                                     }
                                     }
                                 }
                                 }
@@ -219,8 +222,7 @@ namespace DCGO.CardEffects.BT19
                 {
                 {
                     return source.IsDigimon &&
                     return source.IsDigimon &&
                            source.HasLevel && source.Level <= 5 &&
                            source.HasLevel && source.Level <= 5 &&
-                           source.EqualsTraits("Cyborg") &&
-                           source.EqualsTraits("Composite") &&
+                           (source.EqualsTraits("Cyborg") || source.EqualsTraits("Composite")) &&
                            CardEffectCommons.CanPlayAsNewPermanent(source, false, activateClass,SelectCardEffect.Root.Trash);
                            CardEffectCommons.CanPlayAsNewPermanent(source, false, activateClass,SelectCardEffect.Root.Trash);
                 }
                 }
 
 
@@ -296,8 +298,7 @@ namespace DCGO.CardEffects.BT19
                 bool CanSelectPermanentCondition(Permanent permanent)
                 bool CanSelectPermanentCondition(Permanent permanent)
                 {
                 {
                     return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
                     return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
-                           permanent.TopCard.EqualsTraits("Composite") &&
-                           permanent.TopCard.EqualsTraits("Wicked God");
+                           (permanent.TopCard.EqualsTraits("Composite") || permanent.TopCard.EqualsTraits("Wicked God"));
                 }
                 }
 
 
                 bool PermanentCondition(Permanent permanent)
                 bool PermanentCondition(Permanent permanent)

+ 3 - 3
Assets/CardEffect/BT19/Green/Chamblemon_BT19_046.cs

@@ -27,12 +27,12 @@ namespace DCGO.CardEffects.BT19
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Suspend 1 digimon, then 1 Digimon with [Data] trait can't unsuspend", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Suspend 1 digimon, then 1 Digimon with [Data] trait can't unsuspend", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()
                 {
                 {
-                    return "[On Play] [When Digivolving] Suspend 1 of your opponent's Digimon. Then, 1 of their Digimon with the [Data] trait can't unsuspend until the end of their turn.";
+                    return "[On Play] Suspend 1 of your opponent's Digimon. Then, 1 of their Digimon with the [Data] trait can't unsuspend until the end of their turn.";
                 }
                 }
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)
@@ -112,7 +112,7 @@ namespace DCGO.CardEffects.BT19
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Suspend 1 digimon, then 1 Digimon with [Data] trait can't unsuspend", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Suspend 1 digimon, then 1 Digimon with [Data] trait can't unsuspend", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()

+ 31 - 17
Assets/CardEffect/BT19/Green/HornetEraser_BT19_096.cs

@@ -63,25 +63,39 @@ namespace DCGO.CardEffects.BT19
                 {
                 {
                     if(CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsRoyalBaseDigimon))
                     if(CardEffectCommons.HasMatchConditionOwnersCardInTrash(card, IsRoyalBaseDigimon))
                     {
                     {
-                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
-
-                        selectHandEffect.SetUp(
-                            selectPlayer: card.Owner,
-                            canTargetCondition: IsRoyalBaseDigimon,
-                            canTargetCondition_ByPreSelecetedList: null,
-                            canEndSelectCondition: null,
-                            maxCount: 1,
-                            canNoSelect: true,
-                            canEndNotMax: false,
-                            isShowOpponent: true,
-                            selectCardCoroutine: null,
-                            afterSelectCardCoroutine: null,
-                            mode: SelectHandEffect.Mode.PutSecurityBottom,
-                            cardEffect: activateClass);
+                        CardSource selectedCard = null;
+
+                        SelectCardEffect selectCardEffect = GManager.instance.GetComponent<SelectCardEffect>();
+
+                        selectCardEffect.SetUp(
+                                    canTargetCondition: IsRoyalBaseDigimon,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    canNoSelect: () => true,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    message: "Select 1 card to place as face up bottom security.",
+                                    maxCount: 1,
+                                    canEndNotMax: false,
+                                    isShowOpponent: true,
+                                    mode: SelectCardEffect.Mode.Custom,
+                                    root: SelectCardEffect.Root.Trash,
+                                    customRootCardList: null,
+                                    canLookReverseCard: true,
+                                    selectPlayer: card.Owner,
+                                    cardEffect: activateClass);
+
+                        yield return StartCoroutine(selectCardEffect.Activate());
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCard = cardSource;
 
 
-                        selectHandEffect.SetIsFaceup();
+                            yield return null;
+                        }
 
 
-                        yield return StartCoroutine(selectHandEffect.Activate());
+                        if (selectedCard != null)
+                            yield return ContinuousController.instance.StartCoroutine(CardObjectController.AddSecurityCard(selectedCard, false, true));
                     }
                     }
 
 
                     if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, IsOpponenetsDigimon))
                     if (CardEffectCommons.HasMatchConditionOpponentsPermanent(card, IsOpponenetsDigimon))

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

@@ -238,8 +238,10 @@ namespace DCGO.CardEffects.BT19
                         {
                         {
                             if (!CardEffectCommons.IsByBattle(hashtable))
                             if (!CardEffectCommons.IsByBattle(hashtable))
                             {
                             {
-                                if (CardEffectCommons.GetCardEffectFromHashtable(hashtable) != activateClass)
-                                    return true;
+                                if (CardEffectCommons.IsByEffect(hashtable, effect => effect.IsSameEffect(activateClass)))
+                                    return false;
+
+                                return true;
                             }
                             }
                         }
                         }
                     }
                     }

+ 48 - 15
Assets/CardEffect/BT19/Purple/LordKnightmonXAntibody_BT19_073.cs

@@ -1,5 +1,6 @@
 using System.Collections;
 using System.Collections;
 using System.Collections.Generic;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using System.Linq;
 
 
 namespace DCGO.CardEffects.BT19
 namespace DCGO.CardEffects.BT19
@@ -98,7 +99,7 @@ namespace DCGO.CardEffects.BT19
                         canTargetCondition: IsOpponenetsDigimon,
                         canTargetCondition: IsOpponenetsDigimon,
                         canTargetCondition_ByPreSelecetedList: null,
                         canTargetCondition_ByPreSelecetedList: null,
                         canEndSelectCondition: null,
                         canEndSelectCondition: null,
-                        maxCount: maxCount,
+                        maxCount: 1,
                         canNoSelect: false,
                         canNoSelect: false,
                         canEndNotMax: false,
                         canEndNotMax: false,
                         selectPermanentCoroutine: SelectPermanentCoroutine,
                         selectPermanentCoroutine: SelectPermanentCoroutine,
@@ -186,20 +187,18 @@ namespace DCGO.CardEffects.BT19
             #endregion
             #endregion
 
 
             #region All Turns Shared
             #region All Turns Shared
+
             string EffectName()
             string EffectName()
             {
             {
                 return "+3000 DP";
                 return "+3000 DP";
             }
             }
             bool AllTurnPermanentCondition(Permanent permanent)
             bool AllTurnPermanentCondition(Permanent permanent)
             {
             {
-                if (CardEffectCommons.IsPermanentExistsOnBattleArea(permanent))
+                if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                 {
                 {
-                    if (permanent.IsDigimon)
+                    if (permanent.TopCard.HasText("Knightmon"))
                     {
                     {
-                        if (permanent.TopCard.HasText("Knightmon"))
-                        {
-                            return true;
-                        }
+                        return true;
                     }
                     }
                 }
                 }
 
 
@@ -208,7 +207,7 @@ namespace DCGO.CardEffects.BT19
 
 
             bool HasKnighmonOrXAntibody(CardSource source)
             bool HasKnighmonOrXAntibody(CardSource source)
             {
             {
-                return source.EqualsCardName("X Antibody") || source.EqualsCardName("Knightmon");
+                return source.EqualsCardName("X Antibody") || source.EqualsCardName("LordKnightmon");
             }
             }
 
 
             bool CanUseAllTurnsCondition()
             bool CanUseAllTurnsCondition()
@@ -216,6 +215,7 @@ namespace DCGO.CardEffects.BT19
                 return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
                 return CardEffectCommons.IsExistOnBattleAreaDigimon(card) &&
                        card.PermanentOfThisCard().DigivolutionCards.Count(HasKnighmonOrXAntibody) > 0;
                        card.PermanentOfThisCard().DigivolutionCards.Count(HasKnighmonOrXAntibody) > 0;
             }
             }
+
             #endregion
             #endregion
 
 
             #region All Turns
             #region All Turns
@@ -228,14 +228,47 @@ namespace DCGO.CardEffects.BT19
                     card: card, 
                     card: card, 
                     condition: CanUseAllTurnsCondition,
                     condition: CanUseAllTurnsCondition,
                     effectName: EffectName));
                     effectName: EffectName));
-            }
 
 
-            if(timing == EffectTiming.OnAllyAttack)
-            {
-                cardEffects.Add(CardEffectFactory.AllianceStaticEffect(
-                    permanentCondition: AllTurnPermanentCondition,
-                    isInheritedEffect: false,
-                    card: card, condition: CanUseAllTurnsCondition));
+                AddSkillClass addSkillClass = new AddSkillClass();
+                addSkillClass.SetUpICardEffect("Your Digimons gain Alliance", CanUseCondition, card);
+                addSkillClass.SetUpAddSkillClass(cardSourceCondition: CardSourceCondition, getEffects: GetEffects);
+                cardEffects.Add(addSkillClass);
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CanUseAllTurnsCondition();
+                }
+
+                bool CardSourceCondition(CardSource cardSource)
+                {
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(cardSource))
+                    {
+                        if (cardSource == cardSource.PermanentOfThisCard().TopCard)
+                        {
+                            if (AllTurnPermanentCondition(cardSource.PermanentOfThisCard()))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                List<ICardEffect> GetEffects(CardSource cardSource, List<ICardEffect> cardEffects, EffectTiming _timing)
+                {
+                    if (_timing == EffectTiming.OnAllyAttack)
+                    {
+                        bool Condition()
+                        {
+                            return CardSourceCondition(cardSource);
+                        }
+
+                        cardEffects.Add(CardEffectFactory.AllianceSelfEffect(false, cardSource, Condition));
+                    }
+
+                    return cardEffects;
+                }
             }
             }
             #endregion
             #endregion
 
 

+ 12 - 7
Assets/CardEffect/BT19/Purple/MoonMillenniummon_BT19_075.cs

@@ -261,18 +261,23 @@ namespace DCGO.CardEffects.BT19
                             maxCount: 1,
                             maxCount: 1,
                             canNoSelect: true,
                             canNoSelect: true,
                             canEndNotMax: false,
                             canEndNotMax: false,
-                            selectPermanentCoroutine: null,
+                            selectPermanentCoroutine: SelectCompositeDigimon,
                             afterSelectPermanentCoroutine: null,
                             afterSelectPermanentCoroutine: null,
                             mode: SelectPermanentEffect.Mode.Custom,
                             mode: SelectPermanentEffect.Mode.Custom,
                             cardEffect: activateClass);
                             cardEffect: activateClass);
 
 
-                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon that will trash digivolution cards.", "The opponent is selecting 1 Digimon that will trash digivolution cards.");
+                        selectPermanentEffect.SetUpCustomMessage("Select 1 Digimon to delete.", "The opponent is selecting 1 Digimon to delete.");
 
 
-                        yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
-                        targetPermanents: new List<Permanent>() { card.PermanentOfThisCard() },
-                        activateClass: activateClass,
-                        successProcess: permanents => SuccessProcess(),
-                        failureProcess: null));
+                        yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
+
+                        IEnumerator SelectCompositeDigimon(Permanent permanent)
+                        {
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(
+                                targetPermanents: new List<Permanent>() { permanent },
+                                activateClass: activateClass,
+                                successProcess: permanents => SuccessProcess(),
+                                failureProcess: null));
+                        }
 
 
                         IEnumerator SuccessProcess()
                         IEnumerator SuccessProcess()
                         {
                         {

+ 15 - 4
Assets/CardEffect/BT19/Yellow/DynasmonXAntibody_BT19_042.cs

@@ -23,6 +23,18 @@ namespace DCGO.CardEffects.BT19
             }
             }
             #endregion
             #endregion
 
 
+            #region Raid/Blocker
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                cardEffects.Add(CardEffectFactory.RaidSelfEffect(isInheritedEffect: false, card: card, condition: null));
+            }
+
+            if (timing == EffectTiming.None)
+            {
+                cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
+            }
+            #endregion
+
             #region When Digivolving
             #region When Digivolving
             if (timing == EffectTiming.OnEnterFieldAnyone)
             if (timing == EffectTiming.OnEnterFieldAnyone)
             {
             {
@@ -54,7 +66,7 @@ namespace DCGO.CardEffects.BT19
                 {
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
                     {
-                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Dynasmon") || cardSource.Equals("XAntibody")) >= 1)
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Dynasmon") || cardSource.Equals("X Antibody")) >= 1)
                         {
                         {
                             if (card.Owner.SecurityCards.Count >= 1)
                             if (card.Owner.SecurityCards.Count >= 1)
                             {
                             {
@@ -116,7 +128,7 @@ namespace DCGO.CardEffects.BT19
                 {
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
                     {
-                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Dynasmon") || cardSource.EqualsCardName("XAntibody")) >= 1)
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Dynasmon") || cardSource.EqualsCardName("X Antibody")) >= 1)
                         {
                         {
                             if (card.Owner.SecurityCards.Count >= 1)
                             if (card.Owner.SecurityCards.Count >= 1)
                             {
                             {
@@ -147,13 +159,12 @@ namespace DCGO.CardEffects.BT19
             }
             }
             #endregion
             #endregion
 
 
-            #region Inherit
+            #region End of Turn
             if (timing == EffectTiming.OnEndTurn)
             if (timing == EffectTiming.OnEndTurn)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Recovery +1", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Recovery +1", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDiscription());
-                activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()

+ 1 - 2
Assets/CardEffect/BT19/Yellow/Dynasmon_BT19_041.cs

@@ -182,14 +182,13 @@ namespace DCGO.CardEffects.BT19
             }
             }
             #endregion
             #endregion
 
 
-            #region Inherit
+            #region All Turns
             if (timing == EffectTiming.WhenRemoveField)
             if (timing == EffectTiming.WhenRemoveField)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Recovery +1", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Recovery +1", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetHashString("Recovery_Dynasmon_BT19_041");
                 activateClass.SetHashString("Recovery_Dynasmon_BT19_041");
-                activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()

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

@@ -104,14 +104,14 @@ namespace DCGO.CardEffects.BT19
             if (timing == EffectTiming.OnEndTurn)
             if (timing == EffectTiming.OnEndTurn)
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Trash 1 card from hand to trash the opponents top security or Recovery +1", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Opponent may trash 1 card from secuirty or Recovery +1 and delete 1 Digimon or Tamer", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
                 activateClass.SetHashString("TrashSecurity_LucemonXAntibody_BT19_043");
                 activateClass.SetHashString("TrashSecurity_LucemonXAntibody_BT19_043");
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()
                 {
                 {
-                    return "[End of Your Turn][Once Per Turn] Your opponent may trash their top security card. If this effect didn't trash, <Recovery +1>, and delete 1 of your opponent's Digimon or Tamers.";
+                    return "[End of Your Turn] [Once Per Turn] Your opponent may trash their top security card. If this effect didn't trash, <Recovery +1 (Deck)>, and delete 1 of their Digimon or Tamers.";
                 }
                 }
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)

+ 9 - 13
Assets/CardEffect/BT19/Yellow/SeventhDivineCruz_BT19_094.cs

@@ -18,7 +18,7 @@ namespace DCGO.CardEffects.BT19
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Trash opponents top security card or Recovery +1", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Trash opponents top security card or Recovery +1", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true, EffectDiscription());
+                activateClass.SetUpActivateClass(null, ActivateCoroutine, -1, true, EffectDiscription());
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);
 
 
                 string EffectDiscription()
                 string EffectDiscription()
@@ -30,7 +30,7 @@ namespace DCGO.CardEffects.BT19
                 {
                 {
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
                     {
                     {
-                        if (permanent.TopCard.EqualsCardName("Lucemon(XAntibody)"))
+                        if (permanent.TopCard.EqualsCardName("Lucemon (X Antibody)"))
                         {
                         {
                             return true;
                             return true;
                         }
                         }
@@ -55,11 +55,6 @@ namespace DCGO.CardEffects.BT19
                     return false;
                     return false;
                 }
                 }
 
 
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    return CardEffectCommons.IsExistOnTrash(card);
-                }
-
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                 {
                     if (CardEffectCommons.IsExistOnTrash(card))
                     if (CardEffectCommons.IsExistOnTrash(card))
@@ -137,14 +132,15 @@ namespace DCGO.CardEffects.BT19
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)
                 {
                 {
-                    return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card);
+                    return CardEffectCommons.CanTriggerOptionMainEffect(hashtable, card) &&
+                           card.Owner.Enemy.GetBattleAreaDigimons().Count > card.Owner.SecurityCards.Count;
                 }
                 }
                 
                 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                 {
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     if (CardEffectCommons.HasMatchConditionPermanent(CanSelectPermanentCondition))
                     {
                     {
-                        int maxCount = card.Owner.SecurityCards.Count;
+                        int maxCount = Mathf.Max(0, card.Owner.Enemy.GetBattleAreaDigimons().Count - card.Owner.SecurityCards.Count);
 
 
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
                         SelectPermanentEffect selectPermanentEffect = GManager.instance.GetComponent<SelectPermanentEffect>();
 
 
@@ -156,8 +152,8 @@ namespace DCGO.CardEffects.BT19
                             maxCount: maxCount,
                             maxCount: maxCount,
                             canNoSelect: false,
                             canNoSelect: false,
                             canEndNotMax: false,
                             canEndNotMax: false,
-                            selectPermanentCoroutine: SelectPermanentCoroutine,
-                            afterSelectPermanentCoroutine: null,
+                            selectPermanentCoroutine: null,
+                            afterSelectPermanentCoroutine: SelectPermanentCoroutine,
                             mode: SelectPermanentEffect.Mode.Custom,
                             mode: SelectPermanentEffect.Mode.Custom,
                             cardEffect: activateClass);
                             cardEffect: activateClass);
 
 
@@ -165,9 +161,9 @@ namespace DCGO.CardEffects.BT19
 
 
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
                         yield return ContinuousController.instance.StartCoroutine(selectPermanentEffect.Activate());
 
 
-                        IEnumerator SelectPermanentCoroutine(Permanent permanent)
+                        IEnumerator SelectPermanentCoroutine(List<Permanent> permanents)
                         {
                         {
-                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: new List<Permanent>() { permanent }, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
+                            yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.DeletePeremanentAndProcessAccordingToResult(targetPermanents: permanents, activateClass: activateClass, successProcess: permanents => SuccessProcess(), failureProcess: null));
 
 
                             IEnumerator SuccessProcess()
                             IEnumerator SuccessProcess()
                             {
                             {

+ 1 - 1
Assets/CardEffect/BT19/Yellow/SkullBaluchimon_BT19_039.cs

@@ -205,7 +205,7 @@ namespace DCGO.CardEffects.BT19
             {
             {
                 ActivateClass activateClass = new ActivateClass();
                 ActivateClass activateClass = new ActivateClass();
                 activateClass.SetUpICardEffect("Unsuspend this Digimon", CanUseCondition, card);
                 activateClass.SetUpICardEffect("Unsuspend this Digimon", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription());
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true, EffectDiscription());
                 activateClass.SetHashString("Unsuspend_SkullBaluchimon_BT19_039");
                 activateClass.SetHashString("Unsuspend_SkullBaluchimon_BT19_039");
                 activateClass.SetIsInheritedEffect(true);
                 activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
                 cardEffects.Add(activateClass);

+ 16 - 25
Assets/CardEffect/BT19/Yellow/Tapirmon_BT19_029.cs

@@ -24,24 +24,19 @@ namespace DCGO.CardEffects.BT19
 
 
                 bool CanUseCondition(Hashtable hashtable)
                 bool CanUseCondition(Hashtable hashtable)
                 {
                 {
-                    if (card.Owner.SecurityCards.Count >= 1)
-                    {
-                        if (CardEffectCommons.CanTriggerOnPlay(hashtable, card))
-                        {
-                            return true;
-                        }
-                    }
-
-                    return false;
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
                 }
                 }
 
 
                 bool CanActivateCondition(Hashtable hashtable)
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                 {
-                    if (CardEffectCommons.CanActivateOnDeletionInherited(hashtable, card))
+                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
                     {
-                        if (card.Owner.CanAddMemory(activateClass))
+                        if (card.Owner.SecurityCards.Count >= 1)
                         {
                         {
-                            return true;
+                            if (card.Owner.CanAddMemory(activateClass))
+                            {
+                                return true;
+                            }
                         }
                         }
                     }
                     }
 
 
@@ -94,7 +89,8 @@ namespace DCGO.CardEffects.BT19
                 {
                 {
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
                     {
                     {
-                        if (card.CardColors.Contains(CardColor.Yellow) && (card.ContainsTraits("Data") || card.ContainsTraits("Witchelny")))
+                        Permanent thisPermanent = card.PermanentOfThisCard();
+                        if (thisPermanent.TopCard.CardColors.Contains(CardColor.Yellow) && (thisPermanent.TopCard.EqualsTraits("Data") || thisPermanent.TopCard.EqualsTraits("Witchelny")))
                         {
                         {
                             if (card.Owner.SecurityCards.Count >= 1)
                             if (card.Owner.SecurityCards.Count >= 1)
                                 return true;
                                 return true;
@@ -106,25 +102,20 @@ namespace DCGO.CardEffects.BT19
 
 
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 IEnumerator ActivateCoroutine(Hashtable _hashtable)
                 {
                 {
-                    if (CardEffectCommons.IsExistOnBattleAreaDigimon(card) || card.Owner.SecurityCards.Count >= 1)
-                    {
-                        yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
+                    yield return ContinuousController.instance.StartCoroutine(new IDestroySecurity(
                             player: card.Owner,
                             player: card.Owner,
                             destroySecurityCount: 1,
                             destroySecurityCount: 1,
                             cardEffect: activateClass,
                             cardEffect: activateClass,
                             fromTop: true).DestroySecurity());
                             fromTop: true).DestroySecurity());
 
 
-                        Permanent thisCardPermanent = card.PermanentOfThisCard();
-
-                        thisCardPermanent.willBeRemoveField = false;
+                    Permanent thisCardPermanent = card.PermanentOfThisCard();
 
 
-                        thisCardPermanent.HideDeleteEffect();
-                        thisCardPermanent.HideHandBounceEffect();
-                        thisCardPermanent.HideDeckBounceEffect();
-                        thisCardPermanent.HideWillRemoveFieldEffect();
+                    thisCardPermanent.willBeRemoveField = false;
 
 
-                        yield return null;
-                    }
+                    thisCardPermanent.HideDeleteEffect();
+                    thisCardPermanent.HideHandBounceEffect();
+                    thisCardPermanent.HideDeckBounceEffect();
+                    thisCardPermanent.HideWillRemoveFieldEffect();
                 }
                 }
             }
             }
             #endregion
             #endregion

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

@@ -46,7 +46,7 @@ namespace DCGO.CardEffects.BT19
                     {
                     {
                         if (cardSource.CardColors.Contains(CardColor.Yellow) || cardSource.CardColors.Contains(CardColor.Purple))
                         if (cardSource.CardColors.Contains(CardColor.Yellow) || cardSource.CardColors.Contains(CardColor.Purple))
                         {
                         {
-                            if(cardSource.HasPlayCost && cardSource.GetCostItself <= 5)
+                            if(cardSource.HasUseCost && cardSource.GetCostItself <= 5)
                             {
                             {
                                 return true;
                                 return true;
                             }                      
                             }                      
@@ -79,7 +79,7 @@ namespace DCGO.CardEffects.BT19
                         player: card.Owner,
                         player: card.Owner,
                         refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
                         refSkillInfos: ref ContinuousController.instance.nullSkillInfos).ReduceSecurity());
 
 
-                    if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Wizardmon") || cardSource.EqualsCardName("XAntibody")) >= 1)
+                    if (card.PermanentOfThisCard().DigivolutionCards.Count((cardSource) => cardSource.EqualsCardName("Wizardmon") || cardSource.EqualsCardName("X Antibody")) >= 1)
                     {
                     {
                         if (card.Owner.CanAddSecurity(activateClass))
                         if (card.Owner.CanAddSecurity(activateClass))
                         {
                         {

+ 1 - 1
Assets/Scripts/AutoProcessing.cs

@@ -224,7 +224,7 @@ public class AutoProcessing : MonoBehaviourPunCallbacks
         #endregion
         #endregion
 
 
         #region Is it necessary to deal with Digimon's DP shortage?
         #region Is it necessary to deal with Digimon's DP shortage?
-        if (CardEffectCommons.HasMatchConditionPermanent(IsDigimonLackDP, true))
+        if (CardEffectCommons.HasMatchConditionPermanent(IsDigimonLackDP))
         {
         {
             return true;
             return true;
         }
         }

+ 0 - 14
Assets/Scripts/CardEffectCommons/KeyWordEffects/Collision.cs

@@ -65,22 +65,8 @@ public partial class CardEffectCommons
     {
     {
         List<Permanent> enemyDigimons = cardSource.Owner.Enemy.GetBattleAreaDigimons();
         List<Permanent> enemyDigimons = cardSource.Owner.Enemy.GetBattleAreaDigimons();
 
 
-        /*bool PermanentCondition(Permanent permanent)
-        {
-            if (IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, cardSource))
-                return !permanent.TopCard.CanNotBeAffected(activateClass);
-
-            return false;
-        }*/
-
         if (CanActivateCollision(cardSource))
         if (CanActivateCollision(cardSource))
         {
         {
-            /*yield return ContinuousController.instance.StartCoroutine(GainBlockerPlayerEffect(
-                permanentCondition: PermanentCondition,
-                effectDuration: EffectDuration.UntilEndAttack,
-                activateClass: activateClass));
-            */
-
             foreach (Permanent enemyDigimon in enemyDigimons)
             foreach (Permanent enemyDigimon in enemyDigimons)
             {
             {
                 if (enemyDigimon.TopCard.CanNotBeAffected(activateClass))
                 if (enemyDigimon.TopCard.CanNotBeAffected(activateClass))

+ 40 - 13
Assets/Scripts/Permanent.cs

@@ -2023,7 +2023,7 @@ public class Permanent
     }
     }
     #endregion
     #endregion
 
 
-    #region 再起動を持つか
+    #region Has Reboot
     public bool HasReboot
     public bool HasReboot
     {
     {
         get
         get
@@ -2071,7 +2071,7 @@ public class Permanent
     }
     }
     #endregion
     #endregion
 
 
-    #region 突進を持つか
+    #region Has Raid
     public bool HasRaid
     public bool HasRaid
     {
     {
         get
         get
@@ -2092,7 +2092,7 @@ public class Permanent
     }
     }
     #endregion
     #endregion
 
 
-    #region 速攻を持つか
+    #region Has Rush
     public bool HasRush
     public bool HasRush
     {
     {
         get
         get
@@ -2140,7 +2140,7 @@ public class Permanent
     }
     }
     #endregion
     #endregion
 
 
-    #region 道連れを持つか
+    #region Has Retaliation
     public bool HasRetaliation
     public bool HasRetaliation
     {
     {
         get
         get
@@ -2181,7 +2181,7 @@ public class Permanent
     }
     }
     #endregion
     #endregion
 
 
-    #region 不屈を持つか
+    #region Has Fortitude
     public bool HasFortitude
     public bool HasFortitude
     {
     {
         get
         get
@@ -2232,7 +2232,7 @@ public class Permanent
     }
     }
     #endregion
     #endregion
 
 
-    #region 回避を持つか
+    #region Has Evade
     public bool HasEvade
     public bool HasEvade
     {
     {
         get
         get
@@ -2261,7 +2261,7 @@ public class Permanent
     }
     }
     #endregion
     #endregion
 
 
-    #region マインドリンクを持つか
+    #region Has Mind Link
     public bool HasMindLink
     public bool HasMindLink
     {
     {
         get
         get
@@ -2288,7 +2288,7 @@ public class Permanent
     }
     }
     #endregion
     #endregion
 
 
-    #region 防壁を持つか
+    #region Has Barrier
     public bool HasBarrier
     public bool HasBarrier
     {
     {
         get
         get
@@ -2316,20 +2316,47 @@ public class Permanent
     }
     }
     #endregion
     #endregion
 
 
-    #region 連携を持つか
+    #region Has Alliance
     public bool HasAlliance
     public bool HasAlliance
     {
     {
         get
         get
         {
         {
-            foreach (ICardEffect cardEffect in this.EffectList(EffectTiming.OnAllyAttack))
+            foreach (Player player in GManager.instance.turnStateMachine.gameContext.Players_ForTurnPlayer)
             {
             {
-                if (cardEffect is ActivateICardEffect)
+                foreach (Permanent permanent in player.GetFieldPermanents())
                 {
                 {
-                    if (cardEffect.EffectName == "Alliance")
+                    #region Permanent Effects
+                    foreach (ICardEffect cardEffect in permanent.EffectList(EffectTiming.OnAllyAttack))
                     {
                     {
-                        return true;
+                        if (cardEffect is IAllianceEffect)
+                        {
+                            if (cardEffect.CanTrigger(null))
+                            {
+                                if (((IAllianceEffect)cardEffect).HasAlliance(this))
+                                {
+                                    return true;
+                                }
+                            }
+                        }
                     }
                     }
+                    #endregion
                 }
                 }
+
+                #region Player Effects
+                foreach (ICardEffect cardEffect in player.EffectList(EffectTiming.OnAllyAttack))
+                {
+                    if (cardEffect is IAllianceEffect)
+                    {
+                        if (cardEffect.CanTrigger(null))
+                        {
+                            if (((IAllianceEffect)cardEffect).HasAlliance(this))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                }
+                #endregion
             }
             }
 
 
             return false;
             return false;

+ 3 - 5
Assets/Scripts/PlayLog.cs

@@ -118,10 +118,10 @@ public class PlayLog : MonoBehaviour
 
 
     public void AddLogString(string logText)
     public void AddLogString(string logText)
     {
     {
-        ContinuousController.instance.StartCoroutine(AddLogStringCoroutine(DataBase.ReplaceToASCII(logText)));
+        AddLogStringCoroutine(DataBase.ReplaceToASCII(logText));
     }
     }
 
 
-    IEnumerator AddLogStringCoroutine(string log)
+    void AddLogStringCoroutine(string log)
     {
     {
         
         
         _logList.Add(AddLink(log));
         _logList.Add(AddLink(log));
@@ -134,11 +134,9 @@ public class PlayLog : MonoBehaviour
             }
             }
         }
         }
 
 
-        if (gameObject.activeSelf)
+        if (gameObject != null && gameObject.activeSelf)
         {
         {
             _logText.text = GetLogString();
             _logText.text = GetLogString();
-
-            yield break;
         }
         }
     }
     }