while (!player->aborted && nxtsct(&nstr, §)) {
if (!player->owner)
continue;
- if (!player->god) {
- if (sect.sct_type == SCT_MOUNT ||
- sect.sct_type == SCT_BTOWER ||
- sect.sct_type == SCT_BSPAN ||
- sect.sct_type == SCT_WASTE ||
- sect.sct_type == SCT_PLAINS ||
- (opt_NO_LCMS && sect.sct_type == SCT_LIGHT) ||
- (opt_NO_HCMS && sect.sct_type == SCT_HEAVY) ||
- (opt_NO_OIL && sect.sct_type == SCT_OIL) ||
- (opt_NO_OIL && sect.sct_type == SCT_REFINE))
- continue;
- }
+ if (!player->god && dchr[sect.sct_type].d_cost < 0)
+ continue;
sprintf(prompt, "%s %d%% %s desig? ",
xyas(sect.sct_x, sect.sct_y, player->cnum),
sect.sct_effic, dchr[sect.sct_type].d_name);
return (long)-RET_FAIL;
}
if (!player->god) {
- if (des == SCT_WATER || des == SCT_MOUNT ||
- des == SCT_SANCT || des == SCT_PLAINS ||
- (opt_NO_LCMS && des == SCT_LIGHT) ||
- (opt_NO_HCMS && des == SCT_HEAVY) ||
- (opt_NO_OIL && des == SCT_OIL) ||
- (opt_NO_OIL && des == SCT_REFINE)) {
- if (for_real)
- pr("Only %s can make a %s!\n", cname(0), dchr[des].d_name);
- continue;
- }
if (des == SCT_WASTE) {
if (for_real)
pr("Only a nuclear device (or %s) can make a %s!\n",
cname(0), dchr[des].d_name);
continue;
}
+ if (dchr[des].d_cost < 0) {
+ if (for_real)
+ pr("Only %s can make a %s!\n", cname(0), dchr[des].d_name);
+ continue;
+ }
}
if (sect.sct_type == des && sect.sct_newtype == des)
continue;
if (sect.sct_type == SCT_SANCT)
breaksanct++;
- if (des == SCT_HARBR) {
+ if ((des == SCT_HARBR) || (des == SCT_BHEAD)) {
for (n = 1; n <= 6; n++) {
getsect(nstr.x + diroff[n][0],
nstr.y + diroff[n][1], &check);
continue;
}
}
- if (des == SCT_BHEAD) {
- for (n = 1; n <= 6; n++) {
- getsect(nstr.x + diroff[n][0],
- nstr.y + diroff[n][1], &check);
- if (check.sct_type == SCT_WATER)
- break;
- if (check.sct_type == SCT_BSPAN)
- break;
- if (check.sct_type == SCT_BTOWER)
- break;
- }
- if (n > 6) {
- if (for_real)
- pr("%s does not border on water.\n",
- xyas(nstr.x, nstr.y, player->cnum));
- if (player->god) {
- if (for_real)
- pr("But if it's what you want...\n");
- } else
- continue;
- }
- }
if (sect.sct_type == SCT_SANCT && !player->god)
continue;
n = sect.sct_type;
if ((sect.sct_newtype != des) && (sect.sct_type != des)
- && dchr[des].d_cost) {
+ && dchr[des].d_cost > 0) {
if (for_real) {
if (check_cost(!deschar, dchr[des].d_cost, cash, &warned,
player->argp[3]))
struct dchrstr dchr[SCT_MAXDEF + 2] = {
/*
mnem prd mcst flg pkg ostr dstr value $ bld lcm hcm name */
- {'.', 0, 0, NAVOK, NPKG, 0.0, 0.0, 0, 0, 0, 0, 0, "sea"},
- {'^', P_MDUST, 25, 0, NPKG, 1.0, 4.0, 5, 0, 1, 0, 0, "mountain"},
- {'s', 0, 0, 0, NPKG, 0.0, 99.0, 127, 0, 0, 0, 0, "sanctuary"},
- {'\\', 0, 0, 0, NPKG, 0.0, 99.0, 0, 0, 0, 0, 0, "wasteland"},
+ {'.', 0, 0, NAVOK, NPKG, 0.0, 0.0, 0, -1, 0, 0, 0, "sea"},
+ {'^', P_MDUST, 25, 0, NPKG, 1.0, 4.0, 5, -1, 1, 0, 0, "mountain"},
+ {'s', 0, 0, 0, NPKG, 0.0, 99.0, 127, -1, 0, 0, 0, "sanctuary"},
+ {'\\', 0, 0, 0, NPKG, 0.0, 99.0, 0, -1, 0, 0, 0, "wasteland"},
{'-', 0, 3, 0, NPKG, 1.0, 2.0, 1, 0, 0, 0, 0, "wilderness"},
{'c', 0, 2, 0, NPKG, 1.0, 2.0, 30, 0, 1, 0, 0, "capital"},
{'u', P_URAN, 2, 0, NPKG, 1.0, 2.0, 15, 0, 1, 0, 0, "uranium mine"},
{')', 0, 2, 0, NPKG, 1.0, 1.5, 4, 0, 1, 0, 0, "radar installation"},
{'!', 0, 2, 0, NPKG, 1.0, 1.5, 12, 0, 1, 0, 0, "headquarters"},
{'#', 0, 1, 0, NPKG, 1.0, 1.5, 4, 0, 1, 0, 0, "bridge head"},
- {'=', 0, 1, NAV_60, NPKG, 1.0, 1.0, 5, 0, 1, 0, 0, "bridge span"},
+ {'=', 0, 1, NAV_60, NPKG, 1.0, 1.0, 5, -1, 1, 0, 0, "bridge span"},
{'b', P_BAR, 2, 0, BPKG, 1.0, 2.25, 10, 0, 1, 0, 0, "bank"},
{'%', P_PETROL, 2, 0, NPKG, 1.0, 1.5, 2, 0, 1, 0, 0, "refinery"},
{'e', 0, 2, 0, NPKG, 1.0, 2.0, 7, 0, 1, 0, 0, "enlistment center"},
- {'~', 0, 2, 0, NPKG, 1.0, 1.5, 1, 0, 1, 0, 0, "plains"},
- {'@', 0, 1, 0, NPKG, 1.0, 1.5, 4, 0, 1, 0, 0, "bridge tower"},
+ {'~', 0, 2, 0, NPKG, 1.0, 1.5, 1, -1, 1, 0, 0, "plains"},
+ {'@', 0, 1, 0, NPKG, 1.0, 1.5, 4, -1, 1, 0, 0, "bridge tower"},
{0, 0, 0, 0, IPKG, 0, 0, 0, 0, 0, 0, 0, 0},
{0, 0, 0, 0, IPKG, 0, 0, 0, 0, 0, 0, 0, 0}
};