class AR::Events::ActionBeganEvent < AR::Events::Event

  attr_accessor :action
  attr_participant :performer
  attr_participant :primary_target
  def initialize params
    self.action = params[:action]
    #have to set the primary target on params in a hacky way,
    #since actions aren't guaranteed to have a target param
    t_param = self.action.parameter("target")
    unless t_param.nil?
      params[:primary_target] = t_param.argument
    else
      params[:primary_target] = @action.primary_target
    end
    super params
  end 

=begin
  def story
    ret=""
    ret+= @performer.story _for:self, as:"performer"
    ret
  end
=end

  def resolve!
    results=super
    engine.trigger_after_step(AR::Events::ActionPerformedEvent, {action: self.action})
    results
  end 


end
