BT6_059.cs 1.6 KB

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