Class: Gemwarrior::Tent
- Defined in:
- lib/gemwarrior/entities/items/tent.rb
Instance Attribute Summary
Attributes inherited from Item
Attributes inherited from Entity
#consumable, #describe, #describe_detailed, #description, #display_shopping_cart, #equippable, #equipped, #name, #name_display, #number_of_uses, #takeable, #talkable, #useable, #useable_battle, #used, #used_again
Instance Method Summary collapse
-
#initialize ⇒ Tent
constructor
A new instance of Tent.
- #use(world) ⇒ Object
Methods inherited from Item
Methods inherited from Entity
Constructor Details
#initialize ⇒ Tent
Returns a new instance of Tent.
8 9 10 11 12 13 14 15 16 |
# File 'lib/gemwarrior/entities/items/tent.rb', line 8 def initialize super self.name = 'tent' self.name_display = 'Tent' self.description = 'A magical, two-room suite pops up when you flick this otherwise folded piece of canvas just right, perfect for a night\'s rest.' self.takeable = true self.number_of_uses = 5 end |
Instance Method Details
#use(world) ⇒ Object
18 19 20 |
# File 'lib/gemwarrior/entities/items/tent.rb', line 18 def use(world) { type: 'tent', data: self.number_of_uses } end |