Class: Gemwarrior::Waterfall

Inherits:
Item show all
Defined in:
lib/gemwarrior/entities/items/waterfall.rb

Instance Attribute Summary

Attributes inherited from Item

#atk_hi, #atk_lo, #equippable, #equipped, #reuse, #takeable, #useable

Attributes inherited from Entity

#description, #name

Instance Method Summary collapse

Methods inherited from Item

#describe

Methods inherited from Entity

#status

Constructor Details

#initializeWaterfall

Returns a new instance of Waterfall.



8
9
10
11
12
13
14
15
16
17
# File 'lib/gemwarrior/entities/items/waterfall.rb', line 8

def initialize
  self.name         = '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.'
  self.atk_lo       = nil
  self.atk_hi       = nil
  self.takeable     = false
  self.useable      = true
  self.equippable   = false
  self.equipped     = false
end

Instance Method Details

#use(player = nil) ⇒ Object



19
20
21
22
# File 'lib/gemwarrior/entities/items/waterfall.rb', line 19

def use(player = nil)
  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.'
  {:type => 'dmg', :data => rand(0..1)}
end