Sha256: b6281b2ec7cd1cf8e54294aa2156183854725a605e36848e25b55fc13e7e406f

Contents?: true

Size: 1.09 KB

Versions: 7

Compression:

Stored size: 1.09 KB

Contents

# lib/gemwarrior/entities/items/couch.rb
# Item::Couch

require_relative '../item'

module Gemwarrior
  class Couch < Item
    def initialize
      self.name         = 'couch'
      self.description  = 'Ever wanted to sit on a cloud? Now is your chance.'
      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)
      if player.at_full_hp?
        puts 'You "sit" on the impossibly soft surface of the furniture, but even after a few minutes of this seemingly heavenly hedonism you don\'t feel significantly better and decide to get up again.'
        { type: nil, data: nil }
      else
        puts 'Your body comes to rest somewhere below the surface of the cloudy apparatus, almost as if it were floating *amongst* the couch. The feeling is heavenly, and you actually feel somewhat better after getting back up.'
        puts '>> You regain a hit point.'
        { type: 'rest', data: 1 }
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gemwarrior-0.9.37 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.9.36 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.9.35 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.9.34 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.9.33 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.9.32 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.9.31 lib/gemwarrior/entities/items/couch.rb