mob
villan
Wolfling
icon = 'monster.dmi'
hp = 50
strength = 15
defense = 9
var/mob
New()
. = ..()
spawn()
move()
proc/move()
while(src)
var/player_found = 0
for(mob in oview(8,src))
step_towards(src,mob)
player_found = 1
break
if(player_found != 1)
step_rand(src)
sleep(10)
sleep(5)
Bump(mob/M)
if(istype(M,/mob))
attack(M)
proc/attack(mob/M)
var/damage = rand(1,strength)
M.hp -= damage
M <<"You are being attacked by [src]!"
src.exp += rand(5,10)
src.level_up()
M.death_check(src)
Problem description:
When in testing, I get within the alotted distance, and it remains still. I can attack them, and kill them, and gain experience, but they don't move.
(I may not be describing well, i'm tired >.> Damn pi.)
You probably want it to be var/mob/player/something, in fact, in order to loop through only mob/players.