(dchrstr, pchrstr, rptstr): New member d_uid, p_uid, r_uid.

(dchr, bigcity_dchr, pchr, rpt): Initialize it.
(dchr_ca, pchr_ca, rpt_ca): New selector uid for it.
This commit is contained in:
Markus Armbruster 2005-11-19 17:37:43 +00:00
parent 661b650c1a
commit fdec6a8aae
7 changed files with 221 additions and 216 deletions

View file

@ -54,6 +54,7 @@ struct nwsstr {
#define NUM_RPTS 2 /* number of story alternates */ #define NUM_RPTS 2 /* number of story alternates */
struct rptstr { struct rptstr {
signed char r_uid;
int r_good_will; /* how "nice" the action is */ int r_good_will; /* how "nice" the action is */
int r_newspage; /* which page this item belongs on */ int r_newspage; /* which page this item belongs on */
char *r_newstory[NUM_RPTS]; /* texts for fmt( */ char *r_newstory[NUM_RPTS]; /* texts for fmt( */

View file

@ -43,6 +43,7 @@
enum { MAXPRCON = 3 }; enum { MAXPRCON = 3 };
struct pchrstr { struct pchrstr {
int p_uid;
i_type p_ctype[MAXPRCON]; /* constituent types */ i_type p_ctype[MAXPRCON]; /* constituent types */
u_short p_camt[MAXPRCON]; /* constituent amounts */ u_short p_camt[MAXPRCON]; /* constituent amounts */
i_type p_type; /* product item type, or I_NONE if level */ i_type p_type; /* product item type, or I_NONE if level */

View file

@ -90,6 +90,7 @@ struct sctstr {
}; };
struct dchrstr { struct dchrstr {
unsigned char d_uid;
int d_mnem; /* map symbol */ int d_mnem; /* map symbol */
int d_prd; /* product type */ int d_prd; /* product type */
int d_mcst; /* movement cost */ int d_mcst; /* movement cost */

View file

@ -60,163 +60,163 @@ static char no_news[] = "does nothing in particular to %s";
struct rptstr rpt[] = { struct rptstr rpt[] = {
/* nice page text */ /* nice page text */
/* 0*/ { 0, 0, { no_news, no_news } }, { 0, 0, 0, { no_news, no_news } },
{ -4, N_FRONT, { "infantry capture %s territory", { N_WON_SECT, -4, N_FRONT, { "infantry capture %s territory",
/* 1*/ "shock troops overrun one of %s's sectors" } }, "shock troops overrun one of %s's sectors" } },
{ -4, N_FRONT, { "infantry beaten back by %s troops", { N_SCT_LOSE, -4, N_FRONT, { "infantry beaten back by %s troops",
/* 2*/ "shock troops annihilated in failed attack on %s" } }, "shock troops annihilated in failed attack on %s" } },
{ -1, N_SPY, { "spy shot by %s firing squad", { N_SPY_SHOT, -1, N_SPY, { "spy shot by %s firing squad",
/* 3*/ "spy captured and shot by %s" } }, "spy captured and shot by %s" } },
{ 1, N_TELE, { "sends a telegram to %s", { N_SENT_TEL, 1, N_TELE, { "sends a telegram to %s",
/* 4*/ "telexes %s" } }, "telexes %s" } },
{ 3, N_FOR, { "diplomats sign a treaty with %s", { N_SIGN_TRE, 3, N_FOR, { "diplomats sign a treaty with %s",
/* 5*/ "ambassador agrees to a treaty with %s" } }, "ambassador agrees to a treaty with %s" } },
{ 2, N_ECON, { "bankers make a loan to %s", { N_MAKE_LOAN, 2, N_ECON, { "bankers make a loan to %s",
/* 6*/ "Ministry of Finance lends money to %s" } }, "Ministry of Finance lends money to %s" } },
{ 1, N_ECON, { "repays a loan from %s", { N_REPAY_LOAN, 1, N_ECON, { "repays a loan from %s",
/* 7*/ "makes last payment on loan from %s" } }, "makes last payment on loan from %s" } },
{ 0, N_ECON, { "makes a sale to %s", { N_MAKE_SALE, 0, N_ECON, { "makes a sale to %s",
/* 8*/ "sells goods to %s" } }, "sells goods to %s" } },
{ -1, N_SKY, { "violates %s airspace", { N_OVFLY_SECT, -1, N_SKY, { "violates %s airspace",
/* 9*/ "overflies %s territory" } }, "overflies %s territory" } },
{ -2, N_ARTY, { "gunners bombard %s territory", { N_SCT_SHELL, -2, N_ARTY, { "gunners bombard %s territory",
/* 10*/ "artillery fires on %s sectors" } }, "artillery fires on %s sectors" } },
{ -2, N_SEA, { "shells a ship owned by %s", { N_SHP_SHELL, -2, N_SEA, { "shells a ship owned by %s",
/* 11*/ "fires on %s ships" } }, "fires on %s ships" } },
{ 0, N_FRONT, { "takes over unoccupied land", { N_TOOK_UNOCC, 0, N_FRONT, { "takes over unoccupied land",
/* 12*/ "attacks unowned land for some reason" } }, "attacks unowned land for some reason" } },
{ 0, N_SEA, { "ships torpedoed by enemy wolf-packs", { N_TORP_SHIP, 0, N_SEA, { "ships torpedoed by enemy wolf-packs",
/* 13*/ "ships torpedoed by marauding U-boats" } }, "ships torpedoed by marauding U-boats" } },
{ 0, N_ARTY, { "gunners fire on %s in self-defense", { N_FIRE_BACK, 0, N_ARTY, { "gunners fire on %s in self-defense",
/* 14*/ "gunners decimate %s aggressors" } }, "gunners decimate %s aggressors" } },
{ 0, N_FOR, { "breaks sanctuary", { N_BROKE_SANCT, 0, N_FOR, { "breaks sanctuary",
/* 15*/ "no longer has a sanctuary" } }, "no longer has a sanctuary" } },
{ -2, N_SKY, { "planes divebomb one of %s's sectors", { N_SCT_BOMB, -2, N_SKY, { "planes divebomb one of %s's sectors",
/* 16*/ "bombers wreak havoc on %s" } }, "bombers wreak havoc on %s" } },
{ -2, N_SEA, { "divebombs a ship flying the flag of %s", { N_SHP_BOMB, -2, N_SEA, { "divebombs a ship flying the flag of %s",
/* 17*/ "airforce bombs %s ships" } }, "airforce bombs %s ships" } },
{ -2, N_SEA, { "seadogs board one of %s's ships", { N_BOARD_SHIP, -2, N_SEA, { "seadogs board one of %s's ships",
/* 18*/ "pirates board %s ship" } }, "pirates board %s ship" } },
{ -3, N_SEA, { "is repelled by %s while attempting to board a ship", { N_SHP_LOSE, -3, N_SEA, { "is repelled by %s while attempting to board a ship",
/* 19*/ "pirates prove inept at boarding %s's ships" } }, "pirates prove inept at boarding %s's ships" } },
/* 20*/ { 0, 0, { no_news, no_news } }, { 20, 0, 0, { no_news, no_news } },
{ -2, N_ECON, { "seizes a sector from %s to collect on a loan", { N_SEIZE_SECT, -2, N_ECON, { "seizes a sector from %s to collect on a loan",
/* 21*/ "collects one of %s's sectors in repayment of a loan" } }, "collects one of %s's sectors in repayment of a loan" } },
{ -1, N_FOR, { "considers an action which would violate a treaty with %s", { N_HONOR_TRE, -1, N_FOR, { "considers an action which would violate a treaty with %s",
/* 22*/ "decides not to violate treaty with %s (yet)" } }, "decides not to violate treaty with %s (yet)" } },
{ -4, N_FOR, { "violates a treaty with %s", { N_VIOL_TRE, -4, N_FOR, { "violates a treaty with %s",
/* 23*/ "actions violate treaty with %s" } }, "actions violate treaty with %s" } },
/* 24*/ { 0, 0, { no_news, no_news } }, { 24, 0, 0, { no_news, no_news } },
{ 0, N_SEA, { "ship hits a mine", { N_HIT_MINE, 0, N_SEA, { "ship hits a mine",
/* 25*/ "ship severely damaged in mine field" } }, "ship severely damaged in mine field" } },
{ 5, N_FOR, { "announces an alliance with %s", { N_DECL_ALLY, 5, N_FOR, { "announces an alliance with %s",
/* 26*/ "/ %s alliance declared" } }, "/ %s alliance declared" } },
/* 27*/ { 0, 0, { no_news, no_news } }, { 27, 0, 0, { no_news, no_news } },
{ -5, N_FOR, { "declares TOTAL WAR on %s", { N_DECL_WAR, -5, N_FOR, { "declares TOTAL WAR on %s",
/* 28*/ "gets serious with %s and declares WAR" } }, "gets serious with %s and declares WAR" } },
{ 0, N_FOR, { "diplomats disavow former alliance with %s", { N_DIS_ALLY, 0, N_FOR, { "diplomats disavow former alliance with %s",
/* 29*/ "is no longer allied with %s" } }, "is no longer allied with %s" } },
{ 5, N_FOR, { "is no longer at war with %s", { N_DIS_WAR, 5, N_FOR, { "is no longer at war with %s",
/* 30*/ "Foreign Ministry declares \"No more war with %s\"" } }, "Foreign Ministry declares \"No more war with %s\"" } },
{ 0, N_HOME, { "reports outbreak of the black plague", { N_OUT_PLAGUE, 0, N_HOME, { "reports outbreak of the black plague",
/* 31*/ "sector infected with bubonic plague" } }, "sector infected with bubonic plague" } },
{ 0, N_HOME, { "citizens die from bubonic plague", { N_DIE_PLAGUE, 0, N_HOME, { "citizens die from bubonic plague",
/* 32*/ "sector reports plague deaths" } }, "sector reports plague deaths" } },
{ 0, N_FOR, { "goes through a name change", { N_NAME_CHNG, 0, N_FOR, { "goes through a name change",
/* 33*/ "adopts a new country name" } }, "adopts a new country name" } },
{ 0, N_HOME, { "citizens starve in disastrous famine", { N_DIE_FAMINE, 0, N_HOME, { "citizens starve in disastrous famine",
/* 34*/ "loses citizens to mass starvation" } }, "loses citizens to mass starvation" } },
/* 35*/ { 0, 0, { no_news, no_news } }, { 35, 0, 0, { no_news, no_news } },
{ -3, N_SKY, { "pilots down %s planes", { N_DOWN_PLANE, -3, N_SKY, { "pilots down %s planes",
/* 36*/ "victorious in air-to-air combat against %s" } }, "victorious in air-to-air combat against %s" } },
{ -10,N_MISS, { "nuclear device devastates %s sector", { N_NUKE, -10,N_MISS, { "nuclear device devastates %s sector",
/* 37*/ "explodes a nuclear device damaging %s territory" } }, "explodes a nuclear device damaging %s territory" } },
{ 0, N_HOME, { "terrorists shoot it out with %s special forces", { N_FREEDOM_FIGHT, 0, N_HOME, { "terrorists shoot it out with %s special forces",
/* 38*/ "underground rises up against %s occupation" } }, "underground rises up against %s occupation" } },
{ -2, N_HOME, { "execution squads gun down helpless %s civilians", { N_SHOOT_CIV, -2, N_HOME, { "execution squads gun down helpless %s civilians",
/* 39*/ "firing squads massacre defenseless %s workers" } }, "firing squads massacre defenseless %s workers" } },
{ 0, N_MISS, { "launches a satellite into orbit", { N_LAUNCH, 0, N_MISS, { "launches a satellite into orbit",
/* 40*/ "continues its conquest of space with a successful launch" } }, "continues its conquest of space with a successful launch" } },
{ -8, N_MISS, { "strikes a %s big bird", { N_SAT_KILL, -8, N_MISS, { "strikes a %s big bird",
/* 41*/ "rockets damage a %s satellite" } }, "rockets damage a %s satellite" } },
{ 4, N_ECON, { "makes a contribution to %s", { N_GIFT, 4, N_ECON, { "makes a contribution to %s",
/* 42*/ "helps out %s" } }, "helps out %s" } },
{ 2, N_HOME, { "aids %s with divine intervention", { N_AIDS, 2, N_HOME, { "aids %s with divine intervention",
/* 43*/ "smiles upon %s" } }, "smiles upon %s" } },
{ -3, N_HOME, { "hurts %s with divine intervention", { N_HURTS, -3, N_HOME, { "hurts %s with divine intervention",
/* 44*/ "frowns upon %s" } }, "frowns upon %s" } },
{ -4, N_ECON, { "sacrifices to %s", { N_TAKE, -4, N_ECON, { "sacrifices to %s",
/* 45*/ "makes divine payment to %s" } }, "makes divine payment to %s" } },
{ -10,N_MISS, { "abms intercept a %s missile", { N_NUKE_STOP, -10,N_MISS, { "abms intercept a %s missile",
/* 46*/ "strategic defense systems destroy a %s missile" } }, "strategic defense systems destroy a %s missile" } },
{ -2, N_MISS, { "missile fired at one of %s's sectors", { N_SCT_MISS, -2, N_MISS, { "missile fired at one of %s's sectors",
/* 47*/ "missile wreaks havoc on %s" } }, "missile wreaks havoc on %s" } },
{ -2, N_MISS, { "missile fired at a ship flying the flag of %s", { N_SHP_MISS, -2, N_MISS, { "missile fired at a ship flying the flag of %s",
/* 48*/ "missiles hit %s ships" } }, "missiles hit %s ships" } },
{ 2, N_ECON, { "engages in friendly trade with %s", { N_TRADE, 2, N_ECON, { "engages in friendly trade with %s",
/* 49*/ "profits from a merchant venture with %s" } }, "profits from a merchant venture with %s" } },
{ 0, N_ECON, { "pirates dispose of %s booty in trade", { N_PIRATE_TRADE, 0, N_ECON, { "pirates dispose of %s booty in trade",
/* 50*/ "buccaneers sell their %s goods" } }, "buccaneers sell their %s goods" } },
{ 0, N_ECON, { "pirates keep their %s booty", { N_PIRATE_KEEP, 0, N_ECON, { "pirates keep their %s booty",
/* 51*/ "buccaneers laugh and bury their %s goods" } }, "buccaneers laugh and bury their %s goods" } },
{ 0, N_SEA, { "ships torpedoed by %s torpedo-boats", { N_SHIP_TORP, 0, N_SEA, { "ships torpedoed by %s torpedo-boats",
/* 52*/ "ships sunk by marauding %s torpedo-boats" } }, "ships sunk by marauding %s torpedo-boats" } },
{ 0, N_SEA, { "planes bomb a skulking %s submarine", { N_SUB_BOMB, 0, N_SEA, { "planes bomb a skulking %s submarine",
/* 53*/ "planes drop depth-charges on a %s sub" } }, "planes drop depth-charges on a %s sub" } },
/* 54*/ { 0, 0, { no_news, no_news } }, { 54, 0, 0, { no_news, no_news } },
{ -2, N_SKY, { "divebombs a brave %s unit", { N_UNIT_BOMB, -2, N_SKY, { "divebombs a brave %s unit",
/* 55*/ "airforce bombs %s units" } }, "airforce bombs %s units" } },
{ 0, N_FRONT, { "troops run afoul of a landmine", { N_LHIT_MINE, 0, N_FRONT, { "troops run afoul of a landmine",
/* 56*/ "troops severely damaged in mine field" } }, "troops severely damaged in mine field" } },
{ -2, N_ARTY, { "fortress gunners support troops attacking %s", { N_FIRE_F_ATTACK, -2, N_ARTY, { "fortress gunners support troops attacking %s",
/* 57*/ "fortress artillery massacres %s defenders" } }, "fortress artillery massacres %s defenders" } },
{ -2, N_ARTY, { "gunners support troops attacking %s", { N_FIRE_L_ATTACK, -2, N_ARTY, { "gunners support troops attacking %s",
/* 58*/ "artillery battery massacres %s defenders" } }, "artillery battery massacres %s defenders" } },
{ -2, N_ARTY, { "naval gunners support troops attacking %s", { N_FIRE_S_ATTACK, -2, N_ARTY, { "naval gunners support troops attacking %s",
/* 59*/ "naval gunfire massacres %s defenders" } }, "naval gunfire massacres %s defenders" } },
{-10, N_FOR, { "sacks %s capital", { N_SACK_CAP, 10, N_FOR, { "sacks %s capital",
/* 60*/ "captures and pillages %s's capital" } }, "captures and pillages %s's capital" } },
{ 3, N_FOR, { "announces friendly trade relations with %s", { N_UP_FRIENDLY, 3, N_FOR, { "announces friendly trade relations with %s",
/* 61*/ "upgrades %s's trade status to triple-A" } }, "upgrades %s's trade status to triple-A" } },
{ 0, N_FOR, { "downgrades relations with %s to friendly", { N_DOWN_FRIENDLY, 0, N_FOR, { "downgrades relations with %s to friendly",
/* 62*/ "cools relations with %s to friendly" } }, "cools relations with %s to friendly" } },
{ 2, N_FOR, { "upgrades relations with %s to neutral", { N_UP_NEUTRAL, 2, N_FOR, { "upgrades relations with %s to neutral",
/* 63*/ "Foreign Ministry declares \"%s is A-OK.\"" } }, "Foreign Ministry declares \"%s is A-OK.\"" } },
{ 0, N_FOR, { "downgrades relations with %s to neutral", { N_DOWN_NEUTRAL, 0, N_FOR, { "downgrades relations with %s to neutral",
/* 64*/ "gives the cold shoulder to %s and declares neutral relations" } }, "gives the cold shoulder to %s and declares neutral relations" } },
{ 3, N_FOR, { "upgrades relations with %s to hostile", { N_UP_HOSTILE, 3, N_FOR, { "upgrades relations with %s to hostile",
/* 65*/ "forgives %s of past war crimes but remains hostile" } }, "forgives %s of past war crimes but remains hostile" } },
{-3, N_FOR, { "downgrades relations with %s to hostile", { N_DOWN_HOSTILE, 3, N_FOR, { "downgrades relations with %s to hostile",
/* 66*/ "is suspicious that %s has hostile intentions" } }, "is suspicious that %s has hostile intentions" } },
{ 0, N_MISS, { "sector is struck by a sub-launched missile", { N_SCT_SMISS, 0, N_MISS, { "sector is struck by a sub-launched missile",
/* 67*/ "sector devastated by missile" } }, "sector devastated by missile" } },
{ 0, N_MISS, { "ship is hit by a sub-launched missile", { N_SHP_SMISS, 0, N_MISS, { "ship is hit by a sub-launched missile",
/* 68*/ "ship damaged by marine missile" } }, "ship damaged by marine missile" } },
{ 0, N_COLONY,{ "pilgrims settle on a new island", { N_START_COL, 0, N_COLONY,{ "pilgrims settle on a new island",
/* 69*/ "discovers new land and starts a colony" } }, "discovers new land and starts a colony" } },
{ 0, N_MISS, { "abms intercept an incoming sub-launched missile", { N_NUKE_SSTOP, 0, N_MISS, { "abms intercept an incoming sub-launched missile",
/* 70*/ "strategic defense systems destroy an incoming sub-launched warhead"}}, "strategic defense systems destroy an incoming sub-launched warhead"}},
{-2, N_MISS, { "missile fired at %s ground troops", { N_LND_MISS, 2, N_MISS, { "missile fired at %s ground troops",
/* 71*/ "missile hits %s troops" } }, "missile hits %s troops" } },
{ 0, N_MISS, { "regiment struck by sub-launched missile", { N_LND_SMISS, 0, N_MISS, { "regiment struck by sub-launched missile",
/* 72*/ "ground troops hit by missile" } }, "ground troops hit by missile" } },
{ -4, N_FRONT, { "navy secures a beachhead on %s territory", { N_AWON_SECT, -4, N_FRONT, { "navy secures a beachhead on %s territory",
/* 73*/ "sailors take a coastal sector from %s" } }, "sailors take a coastal sector from %s" } },
{ -4, N_FRONT, { "paratroopers comandeer a sector from %s", { N_PWON_SECT, -4, N_FRONT, { "paratroopers comandeer a sector from %s",
/* 74*/ "air force parachutists overwhelm a %s sector" } }, "air force parachutists overwhelm a %s sector" } },
{ 0, N_COLONY,{ "parachutists grab unoccupied land", { N_PARA_UNOCC, 0, N_COLONY,{ "parachutists grab unoccupied land",
/* 75*/ "paratroopers break new ground" } }, "paratroopers break new ground" } },
{-4, N_FRONT, { "sailors repelled by %s coast-guard", { N_ALOSE_SCT, 4, N_FRONT, { "sailors repelled by %s coast-guard",
/* 76*/ "naval forces massacred in failed assault of %s" } }, "naval forces massacred in failed assault of %s" } },
{-4, N_FRONT, { "paratroopers destroyed in failed air-assault on %s", { N_PLOSE_SCT, 4, N_FRONT, { "paratroopers destroyed in failed air-assault on %s",
/* 77*/ "loses parachutists in failed air-assault of %s" } }, "loses parachutists in failed air-assault of %s" } },
/* 78*/ { 0, 0, { no_news, no_news } }, { 78, 0, 0, { no_news, no_news } },
/* 79*/ { 0, 0, { no_news, no_news } }, { 79, 0, 0, { no_news, no_news } },
{ 0, N_ECON, { "is unable to fulfill its financial obligations to %s", { N_WELCH_DEAL, 0, N_ECON, { "is unable to fulfill its financial obligations to %s",
/* 80*/ "welches on a deal with %s" } }, "welches on a deal with %s" } },
{ -3, N_FRONT, { "is repelled by %s while attempting to board a land unit", { N_LND_LOSE, -3, N_FRONT, { "is repelled by %s while attempting to board a land unit",
/* 81*/ "forces prove inept at boarding %s's land unit" } }, "forces prove inept at boarding %s's land unit" } },
{ -2, N_FRONT, { "mercenaries board one of %s's land units", { N_BOARD_LAND, -2, N_FRONT, { "mercenaries board one of %s's land units",
/* 82*/ "elite forces board %s land unit" } }, "elite forces board %s land unit" } },
{ 0, 0, { NULL, NULL } } { 0, 0, 0, { NULL, NULL } }
}; };

View file

@ -90,6 +90,7 @@ struct castr ichr_ca[] = {
}; };
struct castr pchr_ca[] = { struct castr pchr_ca[] = {
{NSC_INT, 0, 0, offsetof(struct pchrstr, p_uid), "uid", EF_PRODUCT},
{NSC_STRING, 0, 0, offsetof(struct pchrstr, p_name), "name", EF_BAD}, {NSC_STRING, 0, 0, offsetof(struct pchrstr, p_name), "name", EF_BAD},
{NSC_STRING, NSC_CONST, 0, offsetof(struct pchrstr, p_sname), "sname", {NSC_STRING, NSC_CONST, 0, offsetof(struct pchrstr, p_sname), "sname",
EF_BAD}, EF_BAD},
@ -157,6 +158,7 @@ struct castr sect_ca[] = {
}; };
struct castr dchr_ca[] = { struct castr dchr_ca[] = {
{NSC_UCHAR, 0, 0, offsetof(struct dchrstr, d_uid), "uid", EF_SECTOR_CHR},
{NSC_STRING, 0, 0, offsetof(struct dchrstr, d_name), "name", EF_BAD}, {NSC_STRING, 0, 0, offsetof(struct dchrstr, d_name), "name", EF_BAD},
{NSC_INT, NSC_CONST, 0, offsetof(struct dchrstr, d_mnem), "mnem", EF_BAD}, {NSC_INT, NSC_CONST, 0, offsetof(struct dchrstr, d_mnem), "mnem", EF_BAD},
{NSC_INT, 0, 0, offsetof(struct dchrstr, d_prd), "prd", EF_PRODUCT}, {NSC_INT, 0, 0, offsetof(struct dchrstr, d_prd), "prd", EF_PRODUCT},
@ -527,6 +529,7 @@ struct castr intrchr_ca[] = {
}; };
struct castr rpt_ca[] = { struct castr rpt_ca[] = {
{NSC_CHAR, 0, 0, offsetof(struct rptstr, r_uid), "uid", EF_NEWS_CHR},
{NSC_STRING, 0, NUM_RPTS, offsetof(struct rptstr, r_newstory), "newstory", {NSC_STRING, 0, NUM_RPTS, offsetof(struct rptstr, r_newstory), "newstory",
EF_BAD}, EF_BAD},
{NSC_INT, 0, 0, offsetof(struct rptstr, r_good_will), "good_will", EF_BAD}, {NSC_INT, 0, 0, offsetof(struct rptstr, r_good_will), "good_will", EF_BAD},

View file

@ -40,57 +40,57 @@
struct pchrstr pchr[] = { struct pchrstr pchr[] = {
/* level cost nrndx nrdep nlndx nlmin nllag effic sname name */ /* level cost nrndx nrdep nlndx nlmin nllag effic sname name */
{{I_NONE, I_NONE, I_NONE}, {0, 0, 0}, {0, {I_NONE, I_NONE, I_NONE}, {0, 0, 0},
I_NONE, 0, 0, 0, 0, 0, 0, 0, 0, I_NONE, 0, 0, 0, 0, 0, 0, 0, 0,
"unused", "",}, "unused", "",},
{{I_LCM, I_HCM, I_NONE}, {2, 1, 0}, {P_SHELL, {I_LCM, I_HCM, I_NONE}, {2, 1, 0},
I_SHELL, -1, 3, 0, 0, NAT_TLEV, 20, 10, 100, I_SHELL, -1, 3, 0, 0, NAT_TLEV, 20, 10, 100,
"shells", "shells",}, "shells", "shells",},
{{I_OIL, I_LCM, I_HCM}, {1, 5, 10}, {P_GUN, {I_OIL, I_LCM, I_HCM}, {1, 5, 10},
I_GUN, -1, 30, 0, 0, NAT_TLEV, 20, 10, 100, I_GUN, -1, 30, 0, 0, NAT_TLEV, 20, 10, 100,
"guns", "guns",}, "guns", "guns",},
{{I_OIL, I_NONE, I_NONE}, {1, 0, 0}, {P_PETROL, {I_OIL, I_NONE, I_NONE}, {1, 0, 0},
I_PETROL, -1, 1, 0, 0, NAT_TLEV, 20, 10, 1000, I_PETROL, -1, 1, 0, 0, NAT_TLEV, 20, 10, 1000,
"petrol", "petrol",}, "petrol", "petrol",},
{{I_NONE, I_NONE, I_NONE}, {0, 0, 0}, {P_IRON, {I_NONE, I_NONE, I_NONE}, {0, 0, 0},
I_IRON, -1, 0, offsetof(struct sctstr, sct_min), 0, -1, 0, 0, 100, I_IRON, -1, 0, offsetof(struct sctstr, sct_min), 0, -1, 0, 0, 100,
"iron ore", "iron",}, "iron ore", "iron",},
{{I_NONE, I_NONE, I_NONE}, {0, 0, 0}, {P_DUST, {I_NONE, I_NONE, I_NONE}, {0, 0, 0},
I_DUST, -1, 0, offsetof(struct sctstr, sct_gmin), 20, -1, 0, 0, 100, I_DUST, -1, 0, offsetof(struct sctstr, sct_gmin), 20, -1, 0, 0, 100,
"gold dust", "dust",}, "gold dust", "dust",},
{{I_DUST, I_NONE, I_NONE}, {5, 0, 0}, {P_BAR, {I_DUST, I_NONE, I_NONE}, {5, 0, 0},
I_BAR, -1, 10, 0, 0, -1, 0, 0, 100, I_BAR, -1, 10, 0, 0, -1, 0, 0, 100,
"gold bars", "bars",}, "gold bars", "bars",},
{{I_NONE, I_NONE, I_NONE}, {0, 0, 0}, {P_FOOD, {I_NONE, I_NONE, I_NONE}, {0, 0, 0},
I_FOOD, -1, 0, offsetof(struct sctstr, sct_fertil), 0, NAT_TLEV, -10, 10, 900, I_FOOD, -1, 0, offsetof(struct sctstr, sct_fertil), 0, NAT_TLEV, -10, 10, 900,
"food", "food",}, "food", "food",},
{{I_NONE, I_NONE, I_NONE}, {0, 0, 0}, {P_OIL, {I_NONE, I_NONE, I_NONE}, {0, 0, 0},
I_OIL, -1, 0, offsetof(struct sctstr, sct_oil), 10, NAT_TLEV, -10, 10, 100, I_OIL, -1, 0, offsetof(struct sctstr, sct_oil), 10, NAT_TLEV, -10, 10, 100,
"oil", "oil",}, "oil", "oil",},
{{I_IRON, I_NONE, I_NONE}, {1, 0, 0}, {P_LCM, {I_IRON, I_NONE, I_NONE}, {1, 0, 0},
I_LCM, -1, 0, 0, 0, NAT_TLEV, -10, 10, 100, I_LCM, -1, 0, 0, 0, NAT_TLEV, -10, 10, 100,
"light construction materials", "lcm",}, "light construction materials", "lcm",},
{{I_IRON, I_NONE, I_NONE}, {2, 0, 0}, {P_HCM, {I_IRON, I_NONE, I_NONE}, {2, 0, 0},
I_HCM, -1, 0, 0, 0, NAT_TLEV, -10, 10, 100, I_HCM, -1, 0, 0, 0, NAT_TLEV, -10, 10, 100,
"heavy construction materials", "hcm",}, "heavy construction materials", "hcm",},
{{I_DUST, I_OIL, I_LCM}, {1, 5, 10}, {P_TLEV, {I_DUST, I_OIL, I_LCM}, {1, 5, 10},
I_NONE, NAT_TLEV, 300, 0, 0, NAT_ELEV, 5, 10, 100, I_NONE, NAT_TLEV, 300, 0, 0, NAT_ELEV, 5, 10, 100,
"technological breakthroughs", "tech",}, "technological breakthroughs", "tech",},
{{I_DUST, I_OIL, I_LCM}, {1, 5, 10}, {P_RLEV, {I_DUST, I_OIL, I_LCM}, {1, 5, 10},
I_NONE, NAT_RLEV, 90, 0, 0, NAT_ELEV, 5, 10, 100, I_NONE, NAT_RLEV, 90, 0, 0, NAT_ELEV, 5, 10, 100,
"medical discoveries", "medical",}, "medical discoveries", "medical",},
{{I_LCM, I_NONE, I_NONE}, {1, 0, 0}, {P_ELEV, {I_LCM, I_NONE, I_NONE}, {1, 0, 0},
I_NONE, NAT_ELEV, 9, 0, 0, -1, 0, 0, 100, I_NONE, NAT_ELEV, 9, 0, 0, -1, 0, 0, 100,
"a class of graduates", "edu",}, "a class of graduates", "edu",},
{{I_LCM, I_NONE, I_NONE}, {1, 0, 0}, {P_HLEV, {I_LCM, I_NONE, I_NONE}, {1, 0, 0},
I_NONE, NAT_HLEV, 9, 0, 0, -1, 0, 0, 100, I_NONE, NAT_HLEV, 9, 0, 0, -1, 0, 0, 100,
"happy strollers", "happy",}, "happy strollers", "happy",},
{{I_NONE, I_NONE, I_NONE}, {0, 0, 0}, {P_URAN, {I_NONE, I_NONE, I_NONE}, {0, 0, 0},
I_RAD, -1, 2, offsetof(struct sctstr, sct_uran), 35, NAT_TLEV, 40, 10, 100, I_RAD, -1, 2, offsetof(struct sctstr, sct_uran), 35, NAT_TLEV, 40, 10, 100,
"radioactive materials", "rad",}, "radioactive materials", "rad",},
{{I_NONE, I_NONE, I_NONE}, {0, 0, 0}, {P_MDUST, {I_NONE, I_NONE, I_NONE}, {0, 0, 0},
I_DUST, -1, 0, offsetof(struct sctstr, sct_gmin), 20, -1, 0, 0, 75, I_DUST, -1, 0, offsetof(struct sctstr, sct_gmin), 20, -1, 0, 0, 75,
"gold dust", "dust",}, "gold dust", "dust",},
{{I_NONE, I_NONE, I_NONE}, {0, 0, 0}, {0, {I_NONE, I_NONE, I_NONE}, {0, 0, 0},
I_NONE, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL,} I_NONE, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL,}
}; };

View file

@ -42,47 +42,46 @@
#include "product.h" #include "product.h"
struct dchrstr bigcity_dchr = { struct dchrstr bigcity_dchr = {
'c', 0, 2, NAV_02, UPKG, 1.0, 2.0, 30, 0, 10, 1, 2, 999, "city" SCT_CAPIT, 'c', 0, 2, NAV_02, UPKG, 1.0, 2.0, 30, 0, 10, 1, 2, 999, "city"
}; };
struct dchrstr dchr[] = { struct dchrstr dchr[] = {
/* /* mnem prd mcst flg pkg ostr dstr value $ bld lcm hcm maxpop name */
mnem prd mcst flg pkg ostr dstr value $ bld lcm hcm maxpop name */ {SCT_WATER, '.', 0, 0, NAVOK, NPKG, 0.0, 0.0, 0, -1, 0, 0, 0, 0, "sea"},
{'.', 0, 0, NAVOK, NPKG, 0.0, 0.0, 0, -1, 0, 0, 0, 0, "sea"}, {SCT_MOUNT, '^', P_MDUST, 25, 0, NPKG, 1.0, 4.0, 5, -1, 1, 0, 0, 99, "mountain"},
{'^', P_MDUST, 25, 0, NPKG, 1.0, 4.0, 5, -1, 1, 0, 0, 99, "mountain"}, {SCT_SANCT, 's', 0, 0, 0, NPKG, 0.0, 99.0, 127, -1, 0, 0, 0, 999, "sanctuary"},
{'s', 0, 0, 0, NPKG, 0.0, 99.0, 127, -1, 0, 0, 0, 999, "sanctuary"}, {SCT_WASTE, '\\', 0, 0, 0, NPKG, 0.0, 99.0, 0, -1, 0, 0, 0, 0, "wasteland"},
{'\\', 0, 0, 0, NPKG, 0.0, 99.0, 0, -1, 0, 0, 0, 0, "wasteland"}, {SCT_RURAL, '-', 0, 3, 0, NPKG, 1.0, 2.0, 1, 0, 0, 0, 0, 999, "wilderness"},
{'-', 0, 3, 0, NPKG, 1.0, 2.0, 1, 0, 0, 0, 0, 999, "wilderness"}, {SCT_CAPIT, 'c', 0, 2, 0, NPKG, 1.0, 2.0, 30, 0, 1, 0, 0, 999, "capital"},
{'c', 0, 2, 0, NPKG, 1.0, 2.0, 30, 0, 1, 0, 0, 999, "capital"}, {SCT_URAN, 'u', P_URAN, 2, 0, NPKG, 1.0, 2.0, 15, 0, 1, 0, 0, 999, "uranium mine"},
{'u', P_URAN, 2, 0, NPKG, 1.0, 2.0, 15, 0, 1, 0, 0, 999, "uranium mine"}, {SCT_PARK, 'p', P_HLEV, 2, 0, NPKG, 1.0, 1.5, 5, 0, 1, 0, 0, 999, "park"},
{'p', P_HLEV, 2, 0, NPKG, 1.0, 1.5, 5, 0, 1, 0, 0, 999, "park"}, {SCT_ARMSF, 'd', P_GUN, 2, 0, NPKG, 1.0, 1.5, 7, 0, 1, 0, 0, 999, "defense plant"},
{'d', P_GUN, 2, 0, NPKG, 1.0, 1.5, 7, 0, 1, 0, 0, 999, "defense plant"}, {SCT_AMMOF, 'i', P_SHELL, 2, 0, NPKG, 1.0, 1.5, 6, 0, 1, 0, 0, 999, "shell industry"},
{'i', P_SHELL, 2, 0, NPKG, 1.0, 1.5, 6, 0, 1, 0, 0, 999, "shell industry"}, {SCT_MINE, 'm', P_IRON, 2, 0, NPKG, 1.0, 2.0, 5, 0, 1, 0, 0, 999, "mine"},
{'m', P_IRON, 2, 0, NPKG, 1.0, 2.0, 5, 0, 1, 0, 0, 999, "mine"}, {SCT_GMINE, 'g', P_DUST, 2, 0, NPKG, 1.0, 2.0, 8, 0, 1, 0, 0, 999, "gold mine"},
{'g', P_DUST, 2, 0, NPKG, 1.0, 2.0, 8, 0, 1, 0, 0, 999, "gold mine"}, {SCT_HARBR, 'h', 0, 2, NAV_02, WPKG, 1.0, 1.5, 12, 0, 1, 0, 0, 999, "harbor"},
{'h', 0, 2, NAV_02, WPKG, 1.0, 1.5, 12, 0, 1, 0, 0, 999, "harbor"}, {SCT_WAREH, 'w', 0, 2, 0, WPKG, 1.0, 1.5, 7, 0, 1, 0, 0, 999, "warehouse"},
{'w', 0, 2, 0, WPKG, 1.0, 1.5, 7, 0, 1, 0, 0, 999, "warehouse"}, {SCT_AIRPT, '*', 0, 2, 0, NPKG, 1.0, 1.25, 12, 0, 1, 0, 0, 999, "airfield"},
{'*', 0, 2, 0, NPKG, 1.0, 1.25, 12, 0, 1, 0, 0, 999, "airfield"}, {SCT_AGRI, 'a', P_FOOD, 2, 0, NPKG, 1.0, 1.5, 2, 0, 1, 0, 0, 999, "agribusiness"},
{'a', P_FOOD, 2, 0, NPKG, 1.0, 1.5, 2, 0, 1, 0, 0, 999, "agribusiness"}, {SCT_OIL, 'o', P_OIL, 2, 0, NPKG, 1.0, 1.5, 5, 0, 1, 0, 0, 999, "oil field"},
{'o', P_OIL, 2, 0, NPKG, 1.0, 1.5, 5, 0, 1, 0, 0, 999, "oil field"}, {SCT_LIGHT, 'j', P_LCM, 2, 0, NPKG, 1.0, 1.5, 3, 0, 1, 0, 0, 999, "light manufacturing"},
{'j', P_LCM, 2, 0, NPKG, 1.0, 1.5, 3, 0, 1, 0, 0, 999, "light manufacturing"}, {SCT_HEAVY, 'k', P_HCM, 2, 0, NPKG, 1.0, 1.5, 4, 0, 1, 0, 0, 999, "heavy manufacturing"},
{'k', P_HCM, 2, 0, NPKG, 1.0, 1.5, 4, 0, 1, 0, 0, 999, "heavy manufacturing"}, {SCT_FORTR, 'f', 0, 2, 0, NPKG, 2.0, 4.0, 10, 0, 5, 0, 1, 999, "fortress"},
{'f', 0, 2, 0, NPKG, 2.0, 4.0, 10, 0, 5, 0, 1, 999, "fortress"}, {SCT_TECH, 't', P_TLEV, 2, 0, NPKG, 1.0, 1.5, 10, 0, 1, 0, 0, 999, "technical center"},
{'t', P_TLEV, 2, 0, NPKG, 1.0, 1.5, 10, 0, 1, 0, 0, 999, "technical center"}, {SCT_RSRCH, 'r', P_RLEV, 2, 0, NPKG, 1.0, 1.5, 9, 0, 1, 0, 0, 999, "research lab"},
{'r', P_RLEV, 2, 0, NPKG, 1.0, 1.5, 9, 0, 1, 0, 0, 999, "research lab"}, {SCT_NUKE, 'n', 0, 2, 0, NPKG, 1.0, 2.0, 10, 0, 1, 0, 0, 999, "nuclear plant"},
{'n', 0, 2, 0, NPKG, 1.0, 2.0, 10, 0, 1, 0, 0, 999, "nuclear plant"}, {SCT_LIBR, 'l', P_ELEV, 2, 0, NPKG, 1.0, 1.5, 4, 0, 1, 0, 0, 999, "library/school"},
{'l', P_ELEV, 2, 0, NPKG, 1.0, 1.5, 4, 0, 1, 0, 0, 999, "library/school"}, {SCT_HIWAY, '+', 0, 1, 0, NPKG, 1.0, 1.0, 3, 0, 1, 0, 0, 999, "highway"},
{'+', 0, 1, 0, NPKG, 1.0, 1.0, 3, 0, 1, 0, 0, 999, "highway"}, {SCT_RADAR, ')', 0, 2, 0, NPKG, 1.0, 1.5, 4, 0, 1, 0, 0, 999, "radar installation"},
{')', 0, 2, 0, NPKG, 1.0, 1.5, 4, 0, 1, 0, 0, 999, "radar installation"}, {SCT_HEADQ, '!', 0, 2, 0, NPKG, 1.0, 1.5, 12, 0, 1, 0, 0, 999, "headquarters"},
{'!', 0, 2, 0, NPKG, 1.0, 1.5, 12, 0, 1, 0, 0, 999, "headquarters"}, {SCT_BHEAD, '#', 0, 1, 0, NPKG, 1.0, 1.5, 4, 0, 1, 0, 0, 999, "bridge head"},
{'#', 0, 1, 0, NPKG, 1.0, 1.5, 4, 0, 1, 0, 0, 999, "bridge head"}, {SCT_BSPAN, '=', 0, 1, NAV_60, NPKG, 1.0, 1.0, 5, -1, 1, 0, 0, 999, "bridge span"},
{'=', 0, 1, NAV_60, NPKG, 1.0, 1.0, 5, -1, 1, 0, 0, 999, "bridge span"}, {SCT_BANK, 'b', P_BAR, 2, 0, BPKG, 1.0, 2.25, 10, 0, 1, 0, 0, 999, "bank"},
{'b', P_BAR, 2, 0, BPKG, 1.0, 2.25, 10, 0, 1, 0, 0, 999, "bank"}, {SCT_REFINE, '%', P_PETROL, 2, 0, NPKG, 1.0, 1.5, 2, 0, 1, 0, 0, 999, "refinery"},
{'%', P_PETROL, 2, 0, NPKG, 1.0, 1.5, 2, 0, 1, 0, 0, 999, "refinery"}, {SCT_ENLIST, 'e', 0, 2, 0, NPKG, 1.0, 2.0, 7, 0, 1, 0, 0, 999, "enlistment center"},
{'e', 0, 2, 0, NPKG, 1.0, 2.0, 7, 0, 1, 0, 0, 999, "enlistment center"}, {SCT_PLAINS, '~', 0, 2, 0, NPKG, 1.0, 1.5, 1, -1, 1, 0, 0, 49, "plains"},
{'~', 0, 2, 0, NPKG, 1.0, 1.5, 1, -1, 1, 0, 0, 49, "plains"}, {SCT_BTOWER, '@', 0, 1, 0, NPKG, 1.0, 1.5, 4, -1, 1, 0, 0, 999, "bridge tower"},
{'@', 0, 1, 0, NPKG, 1.0, 1.5, 4, -1, 1, 0, 0, 999, "bridge tower"}, {0, 0, 0, 0, 0, IPKG, 0, 0, 0, 0, 0, 0, 0, 0, NULL},
{0, 0, 0, 0, IPKG, 0, 0, 0, 0, 0, 0, 0, 0, NULL},
}; };
struct sctintrins intrchr[] = { struct sctintrins intrchr[] = {