ID:266685
 
How would I make it where when you cast something and it runs into something... it will take Life away from the thing you hit and delete the spell.This is my verb for casting the thing that attacks it.

mob/CA
verb
Fireball()
if (usr.casting==1)
return 0
else
if (usr.Magic>=5)
usr<<"<b><font color=white>You send a fireball hurdling forward."
if (src.dir==NORTH)
var/obj/O = new/obj/Fireball(locate(src.x,src.y+1,src.z))
usr.casting=1
usr.Magic-=5
sleep(10)
step(O,NORTH)
sleep(10)
step(O,NORTH)
sleep(10)
step(O,NORTH)
sleep(10)
step(O,NORTH)
else
usr<<"<font color=white><b>You need more Magic.