/////////////////////////////////////////
///////////////////ATTACK////////////////
mob
verb
attack()
att()
mob/var
party=0
mob/proc/att(M as mob)
if(M in view(1) && M:party==0 && friendly==0)
var/dmg = src.str - M:def
view()<<"[src.name] attack [M:name] and make [dmg] damage"
M:hp -= dmg
M:DeathCheck()
else
usr<<"The target is your party member or he is a friendly npc, you cant attack him!"
if(M:monster==1)
var/dmg = src.str - M:def
view()<<"[src.name] attack [M:name] and make [dmg] damage"
M:hp -= dmg
M:DeathCheck()
M:attack(src)
mob/proc/DeathCheck()
if(src.hp >=0)
del(src)
Problem description:
When i get to the mob and i press on the verb attack, nothing happens, also i would like to know how to make it that it attack the closest one, couse ussually it is that when there are more mobs in view(1) the menu will popup and usr will have to choose, and thats kinda stupid becouse the fights are supposed to be dynamics...Anyway, please help me...
this demo shows you a good attack system, attacks the mob you're facing only, has alot of other good elements too, if you don't like having a graphic in the square you're attacking just go make the sword.dmi file blank
mike