/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
*cost += work_cost;
if (!n && IS_BIG_CITY(old_type) &&
!IS_BIG_CITY(*desig)) {
+ // FIXME use trunc_people() and total_work()
int maxpop = max_population(np->nat_level[NAT_RLEV], *desig, n);
if (vec[I_CIVIL] > maxpop)
vec[I_CIVIL] = maxpop;
/* Need to check treaties here */
enlisted = 0;
- maxmil = (vec[I_CIVIL] / 2) - vec[I_MILIT];
+ maxmil = vec[I_CIVIL] / 2 - vec[I_MILIT];
if (maxmil > 0) {
- enlisted = (etu * (10 + vec[I_MILIT]) * 0.05);
+ enlisted = etu * (10 + vec[I_MILIT]) * 0.05;
if (enlisted > maxmil)
enlisted = maxmil;
vec[I_CIVIL] -= enlisted;
desig = sp->sct_type;
if ((sp->sct_effic < 100 || sp->sct_type != sp->sct_newtype) &&
- np->nat_money > 0) {
+ np->nat_money >= 0) {
neweff = upd_buildeff(np, sp, &work, vec, etu, &desig, sctwork,
&cost);
bp_put_items(bp, sp, vec);
*/
if (neweff >= 60) {
- if (np->nat_money > 0 && dchr[desig].d_prd >= 0)
+ if (np->nat_money >= 0 && dchr[desig].d_prd >= 0)
work -= produce(np, sp, vec, work, desig, neweff,
&pcost, &amount);
bp_put_items(bp, sp, vec);