13#ifndef FC__DIPTREATY_H
14#define FC__DIPTREATY_H
25#define SPECENUM_NAME clause_type
26#define SPECENUM_VALUE0 CLAUSE_ADVANCE
27#define SPECENUM_VALUE0NAME "Advance"
28#define SPECENUM_VALUE1 CLAUSE_GOLD
29#define SPECENUM_VALUE1NAME "Gold"
30#define SPECENUM_VALUE2 CLAUSE_MAP
31#define SPECENUM_VALUE2NAME "Map"
32#define SPECENUM_VALUE3 CLAUSE_SEAMAP
33#define SPECENUM_VALUE3NAME "Seamap"
34#define SPECENUM_VALUE4 CLAUSE_CITY
35#define SPECENUM_VALUE4NAME "City"
36#define SPECENUM_VALUE5 CLAUSE_CEASEFIRE
37#define SPECENUM_VALUE5NAME "Ceasefire"
38#define SPECENUM_VALUE6 CLAUSE_PEACE
39#define SPECENUM_VALUE6NAME "Peace"
40#define SPECENUM_VALUE7 CLAUSE_ALLIANCE
41#define SPECENUM_VALUE7NAME "Alliance"
42#define SPECENUM_VALUE8 CLAUSE_VISION
43#define SPECENUM_VALUE8NAME "Vision"
44#define SPECENUM_VALUE9 CLAUSE_EMBASSY
45#define SPECENUM_VALUE9NAME "Embassy"
46#define SPECENUM_VALUE10 CLAUSE_SHARED_TILES
47#define SPECENUM_VALUE10NAME "SharedTiles"
48#define SPECENUM_COUNT CLAUSE_COUNT
51#define CLAUSE_LAST CLAUSE_COUNT
53#define is_pact_clause(x) \
54 ((x == CLAUSE_CEASEFIRE) || (x == CLAUSE_PEACE) || (x == CLAUSE_ALLIANCE))
67#define SPECLIST_TAG clause
68#define SPECLIST_TYPE struct Clause
71#define clause_list_iterate(clauselist, pclause) \
72 TYPED_LIST_ITERATE(struct Clause, clauselist, pclause)
73#define clause_list_iterate_end LIST_ITERATE_END
109#define SPECLIST_TAG treaty
110#define SPECLIST_TYPE struct treaty
113#define treaty_list_iterate(list, p) \
114 TYPED_LIST_ITERATE(struct treaty, list, p)
115#define treaty_list_iterate_end LIST_ITERATE_END
void treaty_remove(struct treaty *ptreaty)
void treaty_add(struct treaty *ptreaty)
void clause_infos_init(void)
struct treaty * find_treaty(struct player *plr0, struct player *plr1)
void clause_infos_free(void)
void init_treaty(struct treaty *ptreaty, struct player *plr0, struct player *plr1)
bool add_clause(struct treaty *ptreaty, struct player *pfrom, enum clause_type type, int val, struct player *client_player)
void treaties_iterate(treaty_cb cb, void *data)
bool clause_enabled(enum clause_type type)
void clear_treaty(struct treaty *ptreaty)
bool remove_clause(struct treaty *ptreaty, struct player *pfrom, enum clause_type type, int val)
bool could_intel_with_player(const struct player *pplayer, const struct player *aplayer)
struct clause_info * clause_info_get(enum clause_type type)
bool diplomacy_possible(const struct player *pplayer, const struct player *aplayer)
void(* treaty_cb)(struct treaty *, void *data)
bool could_meet_with_player(const struct player *pplayer, const struct player *aplayer)
struct requirement_vector receiver_reqs
struct requirement_vector giver_reqs
struct requirement_vector either_reqs
struct clause_list * clauses