Class: Gemwarrior::MassiveDoor

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

Instance Attribute Summary

Attributes inherited from Item

#is_armor, #is_weapon

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

Methods inherited from Item

#describe_detailed

Methods inherited from Entity

#puts

Constructor Details

#initializeMassiveDoor

Returns a new instance of MassiveDoor.



8
9
10
11
12
13
14
# File 'lib/gemwarrior/entities/items/massive_door.rb', line 8

def initialize
  super

  self.name         = 'massive_door'
  self.name_display = 'Massive Door'
  self.description  = 'Translucent, but not transparent, this door constructed of condensed water vapor is like nothing you have ever seen. It has no keyhole, but it does have a stone-shaped depression floating centrally within it.'
end

Instance Method Details

#use(world) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
# File 'lib/gemwarrior/entities/items/massive_door.rb', line 16

def use(world)
  puts 'You attempt to open the seriously massive door that separates you from Emerald himself.'
  if world.player.inventory.contains_item?('keystone')
    Audio.play_synth(:uncover_secret)
    puts 'The keystone in your inventory glows as you approach the incredibly titanic-sized door, so you naturally pull it out and thrust it into the stone-shaped depression within the cloudy obstruction. The door "opens" in a way and you can now pass through.'
    { type: 'move', data: 'Sky Tower (Throne Room)' }
  else
    puts 'Your hand just goes right through the astonishingly gigantic door, but the rest of your body does not. A moment later, your hand is shoved backwards by some unknown force, and you remain where you were before your unsuccessful attempt.'
    { type: nil, data: nil }
  end
end