A bad or good way of doing damage? in Developer Help
|
|
Is there a better way of doing this? If so, could you give an example? Because this is the best way I could think of doing it.
mob/proc/Damage(A,B,C,D) src.HP-=A src.MP-=B src.HP+=C src.MP+=D EvenOut() DeathCheck() ..() mob/proc/DeathCheck(src as mob) if(HP<=0) world << "<B>[usr] has killed [src]!" mob/proc/EvenOut() if(HP>MaxHP) HP=MaxHP if(MP>MaxMP) MP=MaxMP if(MP>0) MP = 0 if(HP>0) HP = 0
|
|