Sha256: e1da83f2f10672319d861eca604698fce36b87c3e9403eed4675d3d1223db801

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 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 come to rest 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.'
      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

2 entries across 2 versions & 1 rubygems

Version Path
gemwarrior-0.9.30 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.9.28 lib/gemwarrior/entities/items/couch.rb