Here is all the code I have for my attack.
mob
verb
Attack(mob/M as mob in oview(1))
var/damage = usr.strength - M.def
if(damage <= 0)
usr << "[M] easily dodges your attack!"
M << "You easily dodge [usr]'s attack."
else
M.HP -= damage
view() << "[usr] attacks [M] for [damage] HP!"
M:deathcheck()
mob
NPC
proc
deathchecknpc()
if(src.HP <= 0)
view() << "[src] dies!"
del(src)
mob
PC
proc
deathcheck()
if(src.HP <= 0)
view() << "[src] dies!"
src.HP = 10
src.Hunger = 10
src.Thirst = 10
src.Move(locate(2,2,1))
usr.strength += 1
usr.def += 1
Here is the big error.
runtime error: undefined proc or verb /mob/NPC/Worm/deathcheck().
proc name: Attack (/mob/verb/Attack)
usr: GM Little Sally (/mob/PC)
src: GM Little Sally (/mob/PC)
call stack:
GM Little Sally (/mob/PC): Attack(Worm (/mob/NPC/Worm))
if(M==client)
//player death check stuff here
else
//npc check here.