mob
RedSlime
icon = 'goop.dmi'
icon_state = "Blob (red)"
monster = 1
gold = 22
health = 105
maxhealth = 105
strength = 20
experience = 25
level = 4
NPC = 0
New()
. = ..()
spawn()
Wander()
proc/Wander(var/mob/You/P)
while(src)
if(P in oview(5))
step_towards(src,P)
for(P in oview(1))
break
for(P in oview(2))
break
for(P in oview(3))
break
for(P in oview(4))
break
else
step_rand(src)
sleep(5)
for(P in oview(5))
break
sleep(5)
spawn(5)
Wander()
Bump(mob/M)
if(M.player == 1)
Fight(M)
else
return
proc/Fight()
for(var/mob/E in get_step(usr,usr.dir))
var/damage = usr.strength - src.defense
if(damage <= 0)
damage = 1
E << "[src] attacks you for [damage] damage!!"
src<<"You attack [E] for [damage] damage!!"
UserDcheck(E)
else
E.health -= damage
E << "[src] attacks you for [damage] damage!!"
src<<"You attack [E] for [damage] damage!!"
UserDcheck(E)
</b>
Problem description: i got this part of the attack system and the monster can attck me but i cant seem to attack, plz help