コード例 #1
0
 public static void CheckTriggers(ConvergeTriggerType type, TriggerData triggerData)
 {
     foreach (ConvergeTriggeredAbility ability in activeAbilities[(int)type])
     {
         ability.CheckTrigger(triggerData);
     }
 }
コード例 #2
0
        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);
            }
        }