mob/Bump(mob/src)
if(istype(src,/turf))
return
var/to_hit = roll("1d[src.ac]")
src.name += usr.killlist
if(to_hit < usr.ac)
src << "Your attack missed [usr]"
return
else
var/damage_dice = roll("1d[src.str]")
var/damage = round(damage_dice - usr.dex)
if(damage < 0 )
src << "Your attack has no effect on [usr]"
return
else
usr.hp -= damage
if(usr.hp < 0)
src.score += usr.exp
src.exp += usr.exp
src << "You killed [usr]"
del(src)
Problem description:
Took it from a demo on the byond hub, altered it for basic combat to just test. Compiles fine, but when I bump into the monsters on the map I get this error:
runtime error: type mismatch
proc name: Bump (/mob/Bump)
usr: Shades (/mob/PC)
src: Shades (/mob/PC)
call stack:
Shades (/mob/PC): Bump(Cave Lizard (/mob/monster/Lizards/Cave_Lizard))
I just realised it is like a abuse of user on my part.
Is usr.killlist a list? You can't add a list to src.name I think.