obj/Blast/NEW
var/mob/Owner
icon='dragon.dmi'
density = 1
New(mob/M)
Owner = M
..()
Bump(atom/A)
if(istype(A,/mob))
var/mob/M = A
M.Health -= Owner.Mana/2
M << "You have been hit by Abom!"
M.death_check(M)
return ..()
else return 0
mob/verb/Abom()
sleep(20)
var/obj/Blast/NEW/B=new(src.loc, src)
B.dir = src.dir
walk(B,src.dir)
Problem description:
I'm trying to link the blast to the person do in to get it to do damage equal to half of the owners mana. But when it bumbs i get this error.
runtime error: undefined variable /turf/Castle3/Castle0_27/var/Mana
proc name: Bump (/obj/Blast/NEW/Bump)
source file: Verbs.dm,3404
usr: 0
src: NEW (/obj/Blast/NEW)
call stack:
NEW (/obj/Blast/NEW): Bump(DarK Angle (/mob/villan/Dark_Angle))
The turf is the spot where the npc or person is standing when the get hit by the blast.
That way src.loc is correctly passed to the loc variable.