/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
*
* ---
*
- * See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- * related information and legal notices. It is expected that any future
- * projects/authors will amend these files as needed.
+ * See files README, COPYING and CREDITS in the root of the source
+ * tree for related information and legal notices. It is expected
+ * that future projects/authors will amend these files as needed.
*
* ---
*
* Steve McClure, 1996
*/
+#include <config.h>
+
#include "misc.h"
#include "sect.h"
#include "nat.h"
}
neweff = n;
*cost += work_cost;
- if (opt_BIG_CITY) {
- if (!n && dchr[old_type].d_pkg == UPKG &&
- dchr[*desig].d_pkg != UPKG) {
- int maxpop = max_population(np->nat_level[NAT_RLEV], *desig, n);
- if (vec[I_CIVIL] > maxpop)
- vec[I_CIVIL] = maxpop;
- if (vec[I_UW] > maxpop)
- vec[I_UW] = maxpop;
- *workp = (vec[I_CIVIL] * sctwork) / 100.0
- + (vec[I_MILIT] * 2 / 5.0) + vec[I_UW];
- *workp = roundavg((etu * (*workp)) / 100.0);
-
- buildeff_work = min((int)(*workp / 2), buildeff_work);
- }
+ if (!n && IS_BIG_CITY(old_type) &&
+ !IS_BIG_CITY(*desig)) {
+ int maxpop = max_population(np->nat_level[NAT_RLEV], *desig, n);
+ if (vec[I_CIVIL] > maxpop)
+ vec[I_CIVIL] = maxpop;
+ if (vec[I_UW] > maxpop)
+ vec[I_UW] = maxpop;
+ *workp = (vec[I_CIVIL] * sctwork) / 100.0
+ + (vec[I_MILIT] * 2 / 5.0) + vec[I_UW];
+ *workp = roundavg((etu * (*workp)) / 100.0);
+
+ buildeff_work = MIN((int)(*workp / 2), buildeff_work);
}
}
if (np->nat_priorities[*desig]) {
inc = roundavg(etus * fallout_spread * (sp->sct_fallout)) - 1;
if (inc < 0)
inc = 0;
- ap->sct_fallout = min(ap->sct_fallout + inc, FALLOUT_MAX);
+ ap->sct_fallout = MIN(ap->sct_fallout + inc, FALLOUT_MAX);
}
}