From 59e1c3035724c0666926a5db2355236188d2d329 Mon Sep 17 00:00:00 2001 From: Katja Zedel Date: Sun, 20 Jan 2002 09:24:35 +0000 Subject: [PATCH] untotewandlung korrigiert --- src/common/races/zombies.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/common/races/zombies.c b/src/common/races/zombies.c index a83766f2e..2abe89672 100644 --- a/src/common/races/zombies.c +++ b/src/common/races/zombies.c @@ -84,10 +84,11 @@ void age_skeleton(unit *u) { if (u->faction->no == 0 && rand()%100 < age_chance(u->age, 27, 1)) { + int n = u->number/2; double q = (double) u->hp / (double) (unit_max_hp(u) * u->number); u->race = new_race[RC_SKELETON_LORD]; u->irace = new_race[RC_SKELETON_LORD]; - scale_number(u,1); + scale_number(u,n); u->hp = (int) (unit_max_hp(u) * u->number * q); } } @@ -96,10 +97,11 @@ void age_zombie(unit *u) { if (u->faction->no == 0 && rand()%100 < age_chance(u->age, 27, 1)) { + int n = u->number/2; double q = (double) u->hp / (double) (unit_max_hp(u) * u->number); u->race = new_race[RC_ZOMBIE_LORD]; u->irace = new_race[RC_ZOMBIE_LORD]; - scale_number(u,1); + scale_number(u,n); u->hp = (int) (unit_max_hp(u) * u->number * q); } } @@ -108,10 +110,11 @@ void age_ghoul(unit *u) { if (u->faction->no == 0 && rand()%100 < age_chance(u->age, 27, 1)) { + int n = u->number/2; double q = (double) u->hp / (double) (unit_max_hp(u) * u->number); u->race = new_race[RC_GHOUL_LORD]; u->irace = new_race[RC_GHOUL_LORD]; - scale_number(u,1); + scale_number(u,n); u->hp = (int) (unit_max_hp(u) * u->number * q); } }