Class: Gemwarrior::Rope
- Defined in:
- lib/gemwarrior/entities/items/rope.rb
Instance Attribute Summary
Attributes inherited from Item
#atk_hi, #atk_lo, #consumable, #equippable, #equipped, #takeable, #useable, #used
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize ⇒ Rope
constructor
A new instance of Rope.
- #use(player = nil) ⇒ Object
Methods inherited from Item
Methods inherited from Entity
Constructor Details
#initialize ⇒ Rope
Returns a new instance of Rope.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/gemwarrior/entities/items/rope.rb', line 8 def initialize self.name = 'rope' self.description = 'For some reason, a sturdy rope hangs down from a small opening in the metal tunnel\'s ceiling. It appears to hold your weight when taut.' 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 23 24 25 26 27 28 29 30 |
# File 'lib/gemwarrior/entities/items/rope.rb', line 19 def use(player = nil) puts 'You hold on to the rope with both hands and begin to climb upwards towards the small opening in the ceiling.' puts puts 'After a few minutes you pull yourself up onto a field of pure driven snow. Without warning, the rope and opening in the floor vanish.' puts # stats player.movements_made += 1 {:type => 'move', :data => 'Snow Fields (Southeast)'} end |