EX3_046.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System.Collections.Generic;
  2. namespace DCGO.CardEffects.EX3
  3. {
  4. public class EX3_046 : CEntity_Effect
  5. {
  6. public override List<ICardEffect> CardEffects(EffectTiming timing, CardSource card)
  7. {
  8. List<ICardEffect> cardEffects = new List<ICardEffect>();
  9. if (timing == EffectTiming.WhenPermanentWouldBeDeleted)
  10. {
  11. bool CanSelectPermanentCondition(Permanent permanent)
  12. {
  13. if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
  14. {
  15. if (permanent != card.PermanentOfThisCard())
  16. {
  17. if (permanent.TopCard.CardTraits.Contains("D-Brigade"))
  18. {
  19. if (permanent.willBeRemoveField)
  20. {
  21. return true;
  22. }
  23. }
  24. }
  25. }
  26. return false;
  27. }
  28. string EffectDiscription()
  29. {
  30. return "<Decoy ([D-Brigade])> (When one of your other Digimon with [D-Brigade] in its traits would be deleted by an opponent's effect, you may delete this Digimon to prevent that deletion.)";
  31. }
  32. cardEffects.Add(CardEffectFactory.DecoySelfEffect(isInheritedEffect: false, card: card, condition: null, permanentCondition: CanSelectPermanentCondition, effectName: "Decoy ([D-Brigade])", effectDiscription: EffectDiscription()));
  33. }
  34. return cardEffects;
  35. }
  36. }
  37. }