def perform(actor, targets)
    
    if condition_evaluation_turn?
      @current_targets = targets.clone
      conditions.each {|condition| @current_targets = condition.select(actor, @current_targets)}
    end
    actions.each do |action|
      if @current_targets.empty? and ! @conditions.empty?
        action.stop(actor, targets) if action.started? #Not @current_targets; that array is empty.
      else
        action.start(actor, @current_targets) unless action.started?
        action.do(actor, @current_targets)
      end
    end
    
  end
def perform(actor, targets)
    
    if condition_evaluation_turn?
      @current_targets = targets.clone
      conditions.each {|condition| @current_targets = condition.select(actor, @current_targets)}
    end
    actions.each do |action|
      if @current_targets.empty? and ! @conditions.empty?
        action.stop(actor, targets) if action.started? #Not @current_targets; that array is empty.
      else
        action.start(actor, @current_targets) unless action.started?
        action.do(actor, @current_targets)
      end
    end
    
  end
Finds targets that meet all conditions, then acts on them.
Calls select(actor, targets) on each Condition, each time discarding targets that fail.
Then on each Action, calls Action#start(actor, targets) (if not already started) followed by Action#do(actor, targets).
If no matching targets are found, calls Action#stop(actor, targets) on each Action.
If there are no conditions, actions will occur regardless of targets.