ID:142083
 
Problem description:

And for some reason the enemy hit turns invinsible O_o

EDIT:
Okay, Im 100% sure that it's the death proc, not the projectile code thats bugged O_o
it disappears, doesnt KO em, and dont kill em

Projectile Code:

        Bump(A)
if(ismob(A))
var/mob/M = A
if(M == src.Gowner)
del src
return
return
var/mob/O = src.Gowner
var/damage = O.rei + round(O.level/2) - M.defence
if(damage < 1)
damage = 1
M.hp -= damage
M.DamageShow(damage,200,0,0)
M.die(O)
view(O,8) << "<b><font color = red>[O] hit [M] with his arrow for [damage] damage!"
del(src)
if(istype(A,/turf/))
var/turf/T = A
if(T.density)
del(src)
if(istype(A,/obj/))
del(src)
Move()
var/K = new/obj/projectile/arrowtrail(src.loc)
K:dir = src.dir
..()
arrowtrail



Death Proc:
        die(mob/M)
if(src.hp<=0)
if(src.KO)
view(src,8) <<"<b><font color = red>[src] has been killed by [M]</b></font>"
src.loc = locate(0,0,0)
src.KO = 0
var/list/options = list("Die","Wait")
var/where = input(src,"Do you want to die or wait for an ambulance?") in options
switch(where)
if("Die")
src.loc = locate(63,41,3)
src<<"<b><font color = red>You have died, your body saperated from your soul, taking alot of strength from your body. </font> </b>"
src<<"<b><font color=green>You are now a soul, and is stuck at dangai, the tunnel that connects the 3 dimensions, to the left, you feel a slight attraction. .</font></b>"
src.race = "Soul"
src.icon = 'Base MaleW.dmi'
src.maxhp -= round(src.maxhp/6)
src.status2 = "Wondering Soul"
src.maxrei -= round(src.maxrei/6)
src.defence -= round(src.defence/6)
src.attack -= round(src.attack/6)
src.hp=src.maxhp
src.rei=src.maxrei
usr.contents -= new/obj/QuincyKit
src.verbs -= /mob/player/hollow/verb/Cero
src.verbs -= /mob/player/kido/verb/BasicBlast
src.KO = 0
src.overlays -= "KO.dmi"
if("Wait")
sleep(60)
src<<"You hear a siren faintly in the background..."
sleep(180)
src<<"You feel your body being lifted from the ground and bandages being warped around your wounds."
sleep(200)
src<<"<b>Doctor:</b> Boy, you really scared me back there, you almost died, that was some serious wounds!"
src.loc = locate(91,18,2)
src.hp=src.maxhp
src.rei=src.maxrei
src.KO = 0
src.overlays -= "KO.dmi"
return
if(src.enemy)
M.exp += src.expgain
var/turf/oldloc = src.loc
src.loc = locate(0,0,0)
spawn()
if(istype(src,/AI/Monster/Bully/))
sleep(100)
var/AI/Monster/Bully/A = new()
A.loc = oldloc
if(istype(src,/AI/Monster/WeakHollow/))
sleep(220)
var/AI/Monster/WeakHollow/A = new()
A.loc = oldloc
if(istype(src,/AI/Monster/Rats/))
sleep(140)
var/AI/Monster/Rats/A = new()
A.loc = oldloc
if(istype(src,/AI/Monster/SmallHollow/))
sleep(20)
var/AI/Monster/SmallHollow/A = new()
A.loc = oldloc
if(istype(src,/AI/Monster/BigHollow/))
sleep(20)
var/AI/Monster/BigHollow/A = new()
A.loc = oldloc
if(istype(src,/AI/Monster/MenosGrande/))
sleep(20)
var/AI/Monster/MenosGrande/A = new()
A.loc = oldloc
else
view(src,8) << "<b><font color = red>[src] has been knocked out by [M]!"
src.KO = 1
src.overlays += "KO.dmi"
sleep(300)
src.KO = 0
src.overlays -= "KO.dmi"
Oh coem on guys ._.
Well, since there wasn't any repl.. Bump~