Sha256: 215f4e57df2051703338ec6f6c56e90b7601c48a7d795c34fa92844d717575e4

Contents?: true

Size: 810 Bytes

Versions: 48

Compression:

Stored size: 810 Bytes

Contents

# lib/gemwarrior/entities/items/waterfall.rb
# Entity::Item::Waterfall

require_relative '../item'

module Gemwarrior
  class Waterfall < Item
    def initialize
      super

      self.name         = 'waterfall'
      self.name_display = 'Waterfall'
      self.description  = 'Gallons of murky, sparkling water fall downward from an unknown spot in the sky, ending in a pool on the ground, yet never overflowing.'
    end

    def use(world)
      puts 'You stretch out your hand and touch the waterfall. It stings you with its cold and forceful gushing. Your hand is now wet and rougher than before. In time, it will dry.'
      
      dmg = rand(0..1)
      
      puts '>> You lose a hit point.'.colorize(:red) if dmg > 0
      
      { type: 'dmg', data: dmg }
    end
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
gemwarrior-0.15.0 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.14.8 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.14.7 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.14.6 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.14.5 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.14.4 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.14.3 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.14.2 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.14.1 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.14.0 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.13.2 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.13.1 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.13.0 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.12.8 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.12.7 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.12.6 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.12.5 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.12.4 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.12.3 lib/gemwarrior/entities/items/waterfall.rb
gemwarrior-0.12.2 lib/gemwarrior/entities/items/waterfall.rb