STIRB angepasst. Zentauren gehen an Pferde, Orks zählen nur die Hälfte

This commit is contained in:
Katja Zedel 2002-02-19 20:41:20 +00:00
parent 024c24e39b
commit 376d38e787
1 changed files with 33 additions and 9 deletions

View File

@ -134,8 +134,19 @@ destroyfaction(faction * f)
if (friends && number) { if (friends && number) {
struct friend * nf = friends; struct friend * nf = friends;
while (nf) { while (nf) {
resource_t res;
unit * u2 = nf->unit; unit * u2 = nf->unit;
#ifdef NEW_ITEMS
const item * itm;
for (itm=u->items;itm;itm=itm->next) {
int n = itm->number;
if (n<=0) continue;
n = n * nf->number / number;
if (n<=0) continue;
i_change(&u->items, itm->type, -n);
i_change(&u2->items, itm->type, n);
}
#else
resource_t res;
for (res = 0; res <= R_SILVER; ++res) { for (res = 0; res <= R_SILVER; ++res) {
int n = get_resource(u, res); int n = get_resource(u, res);
if (n<=0) continue; if (n<=0) continue;
@ -144,24 +155,37 @@ destroyfaction(faction * f)
change_resource(u, res, -n); change_resource(u, res, -n);
change_resource(u2, res, n); change_resource(u2, res, n);
} }
#endif
number -= nf->number; number -= nf->number;
nf = nf->next; nf = nf->next;
free(friends); free(friends);
friends = nf; friends = nf;
} }
friends = NULL; friends = NULL;
} else { }
int p = rpeasants(u->region), if (rterrain(r) != T_OCEAN && !!playerrace(u->race)) {
m = rmoney(u->region), const race * rc = u->race;
h = rhorses(u->region); int p = rpeasants(u->region);
if (rterrain(r) != T_OCEAN && !!playerrace(u->race)) { int m = rmoney(u->region);
p += u->number; int h = rhorses(u->region);
m += get_money(u);
h += get_item(u, I_HORSE); /* Personen gehen nur an die Bauern, wenn sie auch von dort
* stammen */
if ((rc->ec_flags & ECF_REC_UNLIMITED)==0) {
if (rc->ec_flags & ECF_REC_HORSES) { /* Zentauren an die Pferde */
h += u->number;
} else if (rc == new_race[RC_URUK]){ /* Orks zählen nur zur Hälfte */
p += u->number/2;
} else {
p += u->number;
}
} }
m += get_money(u);
h += get_item(u, I_HORSE);
rsetpeasants(r, p); rsetpeasants(r, p);
rsethorses(r, h); rsethorses(r, h);
rsetmoney(r, m); rsetmoney(r, m);
} }
set_number(u, 0); set_number(u, 0);
} }