Sha256: f632263c0db3b218f1420dbb9f7671ac1e40d9ee67ed2c243dfb4c2348ba85e1

Contents?: true

Size: 1.33 KB

Versions: 25

Compression:

Stored size: 1.33 KB

Contents

# lib/gemwarrior/entities/items/pond.rb
# Entity::Item::Pond

require_relative '../item'

module Gemwarrior
  class Pond < Item
    # CONTACTS
    NEEDED_ITEMS = ['dehumidifier', 'feather', 'gun', 'stalactite']

    def initialize
      super

      self.name         = 'pond'
      self.name_display = 'Pond'
      self.description  = 'This tiny pool of water self-ripples every minute or so. Small, floating insects buzz around merrily. A small plaque lays at the foot, reading: "If the right objects curious doth possess, touch the water\'s surface and you\'ll get redress."'
    end

    def use(world)
      puts 'You gently place your fingers on the pond\'s rippling surface.'

      if (NEEDED_ITEMS - world.player.inventory.items.map(&:name)).empty?
        Audio.play_synth(:uncover_secret)
        puts 'The pond water explodes with a force that knocks you back onto the ground. When you come to, you notice the depression in the ground where the pond once was now has a new curious object!'
        self.description = 'A barren depression in the ground is all that is left of the pond.'
        return { type: 'item', data: 'Opalaser' }
      else
        puts 'You graze your fingers within the pond for a moment, feeling the coolness. You feel zen.'
        return { type: nil, data: nil }
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

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