using System.Collections; using System.Collections.Generic; namespace DCGO.CardEffects.EX2 { public class EX2_026 : CEntity_Effect { public override List CardEffects(EffectTiming timing, CardSource card) { List cardEffects = new List(); if (timing == EffectTiming.None) { bool Condition() { if (CardEffectCommons.IsOwnerTurn(card) && CardEffectCommons.IsExistOnBattleArea(card)) { if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, (permanent) => permanent.TopCard.CardColors.Contains(CardColor.Green) && permanent.IsTamer)) { return true; } } return false; } bool PermanentCondition(Permanent targetPermanent) { return targetPermanent == card.PermanentOfThisCard(); } bool CardSourceCondition(CardSource cardSource) { return true; } bool RootCondition(SelectCardEffect.Root root) { return true; } cardEffects.Add(CardEffectFactory.ChangeDigivolutionCostStaticEffect( changeValue: -1, permanentCondition: PermanentCondition, cardCondition: CardSourceCondition, rootCondition: RootCondition, isInheritedEffect: false, card: card, condition: Condition, setFixedCost: false)); } if (timing == EffectTiming.OnTappedAnyone) { ActivateClass activateClass = new ActivateClass(); activateClass.SetUpICardEffect("DP +2000", CanUseCondition, card); activateClass.SetUpActivateClass(CanActivateCondition, ActivateCoroutine, 1, false, EffectDiscription()); activateClass.SetIsInheritedEffect(true); activateClass.SetHashString("DP+2000_EX2_025"); cardEffects.Add(activateClass); string EffectDiscription() { return "[Your Turn][Once Per Turn] When one of your opponent's Digimon becomes suspended, this Digimon gets +2000 DP for the turn."; } bool PermanentCondition(Permanent permanent) { return CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card); } bool CanUseCondition(Hashtable hashtable) { if (CardEffectCommons.IsExistOnBattleArea(card)) { if (CardEffectCommons.IsOwnerTurn(card)) { if (CardEffectCommons.CanTriggerWhenPermanentSuspends(hashtable, PermanentCondition)) { return true; } } } return false; } bool CanActivateCondition(Hashtable hashtable) { if (CardEffectCommons.IsExistOnBattleArea(card)) { return true; } return false; } IEnumerator ActivateCoroutine(Hashtable _hashtable) { yield return ContinuousController.instance.StartCoroutine(CardEffectCommons.ChangeDigimonDP(targetPermanent: card.PermanentOfThisCard(), changeValue: 2000, effectDuration: EffectDuration.UntilEachTurnEnd, activateClass: activateClass)); } } return cardEffects; } } }