obj/projectile
var/damage=0
var/owner
var/odir
var/delay=3
proc/Effect(mob/A)
A.hp -= damage
A.mhp += damage/2
view(A) << "[A] has been hit by [src.owner]'s spell!"
A.Deathcheck()
Aqua_Undo
icon='Aqua Eructo.dmi'
icon_state = ""
density=1
damage=15
Bump(atom/A)
if(ismob(A))
var/mob/M=A
for(var/mob/H in oview(1,M))
if(H.hp + 7 >= H.mhp)
H.hp=H.mhp
H<<"You are cleansed by some of the water that hit [M], restoring some HP"
else
H.hp+=7
H<<"You are cleansed by some of the water that hit [M], restoring some HP"
Effect(M)
..()
del src
else
view(A)<<"[owner] missed their intended target and hit [A]!"
for(var/mob/H in oview(1,A))
if(H.hp + 7 >= H.mhp)
H.hp=H.mhp
H<<"You are cleansed by some of the water that hit [A], restoring some HP"
else
H.hp+=7
H<<"You are cleansed by some of the water that hit [A], restoring some HP"
del src
Problem description: The code works perfectly up to the point it hits a mob, at which point the mob's I want healed aren't healed. Can someone please tell me why it wont work, and perhaps some way to fix it please.
Also, absolutely no point in doing this: