public static void CheckTriggers(ConvergeTriggerType type, TriggerData triggerData) { foreach (ConvergeTriggeredAbility ability in activeAbilities[(int)type]) { ability.CheckTrigger(triggerData); } }
public void CheckTrigger(TriggerData triggerData) { ConvergeEffectContext context = new ConvergeEffectContext(source, source.controller); context.trigger = triggerData; if (spec.triggerPlayer.Test(triggerData.player.homeBase, context) && spec.triggerSubject.Test(triggerData.subject, context) && spec.triggerTarget.Test(triggerData.target, context) && spec.condition.Test(null, context)) { spec.effect.Run(context); } }