global/var/blastdamage = 0
proc
DarkBlast()
blastdamage = input("How much of your lifeforce to inflict damage?") as num
usr.hp -= blastdamage
var/obj/blast = new /obj/darkblast(usr.loc)
blast.dir = usr.dir
blast.loc = usr.loc
blast.density = 0
walk(blast,blast.dir)
obj
darkblast
icon='skills.dmi'
icon_state="blast"
density=1
opacity=0
Bump(mob/M)
if(istype(M, /mob/Shadow))
del(src)
return
else
M.hp -= (blastdamage - M.def)
if(usr.battletext ==1)
usr << "You used Dark Blast on [M] for [blastdamage] damage"
if(M.battletext ==1)
M << "[src] used Dark Blast on you for [blastdamage] damage"
M.Deathcheck()
del(src)
Problem description:
it asks how much lifeforce and takes it from the user. then cretes the blast and it goes forward, however does not bump/stop on anything and doesnt do anything after that. what am i doing wrong?