int starved, sctwork;
int needed;
int maxpop;
+ int manna;
/* grow people & stuff */
sctwork = sp->sct_work;
maxpop));
if (sp->sct_type != SCT_SANCT) {
+ manna = 0;
if (opt_NOFOOD == 0) {
needed = (int)ceil(food_needed(vec, etu));
if (vec[I_FOOD] < needed) {
/* need to grow "emergency rations" */
work_avail -= 2 * growfood(sp, vec, work_avail / 2, etu);
/* It's twice as hard to grow those than norm */
+ if (vec[I_FOOD] == 0)
+ /* Conjure up 1f to make life easier for the player */
+ manna = vec[I_FOOD] = 1;
}
if (vec[I_FOOD] < needed && sp->sct_own == sp->sct_oldown) {
/* steal food from warehouses, headquarters,
sp->sct_x, sp->sct_y, oldche, sp->sct_che);
}
}
+ if (manna)
+ /* Take away food we conjured up */
+ vec[I_FOOD] = 0;
} else
sctwork = sp->sct_work = 100;
/* Here is where we truncate extra people, always */
food = MIN(food_workers, food_fertil);
if (food > ITEM_MAX - vec[I_FOOD])
food = ITEM_MAX - vec[I_FOOD];
- /*
- * Be nice; grow minimum one food unit.
- * This makes life simpler for the player.
- */
vec[I_FOOD] += food;
- if (vec[I_FOOD] == 0)
- vec[I_FOOD] = 1;
work_used = food / fcrate;
return work_used;
}