Răsfoiți Sursa

Merge pull request #876 from DCGO2/hooperk-AD1-costs

Fix AD1-017 & AD1-018 reduce cost effects
x89rt2 5 luni în urmă
părinte
comite
2ee2ac2290

+ 0 - 79
Assets/Scripts/CardEffect/AD1/Purple/AD1_018.cs

@@ -13,85 +13,6 @@ namespace DCGO.CardEffects.AD1
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
 
             #region Reduce Play Cost
             #region Reduce Play Cost
-            if (timing == EffectTiming.BeforePayCost)
-            {
-                ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Reduce play cost (5)", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
-                cardEffects.Add(activateClass);
-
-                string EffectDescription()
-                {
-                    return "When this card would be played, if you have a Digimon with [Knightmon] or [Lucemon] in its name, reduce the play cost by 5.";
-                }
-
-                bool CanUseCondition(Hashtable hashtable)
-                {
-                    return CardEffectCommons.CanTriggerWhenPermanentWouldPlay(hashtable, cardSource => cardSource == card);
-                }
-
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    return CardEffectCommons.HasMatchConditionPermanent(WouldPlayCondition);
-                }
-
-                bool WouldPlayCondition(Permanent permanent)
-                {
-                    return CardEffectCommons.IsPermanentExistsOnBattleAreaDigimon(permanent)
-                            && (permanent.TopCard.ContainsCardName("Knightmon") || permanent.TopCard.ContainsCardName("Lucemon"));
-                }
-
-                IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                {
-                    if (card.Owner.CanReduceCost(null, card))
-                    {
-                        ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
-                    }
-
-                    ChangeCostClass changeCostClass = new ChangeCostClass();
-                    changeCostClass.SetUpICardEffect("Play Cost -5", hashtable => true, card);
-                    changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
-                    card.Owner.UntilCalculateFixedCostEffect.Add(_ => changeCostClass);
-
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable));
-
-                    int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root,
-                        List<Permanent> targetPermanents)
-                    {
-                        if (CardSourceCondition(cardSource) &&
-                            RootCondition(root) &&
-                            PermanentsCondition(targetPermanents))
-                        {
-                            cost -= 5;
-                        }
-
-                        return cost;
-                    }
-
-                    bool PermanentsCondition(List<Permanent> targetPermanents)
-                    {
-                        return targetPermanents == null || targetPermanents.Count(targetPermanent => targetPermanent != null) == 0;
-                    }
-
-                    bool CardSourceCondition(CardSource cardSource)
-                    {
-                        return cardSource == card;
-                    }
-
-                    bool RootCondition(SelectCardEffect.Root root)
-                    {
-                        return true;
-                    }
-
-                    bool isUpDown()
-                    {
-                        return true;
-                    }
-                }
-            }
-            #endregion
-
-            #region Reduce Play Cost - Not Shown
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
                 ChangeCostClass changeCostClass = new ChangeCostClass();
                 ChangeCostClass changeCostClass = new ChangeCostClass();

+ 0 - 79
Assets/Scripts/CardEffect/AD1/Yellow/AD1_017.cs

@@ -12,85 +12,6 @@ namespace DCGO.CardEffects.AD1
             List<ICardEffect> cardEffects = new List<ICardEffect>();
             List<ICardEffect> cardEffects = new List<ICardEffect>();
 
 
             #region Reduce Play Cost
             #region Reduce Play Cost
-            if (timing == EffectTiming.BeforePayCost)
-            {
-                ActivateClass activateClass = new ActivateClass();
-                activateClass.SetUpICardEffect("Reduce play cost (5)", CanUseCondition, card);
-                activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, -1, false, EffectDescription());
-                cardEffects.Add(activateClass);
-
-                string EffectDescription()
-                {
-                    return "When this card would be played, if you have 4 or more cards with [Lucemon] or [Witchelny] in their texts in your trash, reduce the play cost by 5.";
-                }
-
-                bool CanUseCondition(Hashtable hashtable)
-                {
-                    return CardEffectCommons.CanTriggerWhenPermanentWouldPlay(hashtable, cardSource => cardSource == card);
-                }
-
-                bool CanActivateCondition(Hashtable hashtable)
-                {
-                    return CardEffectCommons.MatchConditionOwnersCardCountInTrash(card, WouldPlayCondition) >= 4;
-                }
-
-                bool WouldPlayCondition(CardSource cardSource)
-                {
-                    return cardSource.HasText("Lucemon")
-                            || cardSource.HasText("Witchelny");
-                }
-
-                IEnumerator ActivateCoroutine(Hashtable _hashtable)
-                {
-                    if (card.Owner.CanReduceCost(null, card))
-                    {
-                        ContinuousController.instance.PlaySE(GManager.instance.GetComponent<Effects>().BuffSE);
-                    }
-
-                    ChangeCostClass changeCostClass = new ChangeCostClass();
-                    changeCostClass.SetUpICardEffect("Play Cost -5", hashtable => true, card);
-                    changeCostClass.SetUpChangeCostClass(changeCostFunc: ChangeCost, cardSourceCondition: CardSourceCondition, rootCondition: RootCondition, isUpDown: isUpDown, isCheckAvailability: () => false, isChangePayingCost: () => true);
-                    card.Owner.UntilCalculateFixedCostEffect.Add(_ => changeCostClass);
-
-                    yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ShowReducedCost(_hashtable));
-
-                    int ChangeCost(CardSource cardSource, int cost, SelectCardEffect.Root root,
-                        List<Permanent> targetPermanents)
-                    {
-                        if (CardSourceCondition(cardSource) &&
-                            RootCondition(root) &&
-                            PermanentsCondition(targetPermanents))
-                        {
-                            cost -= 5;
-                        }
-
-                        return cost;
-                    }
-
-                    bool PermanentsCondition(List<Permanent> targetPermanents)
-                    {
-                        return targetPermanents == null || targetPermanents.Count(targetPermanent => targetPermanent != null) == 0;
-                    }
-
-                    bool CardSourceCondition(CardSource cardSource)
-                    {
-                        return cardSource == card;
-                    }
-
-                    bool RootCondition(SelectCardEffect.Root root)
-                    {
-                        return true;
-                    }
-
-                    bool isUpDown()
-                    {
-                        return true;
-                    }
-                }
-            }
-            #endregion
-
-            #region Reduce Play Cost - Not Shown
             if (timing == EffectTiming.None)
             if (timing == EffectTiming.None)
             {
             {
                 ChangeCostClass changeCostClass = new ChangeCostClass();
                 ChangeCostClass changeCostClass = new ChangeCostClass();