class Gemwarrior::SmallHole

Public Class Methods

new() click to toggle source
Calls superclass method Gemwarrior::Item::new
# 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

Public Instance Methods

use(world) click to toggle source
# 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