Class: Gemwarrior::Monster
- Defined in:
- lib/gemwarrior/entities/monster.rb
Direct Known Subclasses
Alexandrat, Amberoo, Amethystle, Apatiger, Aquamarine, Bloodstorm, Boss, Citrinaga, Coraliz, Cubicat, Diaman, Emerald
Instance Attribute Summary collapse
-
#battlecry ⇒ Object
Returns the value of attribute battlecry.
-
#is_boss ⇒ Object
Returns the value of attribute is_boss.
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
Instance Method Summary collapse
Methods inherited from Entity
Instance Attribute Details
#battlecry ⇒ Object
Returns the value of attribute battlecry.
8 9 10 |
# File 'lib/gemwarrior/entities/monster.rb', line 8 def battlecry @battlecry end |
#is_boss ⇒ Object
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
#describe ⇒ Object
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 |