Sha256: 6d7e40d67d239f1f47abaf7ee5f0181e24c8ceca02672a64b4378d6d40fc4785

Contents?: true

Size: 1.14 KB

Versions: 48

Compression:

Stored size: 1.14 KB

Contents

# lib/gemwarrior/entities/items/ladder.rb
# Entity::Item::Ladder

require_relative '../item'

module Gemwarrior
  class Ladder < Item
    # CONSTANTS
    USE_TEXT = '** THUMP **'

    def initialize
      super

      self.name         = 'ladder'
      self.name_display = 'Ladder'
      self.description  = 'Rickety and crudely-fashioned, this ladder descends down into the dropoff, hopefully heading towards something...anything.'
    end

    def use(world)
      puts 'You grab onto the shaky, rough-hewn, wooden ladder with all your might and start to descend, being extra careful not to loose your grip, which with every moment becomes shakier and shakier.'
      puts

      # stats
      world.player.movements_made += 1

      Animation.run(phrase: USE_TEXT)

      puts 'The last couple of steps are more slippery than you anticipated, so you end up fumbling them, falling a few feet onto the hard ground below. When you regain your composure, you notice your conveyance for descending is now far above you and it is, unfortunately, your closest known exit.'
      puts

      { type: 'move_dangerous', data: 'metal_tunnel-south_entrance' }
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
gemwarrior-0.15.20 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.19 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.18 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.17 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.16 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.15 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.14 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.13 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.12 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.11 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.10 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.9 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.8 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.7 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.6 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.5 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.4 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.3 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.2 lib/gemwarrior/entities/items/ladder.rb
gemwarrior-0.15.1 lib/gemwarrior/entities/items/ladder.rb