Class: Gemwarrior::Jaspern

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

Constant Summary

Constants inherited from Monster

Monster::ITEM_POOL

Instance Attribute Summary

Attributes inherited from Monster

#battlecry, #is_boss, #is_dead

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 Monster

#describe_detailed

Methods inherited from Creature

#describe, #describe_detailed

Methods inherited from Entity

#puts

Constructor Details

#initializeJaspern

Returns a new instance of Jaspern.



9
10
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/jaspern.rb', line 9

def initialize
  super

  self.name         = 'jaspern'
  self.name_display = 'Jaspern'
  self.description  = 'Dark green hair, but yellow and brown skin, Jaspern is actually somewhat translucent, and he does not appear to be moveable or go-around-able.'
  self.battlecry    = 'I am the keeper of this bridge! To go further, you must get through me!'
  self.face         = 'crystalline'
  self.hands        = 'small'
  self.mood         = 'opaque'

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

  self.inventory    = random_item
  self.rox          = rand((level * 6)..(level * 7))
  self.xp           = rand((level * 8)..(level * 10))

  self.is_boss      = true
end

Instance Method Details

#river_bridge_success(world) ⇒ Object



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/gemwarrior/entities/monsters/bosses/jaspern.rb', line 39

def river_bridge_success(world)
  # get object references
  river_bridge = world.location_by_name('river_bridge')
  jaspern = river_bridge.bosses_abounding[0]

  # mark jaspern as dead
  jaspern.is_dead = true
  jaspern.face        = 'broken'
  jaspern.hands       = 'limp'
  jaspern.mood        = 'defeated'
  jaspern.hp_cur      = 0
  jaspern.rox         = 0
  jaspern.description = 'As Jaspern lies motionless upon the ground, you feel sorry for murdering him in cold blood without any provocation, but you feel like he was probably bad, and you really needed to explore further north. Regardless, it looks like you own the bridge now.'
  jaspern.inventory   = Inventory.new

  # unlock northward travel
  river_bridge.description = 'The path northward on this well-constructed bridge is no longer blocked after your brutal scuffle with Jaspern, and yet the flowing river below seems unperturbed.'
  river_bridge.paths[:north] = true
  return
end

#use(world) ⇒ Object



35
36
37
# File 'lib/gemwarrior/entities/monsters/bosses/jaspern.rb', line 35

def use(world)
  speak('You are not going any further north, little man. No matter of talking will move me!')
end