CanSuspend.cs 773 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using System;
  4. using System.Linq;
  5. using UnityEngine;
  6. public partial class CardEffectCommons
  7. {
  8. #region Can activate effects by suspending oneself
  9. public static bool CanActivateSuspendCostEffect(CardSource card)
  10. {
  11. return CanActivatePermanentSuspendCostEffect(card.PermanentOfThisCard());
  12. }
  13. #endregion
  14. #region Can activate effects by suspending permanent
  15. public static bool CanActivatePermanentSuspendCostEffect(Permanent permanent)
  16. {
  17. if (IsPermanentExistsOnBattleArea(permanent))
  18. {
  19. if (!permanent.IsSuspended && permanent.CanSuspend)
  20. {
  21. return true;
  22. }
  23. }
  24. return false;
  25. }
  26. #endregion
  27. }