mob/proc/Death(var/mob/killer)
if(src.HP <= 0)
view(6) << "[killer] has killed [src]!"
killer.Exp+=src.Exp // Add exp
killer.Gil+=src.Gil
killer.Level_Up() // Run level checking proc
killer.Skill_Check()
src.Gil = 0
if(src.NPC == 1)
del src
if(src.Tantaum == 1)
if(src.NPC == 0)
src.loc = locate(69,13,1)
src.HP = src.Max_HP
src.MP = src.Max_MP
if(src.NPC == 0)
src.loc = locate(14,22,1)
src.HP = src.Max_HP
src.MP = src.Max_MP
That's my death check proc. I don't think it's even indented right anymore I've gotten so desperate.
obj/LMM
icon='spells.dmi'
icon_state = "LMM"
var/mob/creator
density=1
Bump(mob/M in world)
if(ismob(M))
var/damage = creator.Willpower + rand(30,50)
M.HP -= (damage)
M << "You're struck with a light magic missile for [damage]!"
creator << "You hit with Light Magic Missile for [damage]!"
del src
if(M.HP<=0)
M.Death(M)
This is my LMM.
mob/cleric/verb/Light_Magic_Missile()
if(usr.MP >= 20)
usr.MP -= 20
view() << sound("Hit2.wav")
usr.projectile(new/obj/LMM(usr.loc),usr.dir,6)
else
usr << "Not enough mana..."
And this is some more, probably irrelevant pieces to my LMM.
Problem description:
For some reason, when someone or something is attacked with a light magic missile, it will go into negative HPs. Now, this problem doesn't exist with my Attack verb. I cannot figure out why.
Thanks in advance,
Chance