BT8_018.cs 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 BT8_018 : 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. CanAttackTargetDefendingPermanentClass canAttackTargetDefendingPermanentClass = new CanAttackTargetDefendingPermanentClass();
  16. canAttackTargetDefendingPermanentClass.SetUpICardEffect($"Can attack to unsuspended Digimon", CanUseCondition, card);
  17. canAttackTargetDefendingPermanentClass.SetUpCanAttackTargetDefendingPermanentClass(
  18. attackerCondition: AttackerCondition,
  19. defenderCondition: DefenderCondition,
  20. cardEffectCondition: CardEffectCondition);
  21. cardEffects.Add(canAttackTargetDefendingPermanentClass);
  22. bool CanUseCondition(Hashtable hashtable)
  23. {
  24. if (CardEffectCommons.IsExistOnBattleArea(card))
  25. {
  26. if (CardEffectCommons.IsOwnerTurn(card))
  27. {
  28. return true;
  29. }
  30. }
  31. return false;
  32. }
  33. bool AttackerCondition(Permanent permanent)
  34. {
  35. return permanent == card.PermanentOfThisCard();
  36. }
  37. bool DefenderCondition(Permanent permanent)
  38. {
  39. if (CardEffectCommons.IsPermanentExistsOnOpponentBattleAreaDigimon(permanent, card))
  40. {
  41. if (!permanent.IsSuspended)
  42. {
  43. return true;
  44. }
  45. }
  46. return false;
  47. }
  48. bool CardEffectCondition(ICardEffect cardEffect)
  49. {
  50. return true;
  51. }
  52. }
  53. return cardEffects;
  54. }
  55. }