BT19_004.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. namespace DCGO.CardEffects.BT19
  4. {
  5. public class BT19_004 : CEntity_Effect
  6. {
  7. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  8. {
  9. List<ICardEffect> cardEffects = new List<ICardEffect>();
  10. if (timing == EffectTiming.None)
  11. {
  12. bool OtherGreenDigimon(Permanent permanent)
  13. {
  14. return CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card) &&
  15. permanent.TopCard.CardColors.Contains(CardColor.Green) &&
  16. permanent != card.PermanentOfThisCard();
  17. }
  18. bool Condition()
  19. {
  20. if (CardEffectCommons.IsExistOnBattleAreaDigimon(card))
  21. {
  22. if (CardEffectCommons.IsOwnerTurn(card))
  23. {
  24. if (CardEffectCommons.HasMatchConditionOwnersPermanent(card, OtherGreenDigimon))
  25. return true;
  26. }
  27. }
  28. return false;
  29. }
  30. cardEffects.Add(CardEffectFactory.ChangeSelfDPStaticEffect(changeValue: 2000, isInheritedEffect: true, card: card, condition: Condition));
  31. }
  32. return cardEffects;
  33. }
  34. }
  35. }