Răsfoiți Sursa

Add level 3 and 4 blue cardEffects similar to red

Andrej Erdelsky 2 ani în urmă
părinte
comite
ddc7a290fb

+ 340 - 0
Assets/CardEffect/BT17/Blue/Gabumon_BT17_019.cs

@@ -0,0 +1,340 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using System.Linq;
+using System;
+using Photon.Pun;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Gabumon_BT17_019 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternate Digivolution
+
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.CardNames.Contains("Tsunomon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 0, ignoreDigivolutionRequirement: false,
+                    card: card, condition: null));
+            }
+
+            #endregion
+
+            #region Start of Your Main Phase
+
+            if (timing == EffectTiming.OnStartMainPhase)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[Start of Your Main Phase] If you have a Tamer with [Matt Ishida] in its name, [Draw 1].";
+                }
+
+                bool OwnTamerPermanentCondition(Permanent permanent)
+                {
+                    if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(permanent, card))
+                    {
+                        if (permanent.IsTamer)
+                        {
+                            if (permanent.TopCard.ContainsCardName("Matt Ishida") || permanent.TopCard.ContainsCardName("MattIshida"))
+
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, OwnTamerPermanentCondition))
+                        {
+                            if (card.Owner.LibraryCards.Count >= 1)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
+            }
+
+            #endregion
+
+            #region End of Your Turn - ESS
+
+            if (timing == EffectTiming.OnEndTurn)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("DNA digivolve this Digimon", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[End of Your Turn] This Digimon and another of your Digimon may DNA digivolve into a Digimon card in the hand.";
+                }
+
+                bool CanSelectCardCondition(CardSource cardSource)
+                {
+                    if (cardSource != null)
+                    {
+                        if (cardSource.IsDigimon)
+                        {
+                            if (cardSource.Owner == card.Owner)
+                            {
+                                if (cardSource.CanPlayJogress(true))
+                                {
+                                    if (isExistOnField(card))
+                                    {
+                                        if (cardSource.CanJogressFromTargetPermanent(card.PermanentOfThisCard(), true))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    if (isExistOnField(card))
+                    {
+                        return true;
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (CardEffectCommons.IsOwnerTurn(card))
+                        {
+                            if (card.Owner.HandCards.Count >= 1)
+                            {
+                                if (CardEffectCommons.HasMatchConditionOwnersPermanent(card,
+                                        (permanent) => permanent.IsDigimon && permanent != card.PermanentOfThisCard()))
+                                {
+                                    return true;
+                                }
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (isExistOnField(card))
+                    {
+                        if (card.Owner.GetBattleAreaDigimons().Contains(card.PermanentOfThisCard()))
+                        {
+                            if (card.Owner.HandCards.Count(CanSelectCardCondition) >= 1)
+                            {
+                                List<CardSource> selectedCards = new List<CardSource>();
+
+                                int maxCount = 1;
+
+                                SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                                selectHandEffect.SetUp(
+                                    selectPlayer: card.Owner,
+                                    canTargetCondition: CanSelectCardCondition,
+                                    canTargetCondition_ByPreSelecetedList: null,
+                                    canEndSelectCondition: null,
+                                    maxCount: maxCount,
+                                    canNoSelect: true,
+                                    canEndNotMax: false,
+                                    isShowOpponent: true,
+                                    selectCardCoroutine: SelectCardCoroutine,
+                                    afterSelectCardCoroutine: null,
+                                    mode: SelectHandEffect.Mode.Custom,
+                                    cardEffect: activateClass);
+
+                                selectHandEffect.SetUpCustomMessage("Select 1 card to DNA digivolve.",
+                                    "The opponent is selecting 1 card to DNA digivolve.");
+                                selectHandEffect.SetNotShowCard();
+
+                                yield return StartCoroutine(selectHandEffect.Activate());
+
+                                IEnumerator SelectCardCoroutine(CardSource cardSource)
+                                {
+                                    selectedCards.Add(cardSource);
+
+                                    yield return null;
+                                }
+
+                                if (selectedCards.Count >= 1)
+                                {
+                                    foreach (CardSource selectedCard in selectedCards)
+                                    {
+                                        if (selectedCard.CanPlayJogress(true) &&
+                                            selectedCard.CanJogressFromTargetPermanent(card.PermanentOfThisCard(),
+                                                true))
+                                        {
+                                            JogressEvoRootsFrameIDs = Array.Empty<int>();
+
+                                            yield return GManager.instance.photonWaitController.StartWait(
+                                                "Agumon_BT17_007");
+
+                                            if (card.Owner.isYou || GManager.instance.IsAI)
+                                            {
+                                                GManager.instance.selectJogressEffect.SetUp_SelectDigivolutionRoots
+                                                (card: selectedCard,
+                                                    isLocal: true,
+                                                    isPayCost: true,
+                                                    canNoSelect: true,
+                                                    endSelectCoroutine_SelectDigivolutionRoots:
+                                                    EndSelectCoroutineSelectDigivolutionRoots,
+                                                    noSelectCoroutine: null);
+
+                                                GManager.instance.selectJogressEffect.SetUpCustomPermanentConditions(
+                                                    new Func<Permanent, bool>[]
+                                                        { (permanent) => permanent == card.PermanentOfThisCard() });
+
+                                                yield return ContinuousController.instance.StartCoroutine(
+                                                    GManager.instance.selectJogressEffect.SelectDigivolutionRoots());
+
+                                                IEnumerator EndSelectCoroutineSelectDigivolutionRoots(
+                                                    List<Permanent> permanents)
+                                                {
+                                                    permanents = permanents.Distinct().ToList();
+
+                                                    if (permanents.Count == 2)
+                                                    {
+                                                        JogressEvoRootsFrameIDs = new int[2];
+
+                                                        for (int i = 0; i < permanents.Count; i++)
+                                                        {
+                                                            if (i < JogressEvoRootsFrameIDs.Length)
+                                                            {
+                                                                JogressEvoRootsFrameIDs[i] =
+                                                                    permanents[i].PermanentFrame.FrameID;
+                                                            }
+                                                        }
+                                                    }
+
+                                                    if (!permanents.Contains(card.PermanentOfThisCard()))
+                                                    {
+                                                        JogressEvoRootsFrameIDs = Array.Empty<int>();
+                                                    }
+
+                                                    yield return null;
+                                                }
+
+                                                photonView.RPC("SetJogressEvoRootsFrameIDs", RpcTarget.All,
+                                                    JogressEvoRootsFrameIDs);
+                                            }
+
+                                            else
+                                            {
+                                                GManager.instance.commandText.OpenCommandText(
+                                                    "The opponent is choosing a card to DNA digivolve.");
+                                            }
+
+                                            yield return new WaitWhile(() => !endSelect);
+                                            endSelect = false;
+
+                                            GManager.instance.commandText.CloseCommandText();
+                                            yield return new WaitWhile(() =>
+                                                GManager.instance.commandText.gameObject.activeSelf);
+
+                                            if (JogressEvoRootsFrameIDs.Length == 2)
+                                            {
+                                                yield return ContinuousController.instance.StartCoroutine(GManager
+                                                    .instance.GetComponent<Effects>()
+                                                    .ShowCardEffect(new List<CardSource>() { selectedCard },
+                                                        "Played Card", true, true));
+
+                                                PlayCardClass playCard = new PlayCardClass(
+                                                    cardSources: new List<CardSource>() { selectedCard },
+                                                    hashtable: CardEffectCommons.CardEffectHashtable(activateClass),
+                                                    payCost: true,
+                                                    targetPermanent: null,
+                                                    isTapped: false,
+                                                    root: SelectCardEffect.Root.Hand,
+                                                    activateETB: true);
+
+                                                playCard.SetJogress(JogressEvoRootsFrameIDs);
+
+                                                yield return ContinuousController.instance.StartCoroutine(
+                                                    playCard.PlayCard());
+                                            }
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+
+        #region Photon DNA ESS
+
+        bool endSelect;
+        int[] JogressEvoRootsFrameIDs = Array.Empty<int>();
+
+        [PunRPC]
+        public void SetJogressEvoRootsFrameIDs(int[] jogressEvoRootsFrameIDs)
+        {
+            this.JogressEvoRootsFrameIDs = jogressEvoRootsFrameIDs;
+            endSelect = true;
+        }
+
+        #endregion
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Blue/Gabumon_BT17_019.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c9fba0858e7a4ff43875aac449f77fe0
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 220 - 0
Assets/CardEffect/BT17/Blue/KendoGarurumon_BT17_023.cs

@@ -0,0 +1,220 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class KendoGarurumon_BT17_023 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternate Digivolution
+
+            // Koji Minamoto
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("Koji  Minamoto") ||
+                           targetPermanent.TopCard.ContainsCardName("KojiMinamoto");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            // Lobomon
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("Lobomon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 1, ignoreDigivolutionRequirement: false,
+                    card: card, condition: null));
+            }
+
+            // Any yellow tamer
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.IsTamer && targetPermanent.TopCard.CardColors.Contains(CardColor.Yellow);
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            #endregion
+
+            #region When Attacking Draw 1
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] [Draw 1].";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
+            }
+
+            #endregion
+
+            #region When Attacking
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("This Digimon digivolves", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] This Digimon may digivolve into a Digimon card with the [Hybrid] trait in the hand with the digivolution cost reduced by 1.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool IsHybridDigimonCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon && cardSource.ContainsTraits("Hybrid");
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(IsHybridDigimonCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (card.Owner.HandCards.Count(IsHybridDigimonCardCondition) >= 1)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                targetPermanent: card.PermanentOfThisCard(),
+                                cardCondition: IsHybridDigimonCardCondition,
+                                payCost: true,
+                                reduceCostTuple: (reduceCost: 1, reduceCostCardCondition: null),
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: -1,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null));
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking - ESS
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] If you have 7 or fewer cards in your hand, [Draw 1].";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count <= 7)
+                        {
+                            if (card.Owner.LibraryCards.Count >= 1)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Blue/KendoGarurumon_BT17_023.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 02f45c07f8321de4a941132ea147f5e0
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 228 - 0
Assets/CardEffect/BT17/Blue/Lobomon_BT17_022.cs

@@ -0,0 +1,228 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Lobomon_BT17_022 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region Alternate Digivolution
+
+            // Koji Minamoto
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("Koji  Minamoto") ||
+                           targetPermanent.TopCard.ContainsCardName("KojiMinamoto");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 2, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            // KendoGarurumon
+            if (timing == EffectTiming.None)
+            {
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.TopCard.ContainsCardName("KendoGarurumon");
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 1, ignoreDigivolutionRequirement: false,
+                    card: card, condition: null));
+            }
+
+            // Any yellow tamer
+            if (timing == EffectTiming.None)
+            {
+                bool Condition()
+                {
+                    return card.Owner.HandCards.Contains(card);
+                }
+
+                bool PermanentCondition(Permanent targetPermanent)
+                {
+                    return targetPermanent.IsTamer && targetPermanent.TopCard.CardColors.Contains(CardColor.Yellow);
+                }
+
+                cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
+                    permanentCondition: PermanentCondition, digivolutionCost: 3, ignoreDigivolutionRequirement: false,
+                    card: card, condition: Condition));
+            }
+
+            #endregion
+
+            #region When Digivolving
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("This Digimon digivolves into [AncientGarurumon]", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Digivolving] If [KendoGarurumon] is in this Digimon's digivolution cards or you have a black or purple Digimon or Tamer, this Digimon may digivolve into [KendoGarurumon] in the hand for a digivolution cost of 3, ignoring its digivolution requirements. If digivolved by this effect, delete this Digimon at the end of the turn.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerWhenDigivolving(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.PermanentOfThisCard().DigivolutionCards.Count(cardSource =>
+                                cardSource.CardNames.Contains("KendoGarurumon")) >= 1)
+                        {
+                            return true;
+                        }
+
+                        if (card.Owner.HandCards.Count >= 1)
+                        {
+                            if (CardEffectCommons.HasMatchConditionOwnersPermanent(card,
+                                    permanent =>
+                                        permanent.TopCard.CardColors.Contains(CardColor.Black) ||
+                                        permanent.TopCard.CardColors.Contains(CardColor.Purple)))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        Permanent thisPermanent = card.PermanentOfThisCard();
+
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                targetPermanent: thisPermanent,
+                                cardCondition: cardSource =>
+                                    cardSource.IsDigimon && cardSource.ContainsCardName("AncientGarurumon"),
+                                payCost: true,
+                                reduceCostTuple: null,
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: 3,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: SuccessProcess()));
+
+                        IEnumerator SuccessProcess()
+                        {
+                            ActivateClass activateClass1 = new ActivateClass();
+                            activateClass1.SetUpICardEffect("Delete this Digimon", CanUseSuccessCondition, card);
+                            activateClass1.SetUpActivateClass(CanActivateSuccessCondition, ActivateSuccessCoroutine, -1,
+                                false, "");
+                            activateClass1.SetEffectSourcePermanent(thisPermanent);
+                            CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilEachTurnEnd,
+                                card: card, cardEffect: activateClass1, timing: EffectTiming.OnEndTurn);
+
+                            bool CanUseSuccessCondition(Hashtable successHashtable)
+                            {
+                                return true;
+                            }
+
+                            bool CanActivateSuccessCondition(Hashtable successHashtable)
+                            {
+                                if (thisPermanent.TopCard != null)
+                                {
+                                    if (thisPermanent.CanBeDestroyedBySkill(activateClass1))
+                                    {
+                                        if (!thisPermanent.TopCard.CanNotBeAffected(activateClass1))
+                                        {
+                                            return true;
+                                        }
+                                    }
+                                }
+
+                                return false;
+                            }
+
+                            IEnumerator ActivateSuccessCoroutine(Hashtable successHashtable)
+                            {
+                                yield return ContinuousController.instance.StartCoroutine(
+                                    new DestroyPermanentsClass(new List<Permanent>() { thisPermanent },
+                                        CardEffectCommons.CardEffectHashtable(activateClass1)).Destroy());
+                            }
+
+                            yield return null;
+                        }
+                    }
+                }
+            }
+
+            #endregion
+
+            #region When Attacking - ESS
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Draw 1", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] If you have 7 or fewer cards in your hand, [Draw 1].";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count <= 7)
+                        {
+                            if (card.Owner.LibraryCards.Count >= 1)
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        new DrawClass(card.Owner, 1, activateClass).Draw());
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Blue/Lobomon_BT17_022.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3330d4f957a19a64984f868c169b685f
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 272 - 0
Assets/CardEffect/BT17/Blue/Strabimon_BT17_020.cs

