Sha256: 454fb3b0197078c7780bf7794eefc18c8ed63f2e844e709723bd3d34bdcacf56

Contents?: true

Size: 1.43 KB

Versions: 24

Compression:

Stored size: 1.43 KB

Contents

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

require_relative '../item'

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

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

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

      if (NEEDED_ITEMS - player.inventory.items.map(&:name)).empty?
        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

24 entries across 24 versions & 1 rubygems

Version Path
gemwarrior-0.9.27 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.26 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.24 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.23 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.22 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.21 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.20 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.19 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.18 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.17 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.16 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.15 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.14 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.13 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.12 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.10 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.9 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.8 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.7 lib/gemwarrior/entities/items/pond.rb
gemwarrior-0.9.6 lib/gemwarrior/entities/items/pond.rb