Well, I put a little combat in my game, and when I attack a mob I end up dying. This is the code for the attack:
mob/verb
punch(mob/M in oview(1))
usr << "You punch \the [M]."
oview()-M << "[src] punches [M]."
M << "[src] punches you."
M.HP -= src.Strength - M.Defense
usr.LevelUp()
M.DeathCheck()
And since the DeathCheck proc is what locates you at the starting point when you die here is the DeathCheck proc:
mob/proc/DeathCheck(AD)
HP = HP - Strength - AD
if(HP < 0)
src << "You have died!"
oview() << "[src] has died."
if(usr.key)
usr.Move(locate(/area/fountain))
else
del src
When I attack a mob, I end up where the DeathCheck locates you, but i dont see it say "You have died!"... any suggestions?
ID:149336
![]() May 20 2002, 12:57 pm
|
|
-LoW