Buildings and wonders
improvements[46] in GAME.C contains a sentinel, 21 city buildings,
three spaceship parts and 21 wonders. Each record holds a 24-byte name and
three 16-bit integers: cost, maintenance and prerequisite. Costs are in
tens of shields for the human player.
Buildings use bits in the city’s buildings field. Improvement n uses bit
n−1. CIV.H names the Palace, City Walls and SDI masks. Spaceship parts
and wonders have separate state; they are not extra city-building bits.
A wonder can be built once. Improvement IDs 25–45 map to wonder IDs 1–21
in marvel_site, which records the city that built each wonder. Effects
are tested at their use sites, so their scope varies: some affect one city,
some its continent, and some the owning civilization.
civ_wonder() and active_wonder_city() in CITYMGT.C check obsolescence
against improvement_words[22]. A wonder expires when any non-barbarian
civilization knows its obsoleting technology. The sentinel 127 means no
obsoleting technology.
Production table
struct improvement improvements[46] = {
{ "NONE", 8, 0, -1 },
{ "Palace", 20, 5, 16 },
{ "Barracks", 4, 0, -1 },
{ "Granary", 6, 1, 42 },
{ "Temple", 4, 1, 25 },
{ "MarketPlace", 8, 1, 2 },
{ "Library", 8, 1, 22 },
{ "Courthouse", 8, 1, 1 },
{ "City Walls", 12, 2, 16 },
{ "Aqueduct", 12, 2, 45 },
{ "Bank", 12, 3, 53 },
{ "Cathedral", 16, 3, 29 },
{ "University", 16, 3, 13 },
{ "Mass Transit", 16, 4, 41 },
{ "Colosseum", 10, 4, 45 },
{ "Factory", 20, 4, 35 },
{ "Mfg. Plant", 32, 6, 63 },
{ "SDI Defense", 20, 4, 57 },
{ "Recycling Cntr.", 20, 2, 61 },
{ "Power Plant", 16, 4, 55 },
{ "Hydro Plant", 24, 4, 15 },
{ "Nuclear Plant", 16, 2, 50 },
{ "SS Structural", 8, 0, 40 },
{ "SS Component", 16, 0, 60 },
{ "SS Module", 32, 0, 63 },
{ "Pyramids", 30, 0, 16 },
{ "Hanging Gardens", 30, 0, 42 },
{ "Colossus", 20, 0, 17 },
{ "Lighthouse", 20, 0, 7 },
{ "Great Library", 30, 0, 30 },
{ "Oracle", 30, 0, 26 },
{ "Great Wall", 30, 0, 16 },
{ "Magellan's Expedition", 40, 0, 8 },
{ "Michelangelo's Chapel", 30, 0, 29 },
{ "Copernicus' Observatory", 30, 0, 6 },
{ "Shakespeare's Theatre", 40, 0, 10 },
{ "Isaac Newton's College", 40, 0, 51 },
{ "J.S.Bach's Cathedral", 40, 0, 29 },
{ "Darwin's Voyage", 30, 0, 49 },
{ "Hoover Dam", 60, 0, 15 },
{ "Women's Suffrage", 60, 0, 35 },
{ "Manhattan Project", 60, 0, 27 },
{ "United Nations", 60, 0, 43 },
{ "Apollo Program", 60, 0, 40 },
{ "SETI Program", 60, 0, 21 },
{ "Cure for Cancer", 60, 0, 59 }
};
Obsolescence table
Values are technology IDs; see the technology table.
int improvement_words[22] = {
-1, 43, 20, 54, 14, 13, 29, 34, 127, 43, 127, 15, 27, 127, 127, 127, 127, 127, 127, 127, 127, 127
};