class Skeleton
Public Class Methods
new(str=12, agi=10, int=8, dmg=5, armor=6, hp=8, cur_hp=8, dodge=5, mana=0, cur_mana=0, xp=200, lvl=1, coin=3, name="Skeleton")
click to toggle source
Calls superclass method
Mobs::new
# File lib/mobs.rb, line 192 def initialize(str=12, agi=10, int=8, dmg=5, armor=6, hp=8, cur_hp=8, dodge=5, mana=0, cur_mana=0, xp=200, lvl=1, coin=3, name="Skeleton") skeleton_type = dice(10) case when (1..5).include?(skeleton_type) # no change, you just get the generic skeleton when (6..9).include?(skeleton_type) # this feller is considerably tougher str = 16 dmg = 6 armor = 8 hp = 10 cur_hp = 10 xp = 300 coin = 3 name = "Skeletal Knight" when skeleton_type == 10 # skeleton mini boss! str = 14 agi = 14 dmg = 8 armor = 8 hp = 10 cur_hp = 10 dodge = 10 xp = 400 coin = 5 name = "Skeleton of Geoff" end super(str,agi,int,dmg,armor,hp,cur_hp,dodge,mana,cur_mana,xp,lvl,coin,name) end