19 #define SPECENUM_NAME clause_type
20 #define SPECENUM_VALUE0 CLAUSE_ADVANCE
21 #define SPECENUM_VALUE0NAME "Advance"
22 #define SPECENUM_VALUE1 CLAUSE_GOLD
23 #define SPECENUM_VALUE1NAME "Gold"
24 #define SPECENUM_VALUE2 CLAUSE_MAP
25 #define SPECENUM_VALUE2NAME "Map"
26 #define SPECENUM_VALUE3 CLAUSE_SEAMAP
27 #define SPECENUM_VALUE3NAME "Seamap"
28 #define SPECENUM_VALUE4 CLAUSE_CITY
29 #define SPECENUM_VALUE4NAME "City"
30 #define SPECENUM_VALUE5 CLAUSE_CEASEFIRE
31 #define SPECENUM_VALUE5NAME "Ceasefire"
32 #define SPECENUM_VALUE6 CLAUSE_PEACE
33 #define SPECENUM_VALUE6NAME "Peace"
34 #define SPECENUM_VALUE7 CLAUSE_ALLIANCE
35 #define SPECENUM_VALUE7NAME "Alliance"
36 #define SPECENUM_VALUE8 CLAUSE_VISION
37 #define SPECENUM_VALUE8NAME "Vision"
38 #define SPECENUM_VALUE9 CLAUSE_EMBASSY
39 #define SPECENUM_VALUE9NAME "Embassy"
40 #define SPECENUM_COUNT CLAUSE_COUNT
41 #include "specenum_gen.h"
43 #define is_pact_clause(x) \
44 ((x == CLAUSE_CEASEFIRE) || (x == CLAUSE_PEACE) || (x == CLAUSE_ALLIANCE))
47 enum clause_type
type;
55 #define SPECLIST_TAG clause
56 #define SPECLIST_TYPE struct Clause
59 #define clause_list_iterate(clauselist, pclause) \
60 TYPED_LIST_ITERATE(struct Clause, clauselist, pclause)
61 #define clause_list_iterate_end LIST_ITERATE_END
64 enum clause_type
type;
76 const struct player *aplayer);
78 const struct player *aplayer);
80 const struct player *aplayer);
85 enum clause_type type,
int val);
87 enum clause_type type,
int val);
bool add_clause(struct Treaty *ptreaty, struct player *pfrom, enum clause_type type, int val)
Add clause to treaty.
struct clause_info * clause_info_get(enum clause_type type)
Free memory associated with clause infos.
bool clause_enabled(enum clause_type type, struct player *from, struct player *to)
Is clause enabled in this game? Currently this does not consider clause requirements that may change ...
void clear_treaty(struct Treaty *ptreaty)
Free the clauses of a treaty.
void init_treaty(struct Treaty *ptreaty, struct player *plr0, struct player *plr1)
Initialize treaty structure between two players.
void clause_infos_free()
Free memory associated with clause infos.
void clause_infos_init()
Initialize clause info structures.
bool remove_clause(struct Treaty *ptreaty, struct player *pfrom, enum clause_type type, int val)
Remove clause from treaty.
bool could_intel_with_player(const struct player *pplayer, const struct player *aplayer)
Returns TRUE iff pplayer can get intelligence about aplayer.
bool diplomacy_possible(const struct player *pplayer, const struct player *aplayer)
Returns TRUE iff pplayer could do diplomancy in the game at all.
bool could_meet_with_player(const struct player *pplayer, const struct player *aplayer)
Returns TRUE iff pplayer could do diplomatic meetings with aplayer.
struct clause_list * clauses
struct requirement_vector receiver_reqs
struct requirement_vector giver_reqs