/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
- * Ken Stevens, Steve McClure
+ * Copyright (C) 1986-2014, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Ken Stevens, Steve McClure, Markus Armbruster
*
- * This program is free software; you can redistribute it and/or modify
+ * Empire is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* ---
*
- * See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- * related information and legal notices. It is expected that any future
- * projects/authors will amend these files as needed.
+ * See files README, COPYING and CREDITS in the root of the source
+ * tree for related information and legal notices. It is expected
+ * that future projects/authors will amend these files as needed.
*
* ---
*
* news.c: News item characteristics
- *
+ *
* Known contributors to this file:
- *
+ *
*/
+
/*
* News item characteristics; one entry (and two different
* strings) per news item. Be sure and increase N_MAX_VERB
* Order must correspond to ordering in news.h
*/
-#include "misc.h"
+#include <config.h>
+
#include "news.h"
-char *page_headings[N_MAX_PAGE + 1] = {
-/* not used */ "Comics",
-/* N_FOR */ "Foreign Affairs",
-/* N_FRONT */ "The Front Line",
-/* N_SEA */ "The High Seas",
-/* N_SKY */ "Sky Watch",
-/* N_MISS */ "Guidance Systems",
-/* N_ARTY */ "Firestorms",
-/* N_ECON */ "Business & Economics",
-/* N_COLONY */ "The Frontier",
-/* N_HOME */ "The Home Front",
-/* N_SPY */ "Espionage",
-/* N_TELE */ "Telecommunications"
-};
+static char no_news[] = "does nothing in particular to %s";
-struct rptstr rpt[N_MAX_VERB + 1] = {
-/* nice page text
-*/ {0, 0, {"does nothing in particular to %s",
-/* 0*/ "does nothing to %s"}},
- {-4, N_FRONT, {"infantry capture %s territory",
-/* 1*/ "shock troops overrun one of %s's sectors"}},
- {-4, N_FRONT, {"infantry beaten back by %s troops",
-/* 2*/
- "shock troops annihilated in failed attack on %s"}},
- {-1, N_SPY, {"spy shot by %s firing squad",
-/* 3*/ "spy captured and shot by %s"}},
- {1, N_TELE, {"sends a telegram to %s",
-/* 4*/ "telexes %s"}},
- {3, N_FOR, {"diplomats sign a treaty with %s",
-/* 5*/ "ambassador agrees to a treaty with %s"}},
- {2, N_ECON, {"bankers make a loan to %s",
-/* 6*/ "Ministry of Finance lends money to %s"}},
- {1, N_ECON, {"repays a loan from %s",
-/* 7*/ "makes last payment on loan from %s"}},
- {0, N_ECON, {"makes a sale to %s",
-/* 8*/ "sells goods to %s"}},
- {-1, N_SKY, {"violates %s airspace",
-/* 9*/ "overflies %s territory"}},
- {-2, N_ARTY, {"gunners bombard %s territory",
-/* 10*/ "artillery fires on %s sectors"}},
- {-2, N_SEA, {"shells a ship owned by %s",
-/* 11*/ "fires on %s ships"}},
- {0, N_FRONT, {"takes over unoccupied land",
-/* 12*/ "attacks unowned land for some reason"}},
- {0, N_SEA, {"ships torpedoed by enemy wolf-packs",
-/* 13*/ "ships torpedoed by marauding U-boats"}},
- {0, N_ARTY, {"gunners fire on %s in self-defense",
-/* 14*/ "gunners decimate %s aggressors"}},
- {0, N_FOR, {"breaks sanctuary",
-/* 15*/ "no longer has a sanctuary"}},
- {-2, N_SKY, {"planes divebomb one of %s's sectors",
-/* 16*/ "bombers wreak havoc on %s"}},
- {-2, N_SEA, {"divebombs a ship flying the flag of %s",
-/* 17*/ "airforce bombs %s ships"}},
- {-2, N_SEA, {"seadogs board one of %s's ships",
-/* 18*/ "pirates board %s ship"}},
- {-3, N_SEA, {"is repelled by %s while attempting to board a ship",
-/* 19*/ "pirates prove inept at boarding %s's ships"}},
- {-1, N_SKY, {"anti-aircraft gunners fire on %s airforce",
-/* 20*/ "attempts to shoot down %s aircraft"}},
- {-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"}},
- {-1, N_FOR,
- {"considers an action which would violate a treaty with %s",
-/* 22*/ "decides not to violate treaty with %s (yet)"}},
- {-4, N_FOR, {"violates a treaty with %s",
-/* 23*/ "actions violate treaty with %s"}},
- {0, N_FOR, {"dissolves its government",
-/* 24*/ "throws in the towel"}},
- {0, N_SEA, {"ship hits a mine",
-/* 25*/ "ship severely damaged in mine field"}},
- {5, N_FOR, {"announces an alliance with %s",
-/* 26*/ "/ %s alliance declared"}},
- {0, N_FOR, {"declares their neutrality toward %s", /* no longer used */
-/* 27*/ "announces neutral relations with %s"}},
- {-5, N_FOR, {"declares TOTAL WAR on %s",
-/* 28*/ "gets serious with %s and declares WAR"}},
- {0, N_FOR, {"diplomats disavow former alliance with %s",
-/* 29*/ "is no longer allied with %s"}},
- {5, N_FOR, {"is no longer at war with %s",
-/* 30*/
- "Foreign Ministry declares \"No more war with %s\""}},
- {0, N_HOME, {"reports outbreak of the black plague",
-/* 31*/ "sector infected with bubonic plague"}},
- {0, N_HOME, {"citizens die from bubonic plague",
-/* 32*/ "sector reports plague deaths"}},
- {0, N_FOR, {"goes through a name change",
-/* 33*/ "adopts a new country name"}},
- {0, N_HOME, {"citizens starve in disastrous famine",
-/* 34*/ "loses citizens to mass starvation"}},
- {0, N_HOME, {"endures lawless rioting",
-/* 35*/ "suffers from outbreaks of rioting"}},
- {-3, N_SKY, {"pilots down %s planes",
-/* 36*/ "victorious in air-to-air combat against %s"}},
- {-10, N_MISS, {"nuclear device devastates %s sector",
-/* 37*/
- "explodes a nuclear device damaging %s territory"}},
- {0, N_HOME, {"terrorists shoot it out with %s special forces",
-/* 38*/ "underground rises up against %s occupation"}},
- {-2, N_HOME, {"execution squads gun down helpless %s civilians",
-/* 39*/
- "firing squads massacre defenseless %s workers"}},
- {0, N_MISS, {"launches a satellite into orbit",
-/* 40*/
- "continues its conquest of space with a successful launch"}},
- {-8, N_MISS, {"strikes a %s big bird",
-/* 41*/ "rockets damage a %s satellite"}},
- {4, N_ECON, {"makes a contribution to %s",
-/* 42*/ "helps out %s"}},
- {2, N_HOME, {"aids %s with divine intervention",
-/* 43*/ "smiles upon %s"}},
- {-3, N_HOME, {"hurts %s with divine intervention",
-/* 44*/ "frowns upon %s"}},
- {-4, N_ECON, {"sacrifices to %s",
-/* 45*/ "makes divine payment to %s"}},
- {-10, N_MISS, {"abms intercept a %s missile",
-/* 46*/
- "strategic defense systems destroy a %s missile"}},
- {-2, N_MISS, {"missile fired at one of %s's sectors",
-/* 47*/ "missile wreaks havoc on %s"}},
- {-2, N_MISS, {"missile fired at a ship flying the flag of %s",
-/* 48*/ "missiles hit %s ships"}},
- {2, N_ECON, {"engages in friendly trade with %s",
-/* 49*/ "profits from a merchant venture with %s"}},
- {0, N_ECON, {"pirates dispose of %s booty in trade",
-/* 50*/ "buccaneers sell their %s goods"}},
- {0, N_ECON, {"pirates keep their %s booty",
-/* 51*/ "buccaneers laugh and bury their %s goods"}},
- {0, N_SEA, {"ships torpedoed by %s torpedo-boats",
-/* 52*/ "ships sunk by marauding %s torpedo-boats"}},
- {0, N_SEA, {"planes bomb a skulking %s submarine",
-/* 53*/ "planes drop depth-charges on a %s sub"}},
- {-2, N_SEA, {"ship is blown up in a failed assault on %s",
-/* 54*/ "has a ship destroyed while assaulting %s"}},
- {-2, N_SKY, {"divebombs a brave %s unit",
-/* 55*/ "airforce bombs %s units"}},
- {0, N_FRONT, {"troops run afoul of a landmine",
-/* 56*/ "troops severely damaged in mine field"}},
- {-2, N_ARTY, {"fortress gunners support troops attacking %s",
-/* 57*/ "fortress artillery massacres %s defenders"}},
- {-2, N_ARTY, {"gunners support troops attacking %s",
-/* 58*/ "artillery battery massacres %s defenders"}},
- {-2, N_ARTY, {"naval gunners support troops attacking %s",
-/* 59*/ "naval gunfire massacres %s defenders"}},
- {-10, N_FOR, {"sacks %s capital",
-/* 60*/ "captures and pillages %s's capital"}},
- {3, N_FOR, {"announces friendly trade relations with %s",
-/* 61*/ "upgrades %s's trade status to triple-A"}},
- {0, N_FOR, {"downgrades relations with %s to friendly",
-/* 62*/ "cools relations with %s to friendly"}},
- {2, N_FOR, {"upgrades relations with %s to neutral",
-/* 63*/ "Foreign Ministry declares \"%s is A-OK.\""}},
- {0, N_FOR, {"downgrades relations with %s to neutral",
-/* 64*/
- "gives the cold shoulder to %s and declares neutral relations"}},
- {3, N_FOR, {"upgrades relations with %s to hostile",
-/* 65*/
- "forgives %s of past war crimes but remains hostile"}},
- {-3, N_FOR, {"downgrades relations with %s to hostile",
-/* 66*/ "is suspicious that %s has hostile intentions"}},
- {0, N_MISS, {"sector is struck by a sub-launched missile",
-/* 67*/ "sector devastated by missile"}},
- {0, N_MISS, {"ship is hit by a sub-launched missile",
-/* 68*/ "ship damaged by marine missile"}},
- {0, N_COLONY, {"pilgrims settle on a new island",
-/* 69*/ "discovers new land and starts a colony"}},
- {0, N_MISS, {"abms intercept an incoming sub-launched missile",
-/* 70*/
- "strategic defense systems destroy an incoming sub-launched warhead"}},
- {-2, N_MISS, {"missile fired at %s ground troops",
-/* 71*/ "missile hits %s troops"}},
- {0, N_MISS, {"regiment struck by sub-launched missile",
-/* 72*/ "ground troops hit by missile"}},
- {-4, N_FRONT, {"navy secures a beachhead on %s territory",
-/* 73*/ "sailors take a coastal sector from %s"}},
- {-4, N_FRONT, {"paratroopers comandeer a sector from %s",
-/* 74*/
- "air force parachutists overwhelm a %s sector"}},
- {0, N_COLONY, {"parachutists grab unoccupied land",
-/* 75*/ "paratroopers break new ground"}},
- {-4, N_FRONT, {"sailors repelled by %s coast-guard",
-/* 76*/
- "naval forces massacred in failed assault of %s"}},
- {-4, N_FRONT, {"paratroopers destroyed in failed air-assault on %s",
-/* 77*/
- "loses parachutists in failed air-assault of %s"}},
- {0, N_ECON, {"is forced into debt to %s by bad management",
-/* 78*/ "shows bad financial planning"}},
- {0, N_ECON, {"has its credit rating downgraded to unworthy status",
-/* 79*/
- "is denied credit by %s due to lack of collatoral"}},
- {0, N_ECON, {"is unable to fulfill its financial obligations to %s",
-/* 80*/ "welches on a deal with %s"}},
- {-3, N_FRONT,
- {"is repelled by %s while attempting to board a land unit",
-/* 81*/ "forces prove inept at boarding %s's land unit"}},
- {-2, N_FRONT, {"mercenaries board one of %s's land units",
-/* 82*/ "elite forces board %s land unit"}}
+struct rptstr rpt[] = {
+ /* nice page text */
+ { 0, 0, 0, { no_news, no_news } },
+ { N_WON_SECT, -4, N_FRONT, { "infantry capture %s territory",
+ "shock troops overrun one of %s's sectors" } },
+ { N_SCT_LOSE, -4, N_FRONT, { "infantry beaten back by %s troops",
+ "shock troops annihilated in failed attack on %s" } },
+ { N_SPY_SHOT, -1, N_SPY, { "spy shot by %s firing squad",
+ "spy captured and shot by %s" } },
+ { N_SENT_TEL, 1, N_TELE, { "sends a telegram to %s",
+ "telexes %s" } },
+ { 5, 0, 0, { no_news, no_news } },
+ { N_MAKE_LOAN, 2, N_ECON, { "bankers make a loan to %s",
+ "Ministry of Finance lends money to %s" } },
+ { N_REPAY_LOAN, 1, N_ECON, { "repays a loan from %s",
+ "makes last payment on loan from %s" } },
+ { N_MAKE_SALE, 0, N_ECON, { "makes a sale to %s",
+ "sells goods to %s" } },
+ { N_OVFLY_SECT, -1, N_SKY, { "violates %s airspace",
+ "overflies %s territory" } },
+ { N_SCT_SHELL, -2, N_ARTY, { "gunners bombard %s territory",
+ "artillery fires on %s sectors" } },
+ { N_SHP_SHELL, -2, N_SEA, { "shells a ship owned by %s",
+ "fires on %s ships" } },
+ { N_TOOK_UNOCC, 0, N_FRONT, { "takes over unoccupied land",
+ "attacks unowned land for some reason" } },
+ { N_TORP_SHIP, 0, N_SEA, { "ships torpedoed by enemy wolf-packs",
+ "ships torpedoed by marauding U-boats" } },
+ { N_FIRE_BACK, 0, N_ARTY, { "gunners fire on %s in self-defense",
+ "gunners decimate %s aggressors" } },
+ { N_BROKE_SANCT, 0, N_FOR, { "breaks sanctuary",
+ "no longer has a sanctuary" } },
+ { N_SCT_BOMB, -2, N_SKY, { "planes divebomb one of %s's sectors",
+ "bombers wreak havoc on %s" } },
+ { N_SHP_BOMB, -2, N_SEA, { "divebombs a ship flying the flag of %s",
+ "airforce bombs %s ships" } },
+ { N_BOARD_SHIP, -2, N_SEA, { "seadogs board one of %s's ships",
+ "pirates board %s ship" } },
+ { N_SHP_LOSE, -3, N_SEA, { "is repelled by %s while attempting to board a ship",
+ "pirates prove inept at boarding %s's ships" } },
+ { 20, 0, 0, { no_news, no_news } },
+ { N_SEIZE_SECT, -2, N_ECON, { "seizes a sector from %s to collect on a loan",
+ "collects one of %s's sectors in repayment of a loan" } },
+ { 22, 0, 0, { no_news, no_news } },
+ { 23, 0, 0, { no_news, no_news } },
+ { 24, 0, 0, { no_news, no_news } },
+ { N_HIT_MINE, 0, N_SEA, { "ship hits a mine",
+ "ship severely damaged in mine field" } },
+ { N_DECL_ALLY, 5, N_FOR, { "announces an alliance with %s",
+ "/ %s alliance declared" } },
+ { 27, 0, 0, { no_news, no_news } },
+ { N_DECL_WAR, -5, N_FOR, { "declares TOTAL WAR on %s",
+ "gets serious with %s and declares WAR" } },
+ { N_DIS_ALLY, 0, N_FOR, { "diplomats disavow former alliance with %s",
+ "is no longer allied with %s" } },
+ { N_DIS_WAR, 5, N_FOR, { "is no longer at war with %s",
+ "Foreign Ministry declares \"No more war with %s\"" } },
+ { N_OUT_PLAGUE, 0, N_HOME, { "reports outbreak of the black plague",
+ "sector infected with bubonic plague" } },
+ { N_DIE_PLAGUE, 0, N_HOME, { "citizens die from bubonic plague",
+ "sector reports plague deaths" } },
+ { N_NAME_CHNG, 0, N_FOR, { "goes through a name change",
+ "adopts a new country name" } },
+ { N_DIE_FAMINE, 0, N_HOME, { "citizens starve in disastrous famine",
+ "loses citizens to mass starvation" } },
+ { 35, 0, 0, { no_news, no_news } },
+ { N_DOWN_PLANE, -3, N_SKY, { "pilots down %s planes",
+ "victorious in air-to-air combat against %s" } },
+ { N_NUKE, -10,N_MISS, { "nuclear device devastates %s sector",
+ "explodes a nuclear device damaging %s territory" } },
+ { N_FREEDOM_FIGHT, 0, N_HOME, { "terrorists shoot it out with %s special forces",
+ "underground rises up against %s occupation" } },
+ { N_SHOOT_CIV, -2, N_HOME, { "execution squads gun down helpless %s civilians",
+ "firing squads massacre defenseless %s workers" } },
+ { N_LAUNCH, 0, N_MISS, { "launches a satellite into orbit",
+ "continues its conquest of space with a successful launch" } },
+ { N_SAT_KILL, -8, N_MISS, { "strikes a %s big bird",
+ "rockets damage a %s satellite" } },
+ { N_GIFT, 0, N_ECON, { "makes a contribution to %s",
+ "helps out %s" } },
+ { N_AIDS, 0, N_HOME, { "aids %s with divine intervention",
+ "smiles upon %s" } },
+ { N_HURTS, 0, N_HOME, { "hurts %s with divine intervention",
+ "frowns upon %s" } },
+ { N_TAKE, 0, N_ECON, { "sacrifices to %s",
+ "makes divine payment to %s" } },
+ { N_NUKE_STOP, -10,N_MISS, { "abms intercept a %s missile",
+ "strategic defense systems destroy a %s missile" } },
+ { N_SCT_MISS, -2, N_MISS, { "missile fired at one of %s's sectors",
+ "missile wreaks havoc on %s" } },
+ { N_SHP_MISS, -2, N_MISS, { "missile fired at a ship flying the flag of %s",
+ "missiles hit %s ships" } },
+ { N_TRADE, 2, N_ECON, { "engages in friendly trade with %s",
+ "profits from a merchant venture with %s" } },
+ { N_PIRATE_TRADE, 0, N_ECON, { "pirates dispose of %s booty in trade",
+ "buccaneers sell their %s goods" } },
+ { N_PIRATE_KEEP, 0, N_ECON, { "pirates keep their %s booty",
+ "buccaneers laugh and bury their %s goods" } },
+ { N_SHIP_TORP, 0, N_SEA, { "ships torpedoed by %s torpedo-boats",
+ "ships sunk by marauding %s torpedo-boats" } },
+ { N_SUB_BOMB, 0, N_SEA, { "planes bomb a skulking %s submarine",
+ "planes drop depth-charges on a %s sub" } },
+ { 54, 0, 0, { no_news, no_news } },
+ { N_UNIT_BOMB, -2, N_SKY, { "divebombs a brave %s unit",
+ "airforce bombs %s units" } },
+ { N_LHIT_MINE, 0, N_FRONT, { "troops run afoul of a landmine",
+ "troops severely damaged in mine field" } },
+ { N_FIRE_F_ATTACK, -2, N_ARTY, { "fortress gunners support troops attacking %s",
+ "fortress artillery massacres %s defenders" } },
+ { N_FIRE_L_ATTACK, -2, N_ARTY, { "gunners support troops attacking %s",
+ "artillery battery massacres %s defenders" } },
+ { N_FIRE_S_ATTACK, -2, N_ARTY, { "naval gunners support troops attacking %s",
+ "naval gunfire massacres %s defenders" } },
+ { N_SACK_CAP, 10, N_FOR, { "sacks %s capital",
+ "captures and pillages %s's capital" } },
+ { N_UP_FRIENDLY, 3, N_FOR, { "announces friendly trade relations with %s",
+ "upgrades %s's trade status to triple-A" } },
+ { N_DOWN_FRIENDLY, 0, N_FOR, { "downgrades relations with %s to friendly",
+ "cools relations with %s to friendly" } },
+ { N_UP_NEUTRAL, 2, N_FOR, { "upgrades relations with %s to neutral",
+ "Foreign Ministry declares \"%s is A-OK.\"" } },
+ { N_DOWN_NEUTRAL, 0, N_FOR, { "downgrades relations with %s to neutral",
+ "gives the cold shoulder to %s and declares neutral relations" } },
+ { N_UP_HOSTILE, 3, N_FOR, { "upgrades relations with %s to hostile",
+ "forgives %s of past war crimes but remains hostile" } },
+ { N_DOWN_HOSTILE, 3, N_FOR, { "downgrades relations with %s to hostile",
+ "is suspicious that %s has hostile intentions" } },
+ { N_SCT_SMISS, 0, N_MISS, { "sector is struck by a sub-launched missile",
+ "sector devastated by missile" } },
+ { N_SHP_SMISS, 0, N_MISS, { "ship is hit by a sub-launched missile",
+ "ship damaged by marine missile" } },
+ { N_START_COL, 0, N_COLONY,{ "pilgrims settle on a new island",
+ "discovers new land and starts a colony" } },
+ { N_NUKE_SSTOP, 0, N_MISS, { "abms intercept an incoming sub-launched missile",
+ "strategic defense systems destroy an incoming sub-launched warhead"}},
+ { N_LND_MISS, 2, N_MISS, { "missile fired at %s ground troops",
+ "missile hits %s troops" } },
+ { N_LND_SMISS, 0, N_MISS, { "regiment struck by sub-launched missile",
+ "ground troops hit by missile" } },
+ { N_AWON_SECT, -4, N_FRONT, { "navy secures a beachhead on %s territory",
+ "sailors take a coastal sector from %s" } },
+ { N_PWON_SECT, -4, N_FRONT, { "paratroopers comandeer a sector from %s",
+ "air force parachutists overwhelm a %s sector" } },
+ { N_PARA_UNOCC, 0, N_COLONY,{ "parachutists grab unoccupied land",
+ "paratroopers break new ground" } },
+ { N_ALOSE_SCT, 4, N_FRONT, { "sailors repelled by %s coast-guard",
+ "naval forces massacred in failed assault of %s" } },
+ { N_PLOSE_SCT, 4, N_FRONT, { "paratroopers destroyed in failed air-assault on %s",
+ "loses parachutists in failed air-assault of %s" } },
+ { 78, 0, 0, { no_news, no_news } },
+ { 79, 0, 0, { no_news, no_news } },
+ { N_WELCH_DEAL, 0, N_ECON, { "is unable to fulfill its financial obligations to %s",
+ "welches on a deal with %s" } },
+ { N_LND_LOSE, -3, N_FRONT, { "is repelled by %s while attempting to board a land unit",
+ "forces prove inept at boarding %s's land unit" } },
+ { N_BOARD_LAND, -2, N_FRONT, { "mercenaries board one of %s's land units",
+ "elite forces board %s land unit" } },
+ { 0, 0, 0, { NULL, NULL } }
};