Sha256: 3b55e90f4703f37b5542b2ef68075cb780385305e817d2401488a60d85c1d06a

Contents?: true

Size: 1.07 KB

Versions: 9

Compression:

Stored size: 1.07 KB

Contents

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

require_relative '../item'

module Gemwarrior
  class Couch < Item
    def initialize
      super

      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
    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

9 entries across 9 versions & 1 rubygems

Version Path
gemwarrior-0.10.8 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.10.7 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.10.6 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.10.5 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.10.4 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.10.2 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.10.1 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.10.0 lib/gemwarrior/entities/items/couch.rb
gemwarrior-0.9.39 lib/gemwarrior/entities/items/couch.rb