BT3_075.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 BT3_075 : 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.None)
  14. {
  15. cardEffects.Add(CardEffectFactory.BlockerSelfStaticEffect(isInheritedEffect: false, card: card, condition: null));
  16. }
  17. if (timing == EffectTiming.None)
  18. {
  19. bool PermanentCondition(Permanent permanent)
  20. {
  21. if (CardEffectCommons.IsPermanentExistsOnOwnerBattleAreaDigimon(permanent, card))
  22. {
  23. if (permanent.HasBlocker)
  24. {
  25. return true;
  26. }
  27. }
  28. return false;
  29. }
  30. bool CardEffectCondition(ICardEffect cardEffect)
  31. {
  32. if (cardEffect != null)
  33. {
  34. if (cardEffect.EffectSourceCard != null)
  35. {
  36. if (cardEffect.EffectSourceCard.Owner == card.Owner.Enemy)
  37. {
  38. return true;
  39. }
  40. }
  41. }
  42. return false;
  43. }
  44. bool CanUseCondition()
  45. {
  46. return CardEffectCommons.IsExistOnBattleArea(card);
  47. }
  48. string effectName = "Your Digimon with Blocker can't be deleted by opponent's effects";
  49. cardEffects.Add(CardEffectFactory.CanNotBeDestroyedBySkillStaticEffect(
  50. permanentCondition: PermanentCondition,
  51. cardEffectCondition: CardEffectCondition,
  52. isInheritedEffect: false,
  53. card: card,
  54. condition: CanUseCondition,
  55. effectName: effectName
  56. ));
  57. }
  58. return cardEffects;
  59. }
  60. }