I18n markup: TRANS comments and missing no-c-format.
[freeciv.git] / common / game.h
blobeeb823a4dcb6bf0bce013ba1f24f912ffea112c1
1 /**********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ***********************************************************************/
13 #ifndef FC__GAME_H
14 #define FC__GAME_H
16 #ifdef __cplusplus
17 extern "C" {
18 #endif /* __cplusplus */
20 #include <time.h> /* time_t */
22 #ifdef HAVE_SYS_TIME_H
23 #include <sys/time.h>
24 #endif
26 /* utility */
27 #include "fcthread.h"
28 #include "shared.h"
29 #include "timing.h"
31 /* common */
32 #include "connection.h" /* struct conn_list */
33 #include "fc_types.h"
34 #include "player.h"
35 #include "packets.h"
37 enum debug_globals {
38 DEBUG_FERRIES,
39 DEBUG_LAST
42 enum city_names_mode {
43 CNM_NO_RESTRICTIONS = 0,
44 CNM_PLAYER_UNIQUE,
45 CNM_GLOBAL_UNIQUE,
46 CNM_NO_STEALING
49 enum barbarians_rate {
50 BARBS_DISABLED = 0,
51 BARBS_HUTS_ONLY,
52 BARBS_NORMAL,
53 BARBS_FREQUENT,
54 BARBS_HORDES
57 enum autosave_type {
58 AS_TURN = 0,
59 AS_GAME_OVER,
60 AS_QUITIDLE,
61 AS_INTERRUPT
64 struct user_flag
66 char *name;
67 char *helptxt;
70 #define CONTAMINATION_POLLUTION 1
71 #define CONTAMINATION_FALLOUT 2
73 /* The number of turns that the first user needs to be attached to a
74 * player for that user to be ranked as that player */
75 #define TURNS_NEEDED_TO_RANK 10
77 struct civ_game {
78 struct packet_ruleset_control control;
79 struct packet_scenario_info scenario;
80 struct packet_game_info info;
82 struct government *government_during_revolution;
84 struct conn_list *all_connections; /* including not yet established */
85 struct conn_list *est_connections; /* all established client conns */
87 struct veteran_system *veteran; /* veteran system */
89 struct rgbcolor *plr_bg_color;
91 struct {
92 /* Items given to all players at game start.
93 * Client gets this info for help purposes only. */
94 int global_init_techs[MAX_NUM_TECH_LIST];
95 int global_init_buildings[MAX_NUM_BUILDING_LIST];
96 } rgame;
98 union {
99 /* Add client side when needed */
101 struct {
102 /* Only used in the server (./ai/ and ./server/). */
104 /* Defined in the ruleset. */
106 /* Game settings & other data. */
108 bool allied_victory;
109 enum city_names_mode allowed_city_names;
110 enum plrcolor_mode plrcolormode;
111 int aqueductloss;
112 bool auto_ai_toggle;
113 bool autoattack;
114 int autoupgrade_veteran_loss;
115 enum barbarians_rate barbarianrate;
116 int base_incite_cost;
117 int civilwarsize;
118 int conquercost;
119 int contactturns;
120 int diplchance;
121 int diplcost;
122 int dispersion;
123 int end_turn;
124 bool endspaceship;
125 bool fixedlength;
126 bool foggedborders;
127 int freecost;
128 int incite_improvement_factor;
129 int incite_total_factor;
130 int incite_unit_factor;
131 int init_vis_radius_sq;
132 int kick_time;
133 int killunhomed; /* slowly killing unhomed units */
134 int maxconnectionsperhost;
135 int max_players;
136 char nationset[MAX_LEN_NAME];
137 int mgr_distance;
138 bool mgr_foodneeded;
139 int mgr_nationchance;
140 int mgr_turninterval;
141 int mgr_worldchance;
142 bool migration;
143 int min_players;
144 bool natural_city_names;
145 int netwait;
146 int nuke_contamination;
147 int num_phases;
148 int occupychance;
149 int onsetbarbarian;
150 int pingtime;
151 int pingtimeout;
152 int ransom_gold;
153 int razechance;
154 unsigned revealmap;
155 int revolution_length;
156 int save_compress_level;
157 enum fz_method save_compress_type;
158 int save_nturns;
159 unsigned autosaves; /* FIXME: char would be enough, but current settings.c code wants to
160 write sizeof(unsigned) bytes */
161 bool savepalace;
162 bool homecaughtunits;
163 char start_units[MAX_LEN_STARTUNIT];
164 bool start_city;
165 int start_year;
166 int techloss_forgiveness;
167 int techloss_restore;
168 int techlost_donor;
169 int techlost_recv;
170 int tcptimeout;
171 int techpenalty;
172 bool turnblock;
173 int unitwaittime; /* minimal time between two movements of a unit */
174 int upgrade_veteran_loss;
175 bool vision_reveal_tiles;
177 bool debug[DEBUG_LAST];
178 int timeoutint; /* increase timeout every N turns... */
179 int timeoutinc; /* ... by this amount ... */
180 int timeoutincmult; /* ... and multiply timeoutinc by this amount ... */
181 int timeoutintinc; /* ... and increase timeoutint by this amount */
182 int timeoutcounter; /* timeoutcounter - timeoutint = turns to next inc. */
183 int timeoutaddenemymove; /* minimum timeout after an enemy move is seen */
185 time_t last_ping;
186 struct timer *phase_timer; /* Time since seconds_to_phase_done was set. */
187 /* The game.info.phase_mode value indicates the phase mode currently in
188 * use. The "stored" value is a value the player can change; it won't
189 * take effect until the next turn. */
190 int phase_mode_stored;
191 char connectmsg[MAX_LEN_MSG];
192 char save_name[MAX_LEN_NAME];
193 bool scorelog;
194 char scorefile[MAX_LEN_NAME];
195 int scoreturn; /* next make_history_report() */
196 int seed;
198 bool global_warming;
199 bool nuclear_winter;
201 bool fogofwar_old; /* as the fog_of_war bit get changed by setting
202 * the server we need to remember the old setting */
203 char rulesetdir[MAX_LEN_NAME];
204 char demography[MAX_LEN_DEMOGRAPHY];
205 char allow_take[MAX_LEN_ALLOW_TAKE];
207 bool settings_gamestart_valid; /* Valid settings from the game start. */
209 struct rgbcolor_list *plr_colors;
211 struct {
212 int turns;
213 int max_size;
214 bool chat;
215 bool info;
216 } event_cache;
218 /* used by the map editor to control game_save. */
219 struct {
220 bool save_random;
222 bool save_known; /* loading will just reveal the squares around
223 * cities and units */
224 bool save_starts; /* start positions will be auto generated */
225 bool save_private_map; /* FoW map; will be created if not saved */
226 } save_options;
228 struct {
229 bool user_message_set;
230 char user_message[256];
231 } meta_info;
233 struct {
234 fc_mutex city_list;
235 } mutexes;
237 int first_timeout;
238 } server;
241 struct {
242 /* Function to be called in game_remove_unit when a unit is deleted. */
243 void (*unit_deallocate)(int unit_id);
244 } callbacks;
247 bool is_server(void);
248 void i_am_server(void);
249 void i_am_client(void);
251 void game_init(void);
252 void game_map_init(void);
253 void game_free(void);
254 void game_reset(void);
256 void game_ruleset_init(void);
257 void game_ruleset_free(void);
259 int game_next_year(int);
260 void game_advance_year(void);
262 int civ_population(const struct player *pplayer);
263 struct city *game_city_by_name(const char *name);
264 struct city *game_city_by_number(int id);
266 struct unit *game_unit_by_number(int id);
268 void game_remove_unit(struct unit *punit);
269 void game_remove_city(struct city *pcity);
270 void initialize_globals(void);
272 bool is_player_phase(const struct player *pplayer, int phase);
274 const char *population_to_text(int thousand_citizen);
276 const char *textyear(int year);
278 int generate_save_name(const char *format, char *buf, int buflen,
279 const char *reason);
281 void user_flag_init(struct user_flag *flag);
282 void user_flag_free(struct user_flag *flag);
284 extern struct civ_game game;
286 #define GAME_DEFAULT_SEED 0
287 #define GAME_MIN_SEED 0
288 #define GAME_MAX_SEED (MAX_UINT32 >> 1)
290 #define GAME_DEFAULT_GOLD 50
291 #define GAME_MIN_GOLD 0
292 #define GAME_MAX_GOLD 50000
294 #define GAME_DEFAULT_START_UNITS "ccwwx"
295 #define GAME_DEFAULT_START_CITY FALSE
297 #define GAME_DEFAULT_DISPERSION 0
298 #define GAME_MIN_DISPERSION 0
299 #define GAME_MAX_DISPERSION 10
301 #define GAME_DEFAULT_TECHLEVEL 0
302 #define GAME_MIN_TECHLEVEL 0
303 #define GAME_MAX_TECHLEVEL 100
305 #define GAME_DEFAULT_ANGRYCITIZEN TRUE
307 #define GAME_DEFAULT_END_TURN 5000
308 #define GAME_MIN_END_TURN 0
309 #define GAME_MAX_END_TURN 32767
311 #define GAME_DEFAULT_MIN_PLAYERS 1
312 #define GAME_MIN_MIN_PLAYERS 0
313 #define GAME_MAX_MIN_PLAYERS MAX_NUM_PLAYERS
315 #define GAME_DEFAULT_MAX_PLAYERS MAX_NUM_PLAYERS
316 #define GAME_MIN_MAX_PLAYERS 1
317 #define GAME_MAX_MAX_PLAYERS MAX_NUM_PLAYERS
319 #define GAME_DEFAULT_AIFILL 5
320 #define GAME_MIN_AIFILL 0
321 #define GAME_MAX_AIFILL GAME_MAX_MAX_PLAYERS
323 #define GAME_DEFAULT_NATIONSET ""
325 #define GAME_DEFAULT_FOODBOX 100
326 #define GAME_MIN_FOODBOX 1
327 #define GAME_MAX_FOODBOX 10000
329 #define GAME_DEFAULT_SHIELDBOX 100
330 #define GAME_MIN_SHIELDBOX 1
331 #define GAME_MAX_SHIELDBOX 10000
333 #define GAME_DEFAULT_SCIENCEBOX 100
334 #define GAME_MIN_SCIENCEBOX 1
335 #define GAME_MAX_SCIENCEBOX 10000
337 #define GAME_DEFAULT_DIPLCOST 0
338 #define GAME_MIN_DIPLCOST 0
339 #define GAME_MAX_DIPLCOST 100
341 #define GAME_DEFAULT_FOGOFWAR TRUE
343 #define GAME_DEFAULT_FOGGEDBORDERS FALSE
345 #define GAME_DEFAULT_GLOBAL_WARMING TRUE
346 #define GAME_DEFAULT_NUCLEAR_WINTER TRUE
348 #define GAME_DEFAULT_BORDERS BORDERS_ENABLED
350 #define GAME_DEFAULT_HAPPYBORDERS TRUE
352 #define GAME_DEFAULT_DIPLOMACY DIPLO_FOR_ALL
354 #define GAME_DEFAULT_DIPLCHANCE 80
355 #define GAME_MIN_DIPLCHANCE 40
356 #define GAME_MAX_DIPLCHANCE 100
358 #define GAME_DEFAULT_FREECOST 0
359 #define GAME_MIN_FREECOST 0
360 #define GAME_MAX_FREECOST 100
362 #define GAME_DEFAULT_CONQUERCOST 0
363 #define GAME_MIN_CONQUERCOST 0
364 #define GAME_MAX_CONQUERCOST 100
366 #define GAME_DEFAULT_TECHLOSSFG -1
367 #define GAME_MIN_TECHLOSSFG -1
368 #define GAME_MAX_TECHLOSSFG 200
370 #define GAME_DEFAULT_TECHLOSSREST 50
371 #define GAME_MIN_TECHLOSSREST -1
372 #define GAME_MAX_TECHLOSSREST 100
374 #define GAME_DEFAULT_CITYMINDIST 2
375 #define GAME_MIN_CITYMINDIST 1
376 #define GAME_MAX_CITYMINDIST 9
378 #define GAME_DEFAULT_CIVILWARSIZE 10
379 #define GAME_MIN_CIVILWARSIZE 2 /* can't split an empire of 1 city */
380 #define GAME_MAX_CIVILWARSIZE 1000
382 #define GAME_DEFAULT_RESTRICTINFRA FALSE
383 #define GAME_DEFAULT_UNRPROTECTS TRUE
385 #define GAME_DEFAULT_CONTACTTURNS 20
386 #define GAME_MIN_CONTACTTURNS 0
387 #define GAME_MAX_CONTACTTURNS 100
389 #define GAME_DEFAULT_CELEBRATESIZE 3
391 #define GAME_DEFAULT_RAPTUREDELAY 1
392 #define GAME_MIN_RAPTUREDELAY 1
393 #define GAME_MAX_RAPTUREDELAY 99 /* 99 practicaly disables rapturing */
395 #define GAME_DEFAULT_DISASTERS 10
396 #define GAME_MIN_DISASTERS 0
397 #define GAME_MAX_DISASTERS 1000
399 #define GAME_DEFAULT_SAVEPALACE TRUE
401 #define GAME_DEFAULT_HOMECAUGHTUNITS TRUE
403 #define GAME_DEFAULT_NATURALCITYNAMES TRUE
405 #define GAME_DEFAULT_MIGRATION FALSE
407 #define GAME_DEFAULT_MGR_TURNINTERVAL 5
408 #define GAME_MIN_MGR_TURNINTERVAL 1
409 #define GAME_MAX_MGR_TURNINTERVAL 100
411 #define GAME_DEFAULT_MGR_FOODNEEDED TRUE
413 /* definition of the migration distance in relation to the current city
414 * radius; 0 means that migration is possible if the second city is within
415 * the city radius */
416 #define GAME_DEFAULT_MGR_DISTANCE 0
417 #define GAME_MIN_MGR_DISTANCE (0 - CITY_MAP_MAX_RADIUS)
418 #define GAME_MAX_MGR_DISTANCE (1 + CITY_MAP_MAX_RADIUS)
420 #define GAME_DEFAULT_MGR_NATIONCHANCE 50
421 #define GAME_MIN_MGR_NATIONCHANCE 0
422 #define GAME_MAX_MGR_NATIONCHANCE 100
424 #define GAME_DEFAULT_MGR_WORLDCHANCE 10
425 #define GAME_MIN_MGR_WORLDCHANCE 0
426 #define GAME_MAX_MGR_WORLDCHANCE 100
428 #define GAME_DEFAULT_AQUEDUCTLOSS 0
429 #define GAME_MIN_AQUEDUCTLOSS 0
430 #define GAME_MAX_AQUEDUCTLOSS 100
432 #define GAME_DEFAULT_KILLSTACK TRUE
433 #define GAME_DEFAULT_KILLCITIZEN TRUE
435 #define GAME_DEFAULT_KILLUNHOMED 0
436 #define GAME_MIN_KILLUNHOMED 0
437 #define GAME_MAX_KILLUNHOMED 100
439 #define GAME_DEFAULT_TECHPENALTY 100
440 #define GAME_MIN_TECHPENALTY 0
441 #define GAME_MAX_TECHPENALTY 100
443 #define GAME_DEFAULT_TECHLOST_RECV 0
444 #define GAME_MIN_TECHLOST_RECV 0
445 #define GAME_MAX_TECHLOST_RECV 100
447 #define GAME_DEFAULT_TECHLOST_DONOR 0
448 #define GAME_MIN_TECHLOST_DONOR 0
449 #define GAME_MAX_TECHLOST_DONOR 100
451 #define GAME_DEFAULT_TEAM_POOLED_RESEARCH TRUE
453 #define GAME_DEFAULT_RAZECHANCE 20
454 #define GAME_MIN_RAZECHANCE 0
455 #define GAME_MAX_RAZECHANCE 100
457 #define GAME_DEFAULT_REVEALMAP REVEAL_MAP_NONE
459 #define GAME_DEFAULT_SCORELOG FALSE
460 #define GAME_DEFAULT_SCOREFILE "freeciv-score.log"
461 #define GAME_DEFAULT_SCORETURN 20
463 #define GAME_DEFAULT_SPACERACE TRUE
464 #define GAME_DEFAULT_END_SPACESHIP TRUE
466 #define GAME_DEFAULT_TURNBLOCK TRUE
468 #define GAME_DEFAULT_AUTO_AI_TOGGLE FALSE
470 #define GAME_DEFAULT_TIMEOUT 0
471 #define GAME_DEFAULT_FIRST_TIMEOUT -1
472 #define GAME_DEFAULT_TIMEOUTINT 0
473 #define GAME_DEFAULT_TIMEOUTINTINC 0
474 #define GAME_DEFAULT_TIMEOUTINC 0
475 #define GAME_DEFAULT_TIMEOUTINCMULT 1
476 #define GAME_DEFAULT_TIMEOUTADDEMOVE 0
477 #define GAME_DEFAULT_TIMEOUTCOUNTER 1
479 #define GAME_DEFAULT_MAXCONNECTIONSPERHOST 4
480 #define GAME_MIN_MAXCONNECTIONSPERHOST 0
481 #define GAME_MAX_MAXCONNECTIONSPERHOST MAX_NUM_CONNECTIONS
483 #define GAME_MIN_TIMEOUT -1
484 #define GAME_MAX_TIMEOUT 8639999
485 #define GAME_MIN_FIRST_TIMEOUT -1
486 #define GAME_MAX_FIRST_TIMEOUT GAME_MAX_TIMEOUT
488 #define GAME_MIN_UNITWAITTIME 0
489 #define GAME_MAX_UNITWAITTIME GAME_MAX_TIMEOUT
490 #define GAME_DEFAULT_UNITWAITTIME 0
492 #define GAME_DEFAULT_PHASE_MODE 0
494 #define GAME_DEFAULT_TCPTIMEOUT 10
495 #define GAME_MIN_TCPTIMEOUT 0
496 #define GAME_MAX_TCPTIMEOUT 120
498 #define GAME_DEFAULT_NETWAIT 4
499 #define GAME_MIN_NETWAIT 0
500 #define GAME_MAX_NETWAIT 20
502 #define GAME_DEFAULT_PINGTIME 20
503 #define GAME_MIN_PINGTIME 1
504 #define GAME_MAX_PINGTIME 1800
506 #define GAME_DEFAULT_PINGTIMEOUT 60
507 #define GAME_MIN_PINGTIMEOUT 60
508 #define GAME_MAX_PINGTIMEOUT 1800
510 #define GAME_DEFAULT_NOTRADESIZE 0
511 #define GAME_MIN_NOTRADESIZE 0
512 #define GAME_MAX_NOTRADESIZE 49
514 #define GAME_DEFAULT_FULLTRADESIZE 1
515 #define GAME_MIN_FULLTRADESIZE 1
516 #define GAME_MAX_FULLTRADESIZE 50
518 #define GAME_DEFAULT_TRADING_TECH TRUE
519 #define GAME_DEFAULT_TRADING_GOLD TRUE
520 #define GAME_DEFAULT_TRADING_CITY TRUE
522 #define GAME_DEFAULT_TRADEMINDIST 9
523 #define GAME_MIN_TRADEMINDIST 1
524 #define GAME_MAX_TRADEMINDIST 999
526 #define GAME_DEFAULT_BARBARIANRATE BARBS_NORMAL
528 #define GAME_DEFAULT_ONSETBARBARIAN 60
529 #define GAME_MIN_ONSETBARBARIAN 0
530 #define GAME_MAX_ONSETBARBARIAN GAME_MAX_END_TURN
532 #define GAME_DEFAULT_OCCUPYCHANCE 0
533 #define GAME_MIN_OCCUPYCHANCE 0
534 #define GAME_MAX_OCCUPYCHANCE 100
536 #define GAME_DEFAULT_AUTOATTACK FALSE
538 #ifdef FREECIV_WEB
539 #define GAME_DEFAULT_RULESETDIR "fcweb"
540 #else /* FREECIV_WEB */
541 #define GAME_DEFAULT_RULESETDIR "classic"
542 #endif /* FREECIV_WEB */
544 #define GAME_DEFAULT_SAVE_NAME "freeciv"
545 #define GAME_DEFAULT_SAVETURNS 1
546 #define GAME_MIN_SAVETURNS 1
547 #define GAME_MAX_SAVETURNS 200
549 #define GAME_DEFAULT_AUTOSAVES (1 << AS_TURN | 1 << AS_GAME_OVER | 1 << AS_QUITIDLE | 1 << AS_INTERRUPT)
551 #define GAME_DEFAULT_SKILL_LEVEL 3 /* easy */
552 #define GAME_OLD_DEFAULT_SKILL_LEVEL 5 /* normal; for old save games */
554 #define GAME_DEFAULT_DEMOGRAPHY "NASRLPEMOqrb"
555 #define GAME_DEFAULT_ALLOW_TAKE "HAhadOo"
557 #define GAME_DEFAULT_EVENT_CACHE_TURNS 1
558 #define GAME_MIN_EVENT_CACHE_TURNS 0
559 #define GAME_MAX_EVENT_CACHE_TURNS (GAME_MAX_END_TURN + 1)
561 #define GAME_DEFAULT_EVENT_CACHE_MAX_SIZE 256
562 #define GAME_MIN_EVENT_CACHE_MAX_SIZE 10
563 #define GAME_MAX_EVENT_CACHE_MAX_SIZE 20000
565 #define GAME_DEFAULT_EVENT_CACHE_CHAT TRUE
567 #define GAME_DEFAULT_EVENT_CACHE_INFO FALSE
569 #define GAME_DEFAULT_COMPRESS_LEVEL 6 /* if we have compression */
570 #define GAME_MIN_COMPRESS_LEVEL 1
571 #define GAME_MAX_COMPRESS_LEVEL 9
573 #if defined(HAVE_LIBBZ2)
574 # define GAME_DEFAULT_COMPRESS_TYPE FZ_BZIP2
575 #elif defined(HAVE_LIBZ)
576 # define GAME_DEFAULT_COMPRESS_TYPE FZ_ZLIB
577 #elif defined(HAVE_LIBLZMA)
578 # define GAME_DEFAULT_COMPRESS_TYPE FZ_XZ
579 #else
580 # define GAME_DEFAULT_COMPRESS_TYPE FZ_PLAIN
581 #endif
583 #define GAME_DEFAULT_ALLOWED_CITY_NAMES CNM_PLAYER_UNIQUE
585 #define GAME_DEFAULT_PLRCOLORMODE PLRCOL_PLR_ORDER
587 #define GAME_DEFAULT_REVOLUTION_LENGTH 0
588 #define GAME_MIN_REVOLUTION_LENGTH 0
589 #define GAME_MAX_REVOLUTION_LENGTH 10
591 #define GAME_START_YEAR -4000
593 #define GAME_DEFAULT_AIRLIFTINGSTYLE AIRLIFTING_CLASSICAL
595 #define GAME_MAX_READ_RECURSION 10 /* max recursion for the read command */
597 #define GAME_DEFAULT_ALLIED_VICTORY TRUE
599 #define GAME_DEFAULT_KICK_TIME 1800 /* 1800 seconds = 30 minutes. */
600 #define GAME_MIN_KICK_TIME 0 /* 0 = disabling. */
601 #define GAME_MAX_KICK_TIME 86400 /* 86400 seconds = 24 hours. */
603 /* Max distance from the capital used to calculat the bribe cost. */
604 #define GAME_UNIT_BRIBE_DIST_MAX 32
606 /* Max number of recursive transports. */
607 #define GAME_TRANSPORT_MAX_RECURSIVE 5
609 /* ruleset settings */
611 #define RS_MAX_VALUE 10000
613 /* TRANS: year label (Anno Domini) */
614 #define RS_DEFAULT_POS_YEAR_LABEL N_("AD")
615 /* TRANS: year label (Before Christ) */
616 #define RS_DEFAULT_NEG_YEAR_LABEL N_("BC")
618 #define RS_DEFAULT_ILLNESS_ON FALSE
620 #define RS_DEFAULT_ILLNESS_BASE_FACTOR 25
621 #define RS_MIN_ILLNESS_BASE_FACTOR 0
622 #define RS_MAX_ILLNESS_BASE_FACTOR RS_MAX_VALUE
624 #define RS_DEFAULT_ILLNESS_MIN_SIZE 3
625 #define RS_MIN_ILLNESS_MIN_SIZE 1
626 #define RS_MAX_ILLNESS_MIN_SIZE 100
628 #define RS_DEFAULT_ILLNESS_TRADE_INFECTION_PCT 50
629 #define RS_MIN_ILLNESS_TRADE_INFECTION_PCT 0
630 #define RS_MAX_ILLNESS_TRADE_INFECTION_PCT 500
632 #define RS_DEFAULT_ILLNESS_POLLUTION_PCT 50
633 #define RS_MIN_ILLNESS_POLLUTION_PCT 0
634 #define RS_MAX_ILLNESS_POLLUTION_PCT 500
636 #define RS_DEFAULT_CALENDAR_SKIP_0 TRUE
638 #define RS_DEFAULT_BORDER_RADIUS_SQ_CITY 17 /* city radius 4 */
639 #define RS_MIN_BORDER_RADIUS_SQ_CITY 0
640 #define RS_MAX_BORDER_RADIUS_SQ_CITY 401 /* city radius 20 */
642 #define RS_DEFAULT_BORDER_SIZE_EFFECT 1
643 #define RS_MIN_BORDER_SIZE_EFFECT 0
644 #define RS_MAX_BORDER_SIZE_EFFECT 100
646 #define RS_DEFAULT_INCITE_BASE_COST 1000
647 #define RS_MIN_INCITE_BASE_COST 0
648 #define RS_MAX_INCITE_BASE_COST RS_MAX_VALUE
650 #define RS_DEFAULT_INCITE_IMPROVEMENT_FCT 1
651 #define RS_MIN_INCITE_IMPROVEMENT_FCT 0
652 #define RS_MAX_INCITE_IMPROVEMENT_FCT RS_MAX_VALUE
654 #define RS_DEFAULT_INCITE_UNIT_FCT 2
655 #define RS_MIN_INCITE_UNIT_FCT 0
656 #define RS_MAX_INCITE_UNIT_FCT RS_MAX_VALUE
658 #define RS_DEFAULT_INCITE_TOTAL_FCT 100
659 #define RS_MIN_INCITE_TOTAL_FCT 0
660 #define RS_MAX_INCITE_TOTAL_FCT RS_MAX_VALUE
662 #define RS_DEFAULT_GRANARY_FOOD_INI 20
664 #define RS_DEFAULT_GRANARY_FOOD_INC 10
665 #define RS_MIN_GRANARY_FOOD_INC 0
666 #define RS_MAX_GRANARY_FOOD_INC RS_MAX_VALUE
668 #define RS_DEFAULT_CITY_CENTER_OUTPUT 0
669 #define RS_MIN_CITY_CENTER_OUTPUT 0
670 #define RS_MAX_CITY_CENTER_OUTPUT RS_MAX_VALUE
672 #define RS_DEFAULT_CITIES_MIN_DIST 2
673 #define RS_MIN_CITIES_MIN_DIST 1
674 #define RS_MAX_CITIES_MIN_DIST RS_MAX_VALUE
676 /* the constants CITY_MAP_*_RADIUS are defined in city.c */
677 #define RS_DEFAULT_CITY_RADIUS_SQ CITY_MAP_DEFAULT_RADIUS_SQ
678 #define RS_MIN_CITY_RADIUS_SQ CITY_MAP_MIN_RADIUS_SQ
679 #define RS_MAX_CITY_RADIUS_SQ CITY_MAP_MAX_RADIUS_SQ
681 #define RS_DEFAULT_VIS_RADIUS_SQ 5 /* city radius 2 */
682 #define RS_MIN_VIS_RADIUS_SQ 0
683 #define RS_MAX_VIS_RADIUS_SQ 401 /* city radius 20 */
685 #define RS_DEFAULT_BASE_POLLUTION -20
686 /* no min / max values as it can be set to high negative values to
687 * deactiveate pollution and high positive values to create much
688 * pollution */
690 #define RS_DEFAULT_HAPPY_COST 2
691 #define RS_MIN_HAPPY_COST 0
692 #define RS_MAX_HAPPY_COST 100
694 #define RS_DEFAULT_FOOD_COST 2
695 #define RS_MIN_FOOD_COST 0
696 #define RS_MAX_FOOD_COST 100
698 #define RS_DEFAULT_GOLD_UPKEEP_STYLE 0
699 #define RS_MIN_GOLD_UPKEEP_STYLE 0
700 #define RS_MAX_GOLD_UPKEEP_STYLE 2
702 #define RS_DEFAULT_SLOW_INVASIONS TRUE
704 #define RS_DEFAULT_TIRED_ATTACK FALSE
706 #define RS_DEFAULT_BASE_BRIBE_COST 750
707 #define RS_MIN_BASE_BRIBE_COST 0
708 #define RS_MAX_BASE_BRIBE_COST RS_MAX_VALUE
710 #define RS_DEFAULT_RANSOM_GOLD 100
711 #define RS_MIN_RANSOM_GOLD 0
712 #define RS_MAX_RANSOM_GOLD RS_MAX_VALUE
714 #define RS_DEFAULT_PILLAGE_SELECT TRUE
716 #define RS_DEFAULT_UPGRADE_VETERAN_LOSS 0
717 #define RS_MIN_UPGRADE_VETERAN_LOSS 0
718 #define RS_MAX_UPGRADE_VETERAN_LOSS MAX_VET_LEVELS
720 #define RS_DEFAULT_TECH_UPKEEP_DIVIDER 100
721 #define RS_MIN_TECH_UPKEEP_DIVIDER 1
722 #define RS_MAX_TECH_UPKEEP_DIVIDER 100000
724 #define RS_DEFAULT_BASE_TECH_COST 20
725 #define RS_MIN_BASE_TECH_COST 0
726 #define RS_MAX_BASE_TECH_COST 200
728 #define RS_DEFAULT_TECH_COST_STYLE 0
729 #define RS_MIN_TECH_COST_STYLE 0
730 #define RS_MAX_TECH_COST_STYLE 4
732 #define RS_DEFAULT_TECH_LEAKAGE 0
733 #define RS_MIN_TECH_LEAKAGE 0
734 #define RS_MAX_TECH_LEAKAGE 3
736 #ifdef __cplusplus
738 #endif /* __cplusplus */
740 #endif /* FC__GAME_H */