Class: Gemwarrior::SmallHole
- Defined in:
- lib/gemwarrior/entities/items/small_hole.rb
Instance Attribute Summary
Attributes inherited from Item
Attributes inherited from Entity
#consumable, #describe, #describe_detailed, #description, #display_shopping_cart, #equippable, #equipped, #name, #name_display, #number_of_uses, #takeable, #talkable, #useable, #useable_battle, #used, #used_again
Instance Method Summary collapse
-
#initialize ⇒ SmallHole
constructor
A new instance of SmallHole.
- #use(world) ⇒ Object
Methods inherited from Item
Methods inherited from Entity
Constructor Details
#initialize ⇒ SmallHole
Returns a new instance of SmallHole.
8 9 10 11 12 13 14 |
# File 'lib/gemwarrior/entities/items/small_hole.rb', line 8 def initialize super self.name = 'small_hole' self.name_display = 'Small Hole' self.description = 'Amongst the rubble of the alcove, a small hole, barely big enough for a rodent, exists in an absently-minded way near the bottom of the wall.' end |
Instance Method Details
#use(world) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/gemwarrior/entities/items/small_hole.rb', line 16 def use(world) if !self.used self.used = true Audio.play_synth(:uncover_secret) puts 'You lower yourself to the ground and attempt to peer in the hole in the wall. Just as you begin to think this is a fruitless endeavor, a pair of bright, beady eyes manifest, and an unexpectedly low voice speaks:' Person.new.speak('Hello. I\'m Rockney, of Rockney\'s Hole in the Wall. Pleasure!') tunnel_alcove = world.location_by_name('tunnel_alcove') tunnel_alcove.items.push(Rockney.new) puts world.describe(tunnel_alcove) else puts 'Rockney appears to still be in the small hole, patiently waiting for you.' end { type: nil, data: nil } end |