ID:266568
 
mob/verb/Attack(mob/M in oview(1))
set category="Attacks"
var/damage=usr.str-M.def+1
if(usr.spar==0)
if(M.spar==0)
if(usr.icon_state=="normal")
flick("punch",usr)
if(usr.icon_state=="ssj")
flick("spunch",usr)
M.HP-=damage
attcheck(usr)
Dcheck(M)
usr.exp+=rand(10,150)
else
if(usr.spar==1)
if(M.HP>=2)
usr<<"You Attack [M] for [damage] damage"
M.HP-=damage
else
usr<<"[M] is too tired and rejects to spar any longer"
else
if(M.side!=usr.side)
if(usr.icon_state=="normal")
flick("punch",usr)
if(usr.icon_state=="ssj")
flick("spunch",usr)
M.HP-=damage
attcheck(usr)
Dcheck(M)
usr.exp+=rand(10,150)
else
usr<<"You Cant attack a team mate that is sparring"

else
if(M.side!=usr.side)
if(usr.icon_state=="normal")
flick("punch",usr)
if(usr.icon_state=="ssj")
flick("spunch",usr)
M.HP-=damage
attcheck(usr)
Dcheck(M)
usr.exp+=rand(10,150)
else
usr<<"Dont attack Team mates that are sparring"


that would be my attack code but even when both of them have their spars on it still says dont attack a team mate