Sha256: 76be1c623ce17b18d2cff8acb4099f4872f2d6f9e007958de38c09c9d861a572
Contents?: true
Size: 812 Bytes
Versions: 7
Compression:
Stored size: 812 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(player = nil) 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
7 entries across 7 versions & 1 rubygems