EX4_042.cs 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. using System.Collections.Generic;
  2. namespace DCGO.CardEffects.EX4
  3. {
  4. public class EX4_042 : 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.None)
  10. {
  11. bool Condition()
  12. {
  13. return CardEffectCommons.IsOwnerTurn(card);
  14. }
  15. cardEffects.Add(CardEffectFactory.CanNotBeBlockedStaticSelfEffect(
  16. defenderCondition: null,
  17. isInheritedEffect: false,
  18. card: card,
  19. condition: Condition,
  20. effectName: "Unblockable"));
  21. }
  22. if (timing == EffectTiming.None)
  23. {
  24. bool Condition()
  25. {
  26. if (CardEffectCommons.IsExistOnBattleArea(card))
  27. {
  28. if (CardEffectCommons.IsOwnerTurn(card))
  29. {
  30. return true;
  31. }
  32. }
  33. return false;
  34. }
  35. bool AttackerCondition(Permanent attacker)
  36. {
  37. if (CardEffectCommons.IsPermanentExistsOnOwnerBattleArea(attacker, card))
  38. {
  39. if (attacker.TopCard.ContainsCardName("Knightmon") || attacker.TopCard.ContainsCardName("Knightsmon"))
  40. {
  41. if (attacker.IsDigimon)
  42. {
  43. return true;
  44. }
  45. }
  46. }
  47. return false;
  48. }
  49. cardEffects.Add(CardEffectFactory.CanNotBlockStaticEffect(
  50. attackerCondition: AttackerCondition,
  51. defenderCondition: null,
  52. isInheritedEffect: false,
  53. card: card,
  54. condition: Condition,
  55. effectName: "Your Digimon with [Knightmon] or [Knightsmon] in their names are unblockable"));
  56. }
  57. return cardEffects;
  58. }
  59. }
  60. }