Sha256: e05e497f373757ae946976665694cda156dbe44e46ee838810c9656da0f09fe7
Contents?: true
Size: 795 Bytes
Versions: 4
Compression:
Stored size: 795 Bytes
Contents
# lib/gemwarrior/entities/items/herb.rb # Item::Herb require_relative '../item' module Gemwarrior class Herb < Item def initialize self.name = 'herb' self.description = 'Green and leafy, this wild herb looks edible.' self.atk_lo = nil self.atk_hi = nil self.takeable = true self.useable = true self.equippable = false self.equipped = false end def use puts 'You place the herb in your mouth, testing its texture. The mysterious herb is easily chewable, and you are able to swallow it without much effort. Slight tingles travel up and down your spine.' puts 'You regain a few hit points.' {:type => 'health', :data => rand(3..5)} end end end
Version data entries
4 entries across 4 versions & 1 rubygems