Sha256: 012189609c64f38d497003335f4fde028c492d1a5f7fba705221771289252efd
Contents?: true
Size: 1.15 KB
Versions: 8
Compression:
Stored size: 1.15 KB
Contents
# lib/gemwarrior/entities/items/bed.rb # Item::Bed require_relative '../item' module Gemwarrior class Bed < Item def initialize self.name = 'bed' self.description = 'The place where you sleep when you are not adventuring.' 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 feel perfectly healthy and decide not to actually use the bed. Besides, the trail of fire ants currently leading up to and around the furniture seem somehow uninviting.' {:type => nil, :data => nil} else Animation::run({:phrase => '** ZZZZZ **'}) puts 'You unmake the bed, get under the covers, close your eyes, and begin to think about all the things you need to do today. You realize sleep is not one of them and quickly get back up, remake the bed, and get on about your day.' puts '>> You regain a few hit points.' {:type => 'rest', :data => 5} end end end end
Version data entries
8 entries across 8 versions & 1 rubygems