mob/
A
Monsters
icon = 'monsters.dmi'
icon_state = "metty"
name = "MonV"
HP = 100
Attack = 5
Charge = 1
New()
. = ..()
spawn()
move()
proc/move()
while(src)
var/player_found = 0
for(usr in oview(8,src))
step_towards(src,usr)
player_found = 1
break
if(player_found != 1)
step_rand(src)
sleep(10)
sleep(5)
Bump(mob/M)
if(M.HP <=0)
..()
else
if(istype(M,/mob/Player))
attack(M)
proc/attack(mob/M)
var/damage = rand(1,Attack)
M.HP -= damage
M <<"You are being attacked by [src]!"
src.icon_state = "metty"
if(M.HP <= 0)
src.icon_state = "metty"
src.exp += rand(5,10)
src.level_up()
M.deathcheck(src)
Problem description: Hi, In my monster code I added this:
if(M.HP <=0)
..()
else
return