forked from github/server
untotewandlung korrigiert
This commit is contained in:
parent
79e5fdec38
commit
59e1c30357
1 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue