nobody ever profited from castle bonuses

This commit is contained in:
Enno Rehling 2011-03-09 14:48:39 +01:00
parent ff51fe6493
commit cf4e081179
1 changed files with 8 additions and 8 deletions

View File

@ -3352,9 +3352,9 @@ fighter *make_fighter(battle * b, unit * u, side * s1, boolean attack)
if (attack) { if (attack) {
set_attacker(fig); set_attacker(fig);
} else { } else {
building *b = u->building; building *bld = u->building;
if (b && b->sizeleft >= u->number && playerrace(u->race)) { if (bld && bld->sizeleft >= u->number && playerrace(u->race)) {
fig->building = b; fig->building = bld;
fig->building->sizeleft -= u->number; fig->building->sizeleft -= u->number;
} }
} }
@ -4062,6 +4062,11 @@ static boolean init_battle(region * r, battle ** bp)
battle *b = NULL; battle *b = NULL;
unit *u; unit *u;
boolean fighting = false; boolean fighting = false;
building *bu;
/* Alle Mann raus aus der Burg! */
for (bu = r->buildings; bu != NULL; bu = bu->next)
bu->sizeleft = bu->size;
/* list_foreach geht nicht, wegen flucht */ /* list_foreach geht nicht, wegen flucht */
for (u = r->units; u != NULL; u = u->next) { for (u = r->units; u != NULL; u = u->next) {
@ -4428,7 +4433,6 @@ void do_battle(region * r)
battle *b = NULL; battle *b = NULL;
boolean fighting = false; boolean fighting = false;
ship *sh; ship *sh;
building *bu;
static int init_rules = 0; static int init_rules = 0;
if (!init_rules) { if (!init_rules) {
@ -4460,10 +4464,6 @@ void do_battle(region * r)
join_allies(b); join_allies(b);
make_heroes(b); make_heroes(b);
/* Alle Mann raus aus der Burg! */
for (bu = r->buildings; bu != NULL; bu = bu->next)
bu->sizeleft = bu->size;
/* make sure no ships are damaged initially */ /* make sure no ships are damaged initially */
for (sh = r->ships; sh; sh = sh->next) for (sh = r->ships; sh; sh = sh->next)
freset(sh, SF_DAMAGED); freset(sh, SF_DAMAGED);