class Gemwarrior::Waterfall
Public Class Methods
new()
click to toggle source
Calls superclass method
Gemwarrior::Item::new
# File lib/gemwarrior/entities/items/waterfall.rb, line 8 def initialize super self.name = 'waterfall' self.name_display = 'Waterfall' self.description = 'Gallons of murky, sparkling water fall downward from an unknown spot in the sky, ending in a pool on the ground, yet never overflowing.' end
Public Instance Methods
use(world)
click to toggle source
# File lib/gemwarrior/entities/items/waterfall.rb, line 16 def use(world) puts 'You stretch out your hand and touch the waterfall. It stings you with its cold and forceful gushing. Your hand is now wet and rougher than before. In time, it will dry.' dmg = rand(0..1) puts '>> You lose a hit point.'.colorize(:red) if dmg > 0 { type: 'dmg', data: dmg } end