module AR
  module Game

    class Antidote < Item
      def initialize id=nil
        super 
        self.noun = "antidote"
        self.article = ""
        add_behavior AR::Game::Consumable
        add_story_implement StoryImplement.new
        self.on_consumed = Proc.new do 
        end

      end


      #sort of just a way to 'include' these classes, so you don't
      #need to fully qualify them.  There must be a better way...
      class Story < AR::Game::StoryBehavior::Story
      end

      class StoryImplement < AR::Game::StoryBehavior::StoryImplement
        def initialize stories=[]
          super
          #add stories like this:
          s = Story.new when: AR::Events::ItemConsumed, as: "item" do |e|
            if e.consumer == e.consumer.world.player
              "You quaff the green liquid, and you immediately feel its curative effects."
            end
          end
          add_story s
        end
      end

    end



  end
end
