Sha256: dee9cbf9c3967178da065a9807094b08cba2985dad2013848d72d4d162cd6dec

Contents?: true

Size: 1.44 KB

Versions: 9

Compression:

Stored size: 1.44 KB

Contents

# lib/gemwarrior/entities/items/massive_door.rb
# Item::MassiveDoor

require_relative '../item'

module Gemwarrior
  class MassiveDoor < Item
    def initialize
      super

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

    def use(player = nil)
      puts 'You attempt to open the seriously massive door that separates you from Emerald himself.'
      if player.inventory.contains_item?('keystone')
        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
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gemwarrior-0.10.8 lib/gemwarrior/entities/items/massive_door.rb
gemwarrior-0.10.7 lib/gemwarrior/entities/items/massive_door.rb
gemwarrior-0.10.6 lib/gemwarrior/entities/items/massive_door.rb
gemwarrior-0.10.5 lib/gemwarrior/entities/items/massive_door.rb
gemwarrior-0.10.4 lib/gemwarrior/entities/items/massive_door.rb
gemwarrior-0.10.2 lib/gemwarrior/entities/items/massive_door.rb
gemwarrior-0.10.1 lib/gemwarrior/entities/items/massive_door.rb
gemwarrior-0.10.0 lib/gemwarrior/entities/items/massive_door.rb
gemwarrior-0.9.39 lib/gemwarrior/entities/items/massive_door.rb