//Attack code
mob/verb
Attack()
set hidden =1
if(canFight&&move)
if(!swordOn)flick("punch",src)
else flick("Sword Slash1",src)
for(var/mob/M in get_step(src,src.dir))
if(!M.ko)
canFight--
var/off= round(str+rand(-1,1))
if(off<1)off=1
var/def=round((M.lev-lev)*5)
if(def<1)def=1
var/dmg= round(off-def)
if(dmg<1)dmg=1
if(M.passive=="Evasion")
var/R2=100-M.passiveRate
var/sum2=R2+M.passiveRate
var/roll2=rand(1,sum2)
for(var/T2 in passiveList)if(roll2==T2)
dmg=0
show_damage(M,"miss","#f80")
else
if(passive=="Critical"||passive=="Pierce")
var/R=100-passiveRate// subracts the passiveRate from 100 and assigns it to R ex. 100-25=75
var/sum=R+passiveRate // it takes R which is the difference of 100 and passiveRate and assigns it to sum ex. 75+25=100
var/roll=rand(1,sum) // it picks a random number from 1 to the sum
for(var/T in passiveList)
if(roll==T)//assigns T as number from the passiveList; then it tries to find if roll is equal to one of those numbers
if(passive=="Critical")
dmg*=3
donePassive++
if(passive=="Pierce")
dmg=round(str+rand(-1,1))
donePassive++
if(donePassive)
if(passive=="Critical")show_damage(M, dmg, "yellow")
else if(passive=="Pierce")show_damage(M,dmg,"blue")
donePassive--
else show_damage(M, dmg, "#fff")
M.hp-=dmg
if(M.client)
M.Update()
if(M.tab=="vitals")M.statsTab()
if(M.hp<1)M.koCheck()
spawn(hitDelay)
canFight++
mob/proc
koCheck()
if(hp<1)
hp=0
ko=1
move=0
overlays+='ko.dmi'
wounds+=35
Update()
view()<<"[src]: my wounds are [wounds]%"//for debugging
if(wounds>99)Death()
//death code
mob/proc
Death(mob/M)
if(!src||!M)return
if(wounds>99)
if(client)world<<output("[M] has died in the hands of [src]!","playerOut")
view(src)<<output("[src]: [src.mDm]","playerOutput")
ko=0
overlays-='ko.dmi'
//locate and call healling proc
if(istype(src, /mob/Enemies))
loc = locate(0,0,0)
enemyHeal()
spawn(spawnTime*10)
loc = oldSpot
var/D=src.expGive+100
M.exp+=D
if(M.exp>=M.maxExp)M.levelUp()
M<<"Exp +[D]"
//and finally enemy code
mob/Enemies/New()
if(src.enemyType=="Bully")
src.enemyOverlay()
src.lev=rand(1,10)
src.enemyPower()
src.name="Lv-[src.lev] Bully"
spawn(-1) src.CombatAI()
return ..()
Problem description: It's probably really simple but I can't seem to figure it out. What I am trying to do is call the death proc if my enemy has more than 99 wounds but when I do nothing happens. It worked a few days ago.