]> git.pond.sub.org Git - empserver/blob - include/news.h
Indented with src/scripts/indent-emp.
[empserver] / include / news.h
1 /*
2  *  Empire - A multi-player, client/server Internet based war game.
3  *  Copyright (C) 1986-2000, 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.h: Definitions for Empire News
29  * 
30  *  Known contributors to this file:
31  *     Dave Pare
32  *     Thomas Rushack
33  *     Steve McClure
34  */
35
36 /*
37  *      News codes for new options are not #ifdefed, since defining maxverb
38  *      would be a pain, and it doesn't hurt to leave them in --ts
39  */
40
41 #ifndef _NEWS_H_
42 #define _NEWS_H_
43
44 struct nwsstr {
45     short ef_type;
46     natid nws_ano;              /* "actor" country # */
47     short nws_uid;
48     s_char nws_vrb;             /* action (verb) */
49     natid nws_vno;              /* "victim" country # */
50     s_char nws_ntm;             /* number of times */
51     time_t nws_when;            /* time of action */
52 };
53
54 #define NUM_RPTS        2       /* number of story alternates */
55
56 struct rptstr {
57     int r_good_will;            /* how "nice" the action is */
58     int r_newspage;             /* which page this item belongs on */
59     s_char *r_newstory[NUM_RPTS];       /* texts for fmt( */
60 };
61
62         /* news verbs */
63 #define N_WON_SECT      1
64 #define N_SCT_LOSE      2
65 #define N_SPY_SHOT      3
66 #define N_SENT_TEL      4
67 #define N_SIGN_TRE      5
68 #define N_MAKE_LOAN     6
69 #define N_REPAY_LOAN    7
70 #define N_MAKE_SALE     8
71 #define N_OVFLY_SECT    9
72 #define N_SCT_SHELL     10
73 #define N_SHP_SHELL     11
74 #define N_TOOK_UNOCC    12
75 #define N_TORP_SHIP     13
76 #define N_FIRE_BACK     14
77 #define N_BROKE_SANCT   15
78 #define N_SCT_BOMB      16
79 #define N_SHP_BOMB      17
80 #define N_BOARD_SHIP    18
81 #define N_SHP_LOSE      19
82 #define N_FLAK          20
83 #define N_SEIZE_SECT    21
84 #define N_HONOR_TRE     22
85 #define N_VIOL_TRE      23
86 #define N_DISS_GOV      24
87 #define N_HIT_MINE      25
88 #define N_DECL_ALLY     26
89 #define N_DECL_NEUT     27
90 #define N_DECL_WAR      28
91 #define N_DIS_ALLY      29
92 #define N_DIS_WAR       30
93 #define N_OUT_PLAGUE    31
94 #define N_DIE_PLAGUE    32
95 #define N_NAME_CHNG     33
96 #define N_DIE_FAMINE    34
97 #define N_RIOT          35
98 #define N_DOWN_PLANE    36
99 #define N_NUKE          37
100 #define N_FREEDOM_FIGHT 38
101 #define N_SHOOT_CIV     39
102 #define N_LAUNCH        40
103 #define N_SAT_KILL      41
104 #define N_GIFT          42
105 #define N_AIDS          43
106 #define N_HURTS         44
107 #define N_TAKE          45
108 #define N_NUKE_STOP     46
109 #define N_SCT_MISS      47
110 #define N_SHP_MISS      48
111 #define N_TRADE         49
112 #define N_PIRATE_TRADE  50
113 #define N_PIRATE_KEEP   51
114 #define N_SHIP_TORP     52
115 #define N_SUB_BOMB      53
116 #define N_ASSAULT_LOSE  54
117 #define N_UNIT_BOMB     55
118 #define N_LHIT_MINE     56
119 #define N_FIRE_F_ATTACK 57
120 #define N_FIRE_L_ATTACK 58
121 #define N_FIRE_S_ATTACK 59
122 #define N_SACK_CAP      60
123 #define N_UP_FRIENDLY   61
124 #define N_DOWN_FRIENDLY 62
125 #define N_UP_NEUTRAL    63
126 #define N_DOWN_NEUTRAL  64
127 #define N_UP_HOSTILE    65
128 #define N_DOWN_HOSTILE  66
129 #define N_SCT_SMISS     67
130 #define N_SHP_SMISS     68
131 #define N_START_COL     69
132 #define N_NUKE_SSTOP    70
133 #define N_LND_MISS      71
134 #define N_LND_SMISS     72
135 #define N_AWON_SECT     73
136 #define N_PWON_SECT     74
137 #define N_PARA_UNOCC    75
138 #define N_ALOSE_SCT     76
139 #define N_PLOSE_SCT     77
140 #define N_FIN_TROUBLE   78
141 #define N_CREDIT_JUNK   79
142 #define N_WELCH_DEAL    80
143 #define N_LND_LOSE      81
144 #define N_BOARD_LAND    82
145 #define N_MAX_VERB      82
146
147 #define N_FOR            1
148 #define N_FRONT          2
149 #define N_SEA            3
150 #define N_SKY            4
151 #define N_MISS           5
152 #define N_ARTY           6
153 #define N_ECON           7
154 #define N_COLONY         8
155 #define N_HOME           9
156 #define N_SPY           10
157 #define N_TELE          11
158 #define N_MAX_PAGE      11
159
160 #define NEWS_PERIOD     days(10)
161
162 #define getnews(n, p) \
163         ef_read(EF_NEWS, n, (caddr_t)p)
164 #define putnews(n, p) \
165         ef_write(EF_NEWS, n, (caddr_t)p)
166 #define getnewsp(n) \
167         (struct nwsstr *) ef_ptr(EF_NEWS, n)
168
169 extern struct rptstr rpt[];
170
171 extern int nws_maxno;
172
173 #endif /* _NEWS_H_ */