Class: Gemwarrior::DrunkMan
- Includes:
- Formatting
- Defined in:
- lib/gemwarrior/entities/people/drunk_man.rb
Instance Attribute Summary
Attributes inherited from Creature
#atk_hi, #atk_lo, #defense, #dexterity, #face, #hands, #hp_cur, #hp_max, #inventory, #level, #mood, #rox, #speak, #xp
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 ⇒ DrunkMan
constructor
A new instance of DrunkMan.
- #use(world) ⇒ Object
Methods included from Formatting
Methods inherited from Creature
Methods inherited from Entity
Constructor Details
#initialize ⇒ DrunkMan
Returns a new instance of DrunkMan.
11 12 13 14 15 16 17 |
# File 'lib/gemwarrior/entities/people/drunk_man.rb', line 11 def initialize super self.name = 'drunk_man' self.name_display = 'Drunk Man' self.description = 'Some supernatural force is surely keeping this obviously smashed individual from toppling over to the ground. The inebriated fellow somehow continues to stumble about in a small circle near a smattering of shipping crates, looking simultaneously dazed and cheerful.' end |
Instance Method Details
#use(world) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/gemwarrior/entities/people/drunk_man.rb', line 19 def use(world) choose_blurting self.used = [true, false].sample { type: nil, data: nil } end |