mob/verb/attack(mob/M)
set category = "Taijutsu"
var/damage = src.Taijutsu
M << "[src] has attacked you for [damage] damage!"
if(src.client)
src << "You attacked [M] for [damage] damage!"
M.Stamina-=damage
src.death(M)
if(src.client)
src.exp+= M.stamina/2
if(src.exp >= src.maxexp)
src.Levelup()
else
return ..()
mob/proc/death(mob/M as mob)
if(M.Stamina <= 0)
M.Stamina = M.maxstamina
M.chakra = M.maxchakra
if(!src.Spawn_Point)
src.loc = locate(1,1,1) // Defualt spawn area
else
src.loc = locate(src.Spawn_Point)
world << "<h4><font color = red>[src] has killed [M]</h4></font>"
When I press attack it will attack myself o_O.
set src in oview(1), also you can try using: