XXOXX
XOOOX The O is where it explodes,
OOoOO the X is where I don't want it to hit
XOOOX
XXOXX
But the code I have to handle the damage, only effects mobs in o-range 1, so the 4 extra blasts on the edges don't actually hit anything, they just look fancy.
Right now, I have the following
Hit(atom/A)
var/damage
damage=round((src.Pow+rand((src.Pow*(-0.25)),(src.Pow*0.25))))
for(var/mob/X in oview(1,A))
X.health-=round(damage/2)
if(istype(A,/mob))
A.health-=damage
oview(src) << "[src] hit [A]! [damage] Damage!"
A = TurfOf(A)
if(A) loc = A
Terminate()
Terminate() is what handles the visual effects, and it works just fine. I just need the 'for(var/mob/X in oview(1,A)) to include an extra space in each direction without just making the whole square larger... O.o