What I want the following code to do is give the person that used "Attack" to get targeted for the Stronger() proc, and the mob to get targeted for the DeathCheck() proc.
Would this do that?
mob
var
atk
def
proc
DeathCheck(mob/M)
if(src.hp<=0)
oview() << "<font color=red>[src.name] died at the hands of [M.name]!</font>"
Stronger(mob/M)
if(M.atk>(src.atk+500) && M.def>(src.def+100))
var/tmp/up = rand(1,3)
if(up == 3)
src.atk += rand(1,300)
src.def += rand(1,300)
else
return
else if(M.atk>(src.atk+200))
src.atk+=rand(1,50)
src.def+=rand(1,50)
else
var/tmp/up = rand(1,10)
if(up == 8)
src.atk+=rand(1,20)
src.def+=rand(1,20)
else
return
verb
Attack(mob/M in view(1))
set category="Fighting"
var/tmp/damage = src.atk/M.def+rand(1,100)
M.hp -= damage
oview(src) << "<font color=white>[M.name] was hit by [src.name] for [damage] health!</font>"
DeathCheck(M)
Stronger(src)
On a side note, if you're going to delete the mob in the DeathCheck (because I see it isn't finished yet), then be sure to add a check when calling your Stronger() proc to see if M and src exist.
Or you could just call Stronger() in your DeathCheck(), when the mob isn't dead yet.