Class: Gemwarrior::Couch
- Defined in:
- lib/gemwarrior/entities/items/couch.rb
Instance Attribute Summary
Attributes inherited from Item
#atk_hi, #atk_lo, #equippable, #equipped, #reuse, #takeable, #useable
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize ⇒ Couch
constructor
A new instance of Couch.
- #use(player = nil) ⇒ Object
Methods inherited from Item
Methods inherited from Entity
Constructor Details
#initialize ⇒ Couch
Returns a new instance of Couch.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/gemwarrior/entities/items/couch.rb', line 8 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 |
Instance Method Details
#use(player = nil) ⇒ Object
19 20 21 22 23 |
# File 'lib/gemwarrior/entities/items/couch.rb', line 19 def use(player = nil) 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 |