@@ -0,0 +1,272 @@
+using System.Collections;
+using System.Collections.Generic;
+using System;
+using System.Linq;
+
+namespace DCGO.CardEffects.BT17
+{
+    public class Strabimon_BT17_020 : CEntity_Effect
+    {
+        public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
+        {
+            List<ICardEffect> cardEffects = new List<ICardEffect>();
+
+            #region On Play
+
+            if (timing == EffectTiming.OnEnterFieldAnyone)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Reveal the top 3 cards of deck", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false,
+                    EffectDescription());
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[On Play] Reveal the top 3 cards of your deck. Add 1 card with the [Hybrid]/[Ten Warriors] trait and 1 Tamer card with an inherited effect among them to the hand. Return the rest to the bottom of the deck.";
+                }
+
+                bool CanSelectDigimonCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsDigimon)
+                    {
+                        if (cardSource.ContainsTraits("Hybrid") ||
+                            cardSource.ContainsTraits("Ten Warriors") ||
+                            cardSource.ContainsTraits("TenWarriors"))
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanSelectTamerCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsTamer)
+                    {
+                        if (cardSource.HasInheritedEffect)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnPlay(hashtable, card);
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.LibraryCards.Count >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    yield return ContinuousController.instance.StartCoroutine(
+                        CardEffectCommons.SimplifiedRevealDeckTopCardsAndSelect(
+                            revealCount: 3,
+                            simplifiedSelectCardConditions:
+                            new SimplifiedSelectCardConditionClass[]
+                            {
+                                new(
+                                    canTargetCondition: CanSelectDigimonCardCondition,
+                                    message: "Select 1 Digimon card with the [Hybrid]/[Ten Warriors] trait.",
+                                    mode: SelectCardEffect.Mode.AddHand,
+                                    maxCount: 1,
+                                    selectCardCoroutine: null),
+                                new(
+                                    canTargetCondition: CanSelectTamerCardCondition,
+                                    message: "Select 1 Tamer card with an inherited effect.",
+                                    mode: SelectCardEffect.Mode.AddHand,
+                                    maxCount: 1,
+                                    selectCardCoroutine: null),
+                            },
+                            remainingCardsPlace: RemainingCardsPlace.DeckBottom,
+                            activateClass: activateClass
+                        ));
+                }
+            }
+
+            #endregion
+
+            #region When Attacking - ESS
+
+            if (timing == EffectTiming.OnAllyAttack)
+            {
+                ActivateClass activateClass = new ActivateClass();
+                activateClass.SetUpICardEffect("Play Tamer card from hand", CanUseCondition, card);
+                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, true,
+                    EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
+                cardEffects.Add(activateClass);
+
+                string EffectDescription()
+                {
+                    return
+                        "[When Attacking] [Once Per Turn] You may play 1 Tamer card with an inherited effect from your hand with the play cost reduced by 2.";
+                }
+
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
+                }
+
+                bool CanSelectHandCardCondition(CardSource cardSource)
+                {
+                    if (cardSource.IsTamer)
+                    {
+                        if (cardSource.HasInheritedEffect)
+                        {
+                            if (CardEffectCommons.CanPlayAsNewPermanent(cardSource: cardSource, payCost: true,
+                                    cardEffect: activateClass))
+                            {
+                                return true;
+                            }
+                        }
+                    }
+
+                    return false;
+                }
+
+                bool CanActivateCondition(Hashtable hashtable)
+                {
+                    if (CardEffectCommons.IsExistOnBattleArea(card))
+                    {
+                        if (card.Owner.HandCards.Count(CanSelectHandCardCondition) >= 1)
+                        {
+                            return true;
+                        }
+                    }
+
+                    return false;
+                }
+
+                IEnumerator ActivateCoroutine(Hashtable hashtable)
+                {
+                    #region Reduce Play Cost
+
+                    ChangeCostClass changeCostClass = new ChangeCostClass();
+                    changeCostClass.SetUpICardEffect($"Play Cost -2", _ => true, card);
+                    changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition,
+                        rootCondition: RootCondition, isUpDown: () => true, isCheckAvailability: () => false,
+                        isChangePayingCost: () => true);
+                    Func<EffectTiming, ICardEffect> getCardEffect = GetCardEffect;
+                    card.Owner.UntilCalculateFixedCostEffect.Add(getCardEffect);
+
+                    ICardEffect GetCardEffect(EffectTiming rcTiming)
+                    {
+                        if (rcTiming == EffectTiming.None)
+                        {
+                            return changeCostClass;
+                        }
+
+                        return null;
+                    }
+
+                    int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root, List<Permanent> targetPermanents)
+                    {
+                        if (CardSourceCondition(cardSource))
+                        {
+                            if (RootCondition(root))
+                            {
+                                if (PermanentsCondition(targetPermanents))
+                                {
+                                    cost -= 2;
+                                }
+                            }
+                        }
+
+                        return cost;
+                    }
+
+                    bool PermanentsCondition(List<Permanent> targetPermanents)
+                    {
+                        if (targetPermanents == null)
+                        {
+                            return true;
+                        }
+
+                        return targetPermanents.Count((targetPermanent) => targetPermanent != null) == 0;
+                    }
+
+                    bool CardSourceCondition(CardSource cardSource)
+                    {
+                        if (cardSource.HasPlayCost)
+                        {
+                            return CanSelectHandCardCondition(cardSource);
+                        }
+
+                        return false;
+                    }
+
+                    bool RootCondition(SelectCardEffect.Root root)
+                    {
+                        return true;
+                    }
+
+                    #endregion
+
+                    if (card.Owner.HandCards.Count(CanSelectHandCardCondition) >= 1)
+                    {
+                        List<CardSource> selectedCards = new List<CardSource>();
+
+                        SelectHandEffect selectHandEffect = GManager.instance.GetComponent<SelectHandEffect>();
+
+                        selectHandEffect.SetUp(
+                            selectPlayer: card.Owner,
+                            canTargetCondition: CanSelectHandCardCondition,
+                            canTargetCondition_ByPreSelecetedList: null,
+                            canEndSelectCondition: null,
+                            maxCount: 1,
+                            canNoSelect: true,
+                            canEndNotMax: false,
+                            isShowOpponent: true,
+                            selectCardCoroutine: SelectCardCoroutine,
+                            afterSelectCardCoroutine: null,
+                            mode: SelectHandEffect.Mode.Custom,
+                            cardEffect: activateClass);
+
+                        selectHandEffect.SetUpCustomMessage("Select 1 Tamer card to play.",
+                            "The opponent is selecting 1 Tamer card to play.");
+                        selectHandEffect.SetUpCustomMessage_ShowCard("Played Card");
+
+                        yield return StartCoroutine(selectHandEffect.Activate());
+
+                        IEnumerator SelectCardCoroutine(CardSource cardSource)
+                        {
+                            selectedCards.Add(cardSource);
+                            yield return null;
+                        }
+
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.PlayPermanentCards(cardSources: selectedCards, activateClass: activateClass,
+                                payCost: true, isTapped: false, root: SelectCardEffect.Root.Hand, activateETB: true));
+                    }
+
+                    #region Remove Reduce Cost effect
+
+                    card.Owner.UntilCalculateFixedCostEffect.Remove(getCardEffect);
+
+                    #endregion
+                }
+            }
+
+            #endregion
+
+            return cardEffects;
+        }
+    }
+}

