class GiantRat
Opponents below
Public Class Methods
new(str=12, agi=10, int=4, dmg=5, armor=6, hp=8, cur_hp=8, dodge=5, mana=0, cur_mana=0, xp=150, lvl=1, coin=1, name="Giant Rat")
click to toggle source
Calls superclass method
Mobs::new
# File lib/mobs.rb, line 91 def initialize(str=12, agi=10, int=4, dmg=5, armor=6, hp=8, cur_hp=8, dodge=5, mana=0, cur_mana=0, xp=150, lvl=1, coin=1, name="Giant Rat") rat_type = dice(10) case when (1..5).include?(rat_type) # no change, you just get the generic giant rat when (6..9).include?(rat_type) # this feller is much harder to defeat str = 14 dmg = 6 hp = 10 cur_hp = 10 dodge = 10 xp = 250 coin = 2 name = "ROUS" when rat_type == 10 # Giant rat mini boss! str = 16 dmg = 8 hp = 12 cur_hp = 12 dodge = 15 xp = 400 coin = 4 name = "Nuck Chorris" end super(str,agi,int,dmg,armor,hp,cur_hp,dodge,mana,cur_mana,xp,lvl,coin,name) end