class Kobold

Public Class Methods

new(str=12, agi=8, int=8, dmg=5, armor=5, hp=6, cur_hp=6, dodge=10, mana=2, cur_mana=2, xp=150, lvl=1, coin=2, name="Kobold") click to toggle source
Calls superclass method Mobs::new
# File lib/mobs.rb, line 159
def initialize(str=12, agi=8, int=8, dmg=5, armor=5, hp=6, cur_hp=6, dodge=10, mana=2, cur_mana=2, xp=150, lvl=1, coin=2, name="Kobold")
  kobold_type = dice(10)
  case
  when (1..5).include?(kobold_type)
    # no change, you just get the generic kobold
  when (6..9).include?(kobold_type)
    # this one has double the chance to dodge as a regular kobold
    agi      = 16
    dmg      = 6
    armor    = 6
    dodge    = 20
    xp       = 300
    coin     = 4
    name     = "Kobold Thief"
  when kobold_type == 10
    # kobold mini boss!
    str      = 16
    agi      = 12
    dmg      = 8
    armor    = 8
    hp       = 10
    cur_hp   = 10
    xp       = 400
    coin     = 5
    name     = "Kobold Berserker"
  end
  super(str,agi,int,dmg,armor,hp,cur_hp,dodge,mana,cur_mana,xp,lvl,coin,name)
end