OnAttackTargetSwitch.cs 761 B

12345678910111213141516171819202122
  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 trigger "when this permanent 's attack target switched" effect
  9. public static bool CanTriggerOnAttackTargetSwitch(Hashtable hashtable, CardSource card)
  10. {
  11. return CanTriggerOnPermanentAttackTargetSwitch(hashtable, permanent => permanent.cardSources.Contains(card));
  12. }
  13. #endregion
  14. #region Can trigger "when attack target switched" effect
  15. public static bool CanTriggerOnPermanentAttackTargetSwitch(Hashtable hashtable, Func<Permanent, bool> permanentCondition)
  16. {
  17. return CanTriggerOnPermanentAttack(hashtable, permanentCondition);
  18. }
  19. #endregion
  20. }