untotewandlung korrigiert

This commit is contained in:
Katja Zedel 2002-01-20 09:24:35 +00:00
parent 79e5fdec38
commit 59e1c30357

View file

@ -84,10 +84,11 @@ void
age_skeleton(unit *u) age_skeleton(unit *u)
{ {
if (u->faction->no == 0 && rand()%100 < age_chance(u->age, 27, 1)) { 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); double q = (double) u->hp / (double) (unit_max_hp(u) * u->number);
u->race = new_race[RC_SKELETON_LORD]; u->race = new_race[RC_SKELETON_LORD];
u->irace = 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); u->hp = (int) (unit_max_hp(u) * u->number * q);
} }
} }
@ -96,10 +97,11 @@ void
age_zombie(unit *u) age_zombie(unit *u)
{ {
if (u->faction->no == 0 && rand()%100 < age_chance(u->age, 27, 1)) { 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); double q = (double) u->hp / (double) (unit_max_hp(u) * u->number);
u->race = new_race[RC_ZOMBIE_LORD]; u->race = new_race[RC_ZOMBIE_LORD];
u->irace = 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); u->hp = (int) (unit_max_hp(u) * u->number * q);
} }
} }
@ -108,10 +110,11 @@ void
age_ghoul(unit *u) age_ghoul(unit *u)
{ {
if (u->faction->no == 0 && rand()%100 < age_chance(u->age, 27, 1)) { 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); double q = (double) u->hp / (double) (unit_max_hp(u) * u->number);
u->race = new_race[RC_GHOUL_LORD]; u->race = new_race[RC_GHOUL_LORD];
u->irace = 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); u->hp = (int) (unit_max_hp(u) * u->number * q);
} }
} }