]> git.pond.sub.org Git - empserver/blob - src/lib/global/news.c
(rpt): Add sentinel.
[empserver] / src / lib / global / news.c
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2005, Dave Pare, Jeff Bailey, Thomas Ruschak,
4  *                           Ken Stevens, Steve McClure
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  *  ---
21  *
22  *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
23  *  related information and legal notices. It is expected that any future
24  *  projects/authors will amend these files as needed.
25  *
26  *  ---
27  *
28  *  news.c: News item characteristics
29  * 
30  *  Known contributors to this file:
31  *     
32  */
33 /*
34  * News item characteristics; one entry (and two different
35  * strings) per news item.  Be sure and increase N_MAX_VERB
36  * in news.h if you add a news item.
37  *
38  * Order must correspond to ordering in news.h
39  */
40
41 #include "misc.h"
42 #include "news.h"
43
44 char *page_headings[N_MAX_PAGE + 1] = {
45 /* not used */ "Comics",
46 /* N_FOR    */ "Foreign Affairs",
47 /* N_FRONT  */ "The Front Line",
48 /* N_SEA    */ "The High Seas",
49 /* N_SKY    */ "Sky Watch",
50 /* N_MISS   */ "Guidance Systems",
51 /* N_ARTY   */ "Firestorms",
52 /* N_ECON   */ "Business & Economics",
53 /* N_COLONY */ "The Frontier",
54 /* N_HOME   */ "The Home Front",
55 /* N_SPY    */ "Espionage",
56 /* N_TELE   */ "Telecommunications"
57 };
58
59 static char no_news[] = "does nothing in particular to %s";
60
61 struct rptstr rpt[N_MAX_VERB + 2] = {
62 /*  nice  page     text */
63 /*  0*/ { 0,  0, { no_news, no_news } },
64     { -4, N_FRONT, { "infantry capture %s territory",
65 /*  1*/              "shock troops overrun one of %s's sectors" } },
66     { -4, N_FRONT, { "infantry beaten back by %s troops",
67 /*  2*/              "shock troops annihilated in failed attack on %s" } },
68     { -1, N_SPY,   { "spy shot by %s firing squad",
69 /*  3*/              "spy captured and shot by %s" } },
70     { 1,  N_TELE,  { "sends a telegram to %s",
71 /*  4*/              "telexes %s" } },
72     { 3,  N_FOR,   { "diplomats sign a treaty with %s",
73 /*  5*/              "ambassador agrees to a treaty with %s" } },
74     { 2,  N_ECON,  { "bankers make a loan to %s",
75 /*  6*/              "Ministry of Finance lends money to %s" } },
76     { 1,  N_ECON,  { "repays a loan from %s",
77 /*  7*/              "makes last payment on loan from %s" } },
78     { 0,  N_ECON,  { "makes a sale to %s",
79 /*  8*/              "sells goods to %s" } },
80     { -1, N_SKY,   { "violates %s airspace",
81 /*  9*/              "overflies %s territory" } },
82     { -2, N_ARTY,  { "gunners bombard %s territory",
83 /* 10*/              "artillery fires on %s sectors" } },
84     { -2, N_SEA,   { "shells a ship owned by %s",
85 /* 11*/              "fires on %s ships" } },
86     { 0,  N_FRONT, { "takes over unoccupied land",
87 /* 12*/              "attacks unowned land for some reason" } },
88     { 0,  N_SEA,   { "ships torpedoed by enemy wolf-packs",
89 /* 13*/              "ships torpedoed by marauding U-boats" } },
90     { 0,  N_ARTY,  { "gunners fire on %s in self-defense",
91 /* 14*/              "gunners decimate %s aggressors" } },
92     { 0,  N_FOR,   { "breaks sanctuary",
93 /* 15*/              "no longer has a sanctuary" } },
94     { -2, N_SKY,   { "planes divebomb one of %s's sectors",
95 /* 16*/              "bombers wreak havoc on %s" } },
96     { -2, N_SEA,   { "divebombs a ship flying the flag of %s",
97 /* 17*/              "airforce bombs %s ships" } },
98     { -2, N_SEA,   { "seadogs board one of %s's ships",
99 /* 18*/              "pirates board %s ship" } },
100     { -3, N_SEA,   { "is repelled by %s while attempting to board a ship",
101 /* 19*/              "pirates prove inept at boarding %s's ships" } },
102 /* 20*/ { 0, 0, { no_news, no_news } },
103     { -2, N_ECON,  { "seizes a sector from %s to collect on a loan",
104 /* 21*/              "collects one of %s's sectors in repayment of a loan" } },
105     { -1, N_FOR,   { "considers an action which would violate a treaty with %s",
106 /* 22*/              "decides not to violate treaty with %s (yet)" } },
107     { -4, N_FOR,   { "violates a treaty with %s",
108 /* 23*/              "actions violate treaty with %s" } },
109 /* 24*/ { 0, 0, { no_news, no_news } },
110     { 0,  N_SEA,   { "ship hits a mine",
111 /* 25*/              "ship severely damaged in mine field" } },
112     { 5,  N_FOR,   { "announces an alliance with %s",
113 /* 26*/              "/ %s alliance declared" } },
114 /* 27*/ { 0, 0, { no_news, no_news } },
115     { -5, N_FOR,   { "declares TOTAL WAR on %s",
116 /* 28*/              "gets serious with %s and declares WAR" } },
117     { 0,  N_FOR,   { "diplomats disavow former alliance with %s",
118 /* 29*/              "is no longer allied with %s" } },
119     { 5,  N_FOR,   { "is no longer at war with %s",
120 /* 30*/              "Foreign Ministry declares \"No more war with %s\"" } },
121     { 0,  N_HOME,  { "reports outbreak of the black plague",
122 /* 31*/              "sector infected with bubonic plague" } },
123     { 0,  N_HOME,  { "citizens die from bubonic plague",
124 /* 32*/              "sector reports plague deaths" } },
125     { 0,  N_FOR,   { "goes through a name change",
126 /* 33*/              "adopts a new country name" } },
127     { 0,  N_HOME,  { "citizens starve in disastrous famine",
128 /* 34*/              "loses citizens to mass starvation" } },
129 /* 35*/ { 0, 0, { no_news, no_news } },
130     { -3, N_SKY,   { "pilots down %s planes",
131 /* 36*/              "victorious in air-to-air combat against %s" } },
132     { -10,N_MISS,  { "nuclear device devastates %s sector",
133 /* 37*/              "explodes a nuclear device damaging %s territory" } },
134     { 0,  N_HOME,  { "terrorists shoot it out with %s special forces",
135 /* 38*/              "underground rises up against %s occupation" } },
136     { -2, N_HOME,  { "execution squads gun down helpless %s civilians",
137 /* 39*/              "firing squads massacre defenseless %s workers" } },
138     {  0, N_MISS,  { "launches a satellite into orbit",
139 /* 40*/              "continues its conquest of space with a successful launch" } },
140     { -8, N_MISS,  { "strikes a %s big bird",
141 /* 41*/              "rockets damage a %s satellite" } },
142     {  4, N_ECON,  { "makes a contribution to %s",
143 /* 42*/              "helps out %s" } },
144     {  2, N_HOME,  { "aids %s with divine intervention",
145 /* 43*/              "smiles upon %s" } },
146     { -3, N_HOME,  { "hurts %s with divine intervention",
147 /* 44*/              "frowns upon %s" } },
148     { -4, N_ECON,  { "sacrifices to %s",
149 /* 45*/              "makes divine payment to %s" } },
150     { -10,N_MISS,  { "abms intercept a %s missile",
151 /* 46*/              "strategic defense systems destroy a %s missile" } },
152     { -2, N_MISS,  { "missile fired at one of %s's sectors",
153 /* 47*/              "missile wreaks havoc on %s" } },
154     { -2, N_MISS,  { "missile fired at a ship flying the flag of %s",
155 /* 48*/              "missiles hit %s ships" } },
156     {  2, N_ECON,  { "engages in friendly trade with %s",
157 /* 49*/              "profits from a merchant venture with %s" } },
158     {  0, N_ECON,  { "pirates dispose of %s booty in trade",
159 /* 50*/              "buccaneers sell their %s goods" } },
160     {  0, N_ECON,  { "pirates keep their %s booty",
161 /* 51*/              "buccaneers laugh and bury their %s goods" } },
162     {  0, N_SEA,   { "ships torpedoed by %s torpedo-boats",
163 /* 52*/              "ships sunk by marauding %s torpedo-boats" } },
164     {  0, N_SEA,   { "planes bomb a skulking %s submarine",
165 /* 53*/              "planes drop depth-charges on a %s sub" } },
166 /* 54*/ { 0, 0, { no_news, no_news } },
167     { -2, N_SKY,   { "divebombs a brave %s unit",
168 /* 55*/              "airforce bombs %s units" } },
169     { 0,  N_FRONT, { "troops run afoul of a landmine",
170 /* 56*/              "troops severely damaged in mine field" } },
171     { -2, N_ARTY,  { "fortress gunners support troops attacking %s",
172 /* 57*/              "fortress artillery massacres %s defenders" } },
173     { -2, N_ARTY,  { "gunners support troops attacking %s",
174 /* 58*/              "artillery battery massacres %s defenders" } },
175     { -2, N_ARTY,  { "naval gunners support troops attacking %s",
176 /* 59*/              "naval gunfire massacres %s defenders" } },
177     {-10, N_FOR,   { "sacks %s capital",
178 /* 60*/              "captures and pillages %s's capital" } },
179     { 3,  N_FOR,   { "announces friendly trade relations with %s",
180 /* 61*/              "upgrades %s's trade status to triple-A" } },
181     { 0,  N_FOR,   { "downgrades relations with %s to friendly",
182 /* 62*/              "cools relations with %s to friendly" } },
183     { 2,  N_FOR,   { "upgrades relations with %s to neutral",
184 /* 63*/              "Foreign Ministry declares \"%s is A-OK.\"" } },
185     { 0,  N_FOR,   { "downgrades relations with %s to neutral",
186 /* 64*/              "gives the cold shoulder to %s and declares neutral relations" } },
187     { 3,  N_FOR,   { "upgrades relations with %s to hostile",
188 /* 65*/              "forgives %s of past war crimes but remains hostile" } },
189     {-3,  N_FOR,   { "downgrades relations with %s to hostile",
190 /* 66*/              "is suspicious that %s has hostile intentions" } },
191     { 0,  N_MISS,  { "sector is struck by a sub-launched missile",
192 /* 67*/              "sector devastated by missile" } },
193     { 0,  N_MISS,  { "ship is hit by a sub-launched missile",
194 /* 68*/              "ship damaged by marine missile" } },
195     { 0,  N_COLONY,{ "pilgrims settle on a new island",
196 /* 69*/              "discovers new land and starts a colony" } },
197     { 0,  N_MISS,  { "abms intercept an incoming sub-launched missile",
198 /* 70*/              "strategic defense systems destroy an incoming sub-launched warhead"}},
199     {-2,  N_MISS,  { "missile fired at %s ground troops",
200 /* 71*/              "missile hits %s troops" } },
201     { 0,  N_MISS,  { "regiment struck by sub-launched missile",
202 /* 72*/              "ground troops hit by missile" } },
203     { -4, N_FRONT, { "navy secures a beachhead on %s territory",
204 /* 73*/              "sailors take a coastal sector from %s" } },
205     { -4, N_FRONT, { "paratroopers comandeer a sector from %s",
206 /* 74*/              "air force parachutists overwhelm a %s sector" } },
207     { 0,  N_COLONY,{ "parachutists grab unoccupied land",
208 /* 75*/              "paratroopers break new ground" } },
209     {-4,  N_FRONT, { "sailors repelled by %s coast-guard",
210 /* 76*/              "naval forces massacred in failed assault of %s" } },
211     {-4,  N_FRONT, { "paratroopers destroyed in failed air-assault on %s",
212 /* 77*/              "loses parachutists in failed air-assault of %s" } },
213     { 0,  N_ECON,  { "is forced into debt to %s by bad management",
214 /* 78*/              "shows bad financial planning" } },
215     { 0,  N_ECON,  { "has its credit rating downgraded to unworthy status",
216 /* 79*/              "is denied credit by %s due to lack of collatoral" } },
217     { 0,  N_ECON,  { "is unable to fulfill its financial obligations to %s",
218 /* 80*/              "welches on a deal with %s" } },
219     { -3, N_FRONT, { "is repelled by %s while attempting to board a land unit",
220 /* 81*/              "forces prove inept at boarding %s's land unit" } },
221     { -2, N_FRONT, { "mercenaries board one of %s's land units",
222 /* 82*/              "elite forces board %s land unit" } },
223     { 0, 0, { NULL, NULL } }
224 };