+ 11 - 0
Assets/CardEffect/BT17/Blue/Strabimon_BT17_020.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e23a7c1c4acbfbb4aa3fa4c3c22d5765
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -68,7 +68,7 @@ namespace DCGO.CardEffects.BT17
                     {
                         if (permanent.IsTamer)
                         {
-                            if (permanent.TopCard.ContainsCardName("Tai Kamiya"))
+                            if (permanent.TopCard.ContainsCardName("Tai Kamiya") || permanent.TopCard.ContainsCardName("TaiKamiya"))
                             {
                                 return true;
                             }

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

@@ -22,8 +22,8 @@ namespace DCGO.CardEffects.BT17
 
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.CardNames.Contains("Takuya Kanbara") ||
-                           targetPermanent.TopCard.CardNames.Contains("TakuyaKanbara");
+                    return targetPermanent.TopCard.ContainsCardName("Takuya Kanbara") ||
+                           targetPermanent.TopCard.ContainsCardName("TakuyaKanbara");
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
@@ -36,7 +36,7 @@ namespace DCGO.CardEffects.BT17
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.CardNames.Contains("BurningGreymon");
+                    return targetPermanent.TopCard.ContainsCardName("BurningGreymon");
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
@@ -77,7 +77,7 @@ namespace DCGO.CardEffects.BT17
                 string EffectDescription()
                 {
                     return
-                        "[When Digivolving] If [BurningGreymon] is in this Digimon's digivolution cards or you have a blue or green Digimon or Tamer, this Digimon may digivolve into [AncientGreymon] in the hand for a digivolution cost of 3, ignoring its digivolution requirements. If digivolved by this effect, delete this Digimon at the end of the turn..";
+                        "[When Digivolving] If [BurningGreymon] is in this Digimon's digivolution cards or you have a blue or green Digimon or Tamer, this Digimon may digivolve into [AncientGreymon] in the hand for a digivolution cost of 3, ignoring its digivolution requirements. If digivolved by this effect, delete this Digimon at the end of the turn.";
                 }
 
                 bool CanUseCondition(Hashtable hashtable)
@@ -133,7 +133,7 @@ namespace DCGO.CardEffects.BT17
                         {
                             ActivateClass activateClass1 = new ActivateClass();
                             activateClass1.SetUpICardEffect("Delete this Digimon", CanUseSuccessCondition, card);
-                            activateClass1.SetUpActivateClass(CanActivateSuccessCondition, ActivateCoroutine1, -1,
+                            activateClass1.SetUpActivateClass(CanActivateSuccessCondition, ActivateSuccessCoroutine, -1,
                                 false, "");
                             activateClass1.SetEffectSourcePermanent(thisPermanent);
                             CardEffectCommons.AddEffectToPlayer(effectDuration: EffectDuration.UntilEachTurnEnd,
@@ -160,7 +160,7 @@ namespace DCGO.CardEffects.BT17
                                 return false;
                             }
 
-                            IEnumerator ActivateCoroutine1(Hashtable successHashtable)
+                            IEnumerator ActivateSuccessCoroutine(Hashtable successHashtable)
                             {
                                 yield return ContinuousController.instance.StartCoroutine(
                                     new DestroyPermanentsClass(new List<Permanent>() { thisPermanent },

+ 25 - 16
Assets/CardEffect/BT17/Red/BurningGreymon_BT17_012.cs

@@ -1,5 +1,6 @@
 using System.Collections;
 using System.Collections.Generic;
+using System.Linq;
 
 namespace DCGO.CardEffects.BT17
 {
@@ -21,8 +22,8 @@ namespace DCGO.CardEffects.BT17
 
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.CardNames.Contains("Takuya Kanbara") ||
-                           targetPermanent.TopCard.CardNames.Contains("TakuyaKanbara");
+                    return targetPermanent.TopCard.ContainsCardName("Takuya Kanbara") ||
+                           targetPermanent.TopCard.ContainsCardName("TakuyaKanbara");
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
@@ -35,7 +36,7 @@ namespace DCGO.CardEffects.BT17
             {
                 bool PermanentCondition(Permanent targetPermanent)
                 {
-                    return targetPermanent.TopCard.CardNames.Contains("Agunimon");
+                    return targetPermanent.TopCard.ContainsCardName("Agunimon");
                 }
 
                 cardEffects.Add(CardEffectFactory.AddSelfDigivolutionRequirementStaticEffect(
@@ -94,11 +95,16 @@ namespace DCGO.CardEffects.BT17
                     return CardEffectCommons.CanTriggerOnAttack(hashtable, card);
                 }
 
+                bool IsHybridDigimonCardCondition(CardSource cardSource)
+                {
+                    return cardSource.IsDigimon && cardSource.ContainsTraits("Hybrid");
+                }
+
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     if (CardEffectCommons.IsExistOnBattleArea(card))
                     {
-                        if (card.Owner.HandCards.Count >= 1)
+                        if (card.Owner.HandCards.Count(IsHybridDigimonCardCondition) >= 1)
                         {
                             return true;
                         }
@@ -109,18 +115,21 @@ namespace DCGO.CardEffects.BT17
 
                 IEnumerator ActivateCoroutine(Hashtable hashtable)
                 {
-                    yield return ContinuousController.instance.StartCoroutine(
-                        CardEffectCommons.DigivolveIntoHandOrTrashCard(
-                            targetPermanent: card.PermanentOfThisCard(),
-                            cardCondition: cardSource =>
-                                cardSource.IsDigimon && cardSource.ContainsTraits("Hybrid"),
-                            payCost: true,
-                            reduceCostTuple: (reduceCost: 1, reduceCostCardCondition: null),
-                            fixedCostTuple: null,
-                            ignoreDigivolutionRequirementFixedCost: -1,
-                            isHand: true,
-                            activateClass: activateClass,
-                            successProcess: null));
+                    if (card.Owner.HandCards.Count(IsHybridDigimonCardCondition) >= 1)
+                    {
+                        yield return ContinuousController.instance.StartCoroutine(
+                            CardEffectCommons.DigivolveIntoHandOrTrashCard(
+                                targetPermanent: card.PermanentOfThisCard(),
+                                cardCondition: IsHybridDigimonCardCondition,
+                                payCost: true,
+                                reduceCostTuple: (reduceCost: 1, reduceCostCardCondition: null),
+                                fixedCostTuple: null,
+                                ignoreDigivolutionRequirementFixedCost: -1,
+                                isHand: true,
+                                activateClass: activateClass,
+                                successProcess: null));
+                    }
+                    
                 }
             }
 

+ 7 - 6
Assets/CardEffect/BT17/Red/Flamemon_BT17_009.cs

@@ -106,9 +106,10 @@ namespace DCGO.CardEffects.BT17
             if (timing == EffectTiming.OnDestroyedAnyone)
             {
                 ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Play 1 Tamer from hand", CanUseCondition, card);
+                activateClass.SetUpICardEffect("Play 1 Tamer card from hand", CanUseCondition, card);
                 activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, true,
                     EffectDescription());
+                activateClass.SetIsInheritedEffect(true);
                 cardEffects.Add(activateClass);
 
                 string EffectDescription()
@@ -117,6 +118,11 @@ namespace DCGO.CardEffects.BT17
                         "[On Deletion] You may play 1 Tamer card with inherited effects from your hand without paying the cost.";
                 }
 
+                bool CanUseCondition(Hashtable hashtable)
+                {
+                    return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
+                }
+
                 bool CanSelectCardCondition(CardSource cardSource)
                 {
                     if (cardSource.IsTamer)
@@ -134,11 +140,6 @@ namespace DCGO.CardEffects.BT17
                     return false;
                 }
 
-                bool CanUseCondition(Hashtable hashtable)
-                {
-                    return CardEffectCommons.CanTriggerOnDeletion(hashtable, card);
-                }
-
                 bool CanActivateCondition(Hashtable hashtable)
                 {
                     if (CardEffectCommons.CanActivateOnDeletionInherited(hashtable, card))