Class: Gemwarrior::Monster

Inherits:
Creature show all
Defined in:
lib/gemwarrior/entities/monster.rb

Instance Attribute Summary collapse

Attributes inherited from Creature

#atk_hi, #atk_lo, #defense, #dexterity, #face, #hands, #hp_cur, #hp_max, #inventory, #level, #mood, #rox, #xp

Attributes inherited from Entity

#description, #name

Instance Method Summary collapse

Methods inherited from Entity

#status

Instance Attribute Details

#battlecryObject

Returns the value of attribute battlecry.



8
9
10
# File 'lib/gemwarrior/entities/monster.rb', line 8

def battlecry
  @battlecry
end

#is_bossObject

Returns the value of attribute is_boss.



8
9
10
# File 'lib/gemwarrior/entities/monster.rb', line 8

def is_boss
  @is_boss
end

Instance Method Details

#describeObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/gemwarrior/entities/monster.rb', line 10

def describe
  status_text =  name.upcase.ljust(26)
  status_text << "LEVEL: #{level.to_s.rjust(2)}, "
  status_text << "HP: #{hp_cur.to_s.rjust(3)}/#{hp_max.to_s.rjust(3)} "
  status_text << "ATK: #{atk_lo.to_s.rjust(2)}-#{atk_hi.to_s.rjust(2)} "
  status_text << "DEF: #{defense.to_s.rjust(2)} "
  status_text << "DEX: #{dexterity.to_s.rjust(2)} "
  status_text << "INV: #{inventory.list_contents} "
  status_text << "ROX: #{rox.to_s.rjust(3)} "
  status_text << "XP: #{xp.to_s.rjust(3)} "
  status_text << "FACE: #{face.ljust(10)} "
  status_text << "HANDS: #{hands.ljust(11)} "
  status_text << "MOOD: #{mood.ljust(10)}\n"
end