Class: Gemwarrior::ThinMan

Inherits:
Person show all
Defined in:
lib/gemwarrior/entities/people/thin_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

Methods inherited from Creature

#describe, #describe_detailed

Methods inherited from Entity

#puts

Constructor Details

#initializeThinMan

Returns a new instance of ThinMan.



8
9
10
11
12
13
14
# File 'lib/gemwarrior/entities/people/thin_man.rb', line 8

def initialize
  super

  self.name         = 'thin_man'
  self.name_display = 'Thin Man'
  self.description  = 'An almost shockingly gaunt man is sitting on the ground, resting against a wall. He wears a patchwork quilt of a hat, and his slender frame is covered by a simple brown tunic. His feet point comically toward the sky in brown boots while his head dips down slightly, eyes watching something in the distance you can\'t see.'
end

Instance Method Details

#use(world) ⇒ Object



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/gemwarrior/entities/people/thin_man.rb', line 16

def use(world)
  if self.used
    puts 'The thin man barely moves his head as he puts up a single grim hand, motioning you to back off.'
  else
    puts 'The thin man lifts his head up slightly, meets your gaze, and responds to your greeting:'
    speak('I may be incredibly spare right now, but I was once a strapping young person, such as yourself. Just in case you ever fall during your journey, be sure to approach unlikely sources, as you may find those who will help you.')
    speak('Now, please, allow me my peace.')

    self.used = true
  end

  { type: nil, data: nil }
end