diff options
Diffstat (limited to 'src/map/mob.cpp')
-rw-r--r-- | src/map/mob.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/mob.cpp b/src/map/mob.cpp index fad3083..f73dc89 100644 --- a/src/map/mob.cpp +++ b/src/map/mob.cpp @@ -272,12 +272,16 @@ void mob_mutate(dumb_ptr<mob_data> md, mob_stat stat, int intensity) int real_intensity2 = (((new_stat - old_stat) << 8) / mut_base); if (real_intensity < 0) + { if (real_intensity2 > real_intensity) real_intensity = real_intensity2; + } if (real_intensity > 0) + { if (real_intensity2 < real_intensity) real_intensity = real_intensity2; + } } real_intensity *= sign; @@ -2457,6 +2461,9 @@ int mob_damage(dumb_ptr<block_list> src, dumb_ptr<mob_data> md, int damage, } } + if (damage > md->hp) + damage = md->hp; + md->hp -= damage; if (md->hp > 0) |