Class: Gemwarrior::Emerald

Inherits:
Monster show all
Defined in:
lib/gemwarrior/entities/monsters/bosses/emerald.rb

Constant Summary

Constants inherited from Monster

Monster::INVENTORY_ITEMS_DEFAULT

Instance Attribute Summary collapse

Attributes inherited from Monster

#battlecry, #inventory, #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

#description, #name

Instance Method Summary collapse

Methods inherited from Monster

#describe

Methods inherited from Entity

#status

Constructor Details

#initializeEmerald

Returns a new instance of Emerald.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/gemwarrior/entities/monsters/bosses/emerald.rb', line 11

def initialize
  self.name           = 'Emerald'
  self.description    = 'A wily, beefy, tower of a man, champion of both wisdom and strength, sporting a constant glint in his eyes.'
  self.face           = 'gleaming'
  self.hands          = 'tantalizing'
  self.mood           = 'enraged'

  self.level          = 15
  self.hp_cur         = rand((level * 2)..(level * 3))
  self.hp_max         = hp_cur
  self.atk_lo         = rand(level..(level * 2.5).floor)
  self.atk_hi         = rand((level * 2.5).floor..(level * 3).floor)
  self.defense        = rand(5..7)
  self.dexterity      = rand(8..10)

  self.inventory      = Inventory.new(items = [SparklyThing.new])
  self.rox            = rand((level * 2)..(level * 3))
  self.xp             = rand(level..(level * 2))

  self.battlecry      = 'Ha ha ha ha ha! Prepare yourself: today your whole life crumbles!'
  self.is_boss        = true
  self.defeated_text  = defeated_text
end

Instance Attribute Details

#defeated_textObject

Returns the value of attribute defeated_text.



9
10
11
# File 'lib/gemwarrior/entities/monsters/bosses/emerald.rb', line 9

def defeated_text
  @defeated_text
end