184 if (
pclause->from == pplayer) {
191 log_error(
"Requirements of a clause between %s and %s not fulfilled",
201 log_error(
"%s tried to give embassy to %s, who already "
212 log_error(
"Treaty: %s can't have tech %s",
216 _(
"The %s can't accept %s."),
224 log_error(
"Nation %s try to give unknown tech %s to nation %s.",
229 _(
"You don't have tech %s, you can't accept treaty."),
239 _(
"City you are trying to give no longer exists, "
240 "you can't accept treaty."));
245 _(
"You are not owner of %s, you can't accept treaty."),
251 _(
"Your capital (%s) is requested, "
252 "you can't accept treaty."),
273 _(
"You cannot form an alliance because you are "
274 "at war with an ally of %s."),
278 _(
"You cannot form an alliance because %s is "
279 "at war with an ally of yours."),
289 _(
"You don't have enough gold, "
290 "you can't accept treaty."));
325 PL_(
"A treaty containing %d clause was agreed upon.",
326 "A treaty containing %d clauses was agreed upon.",
330 PL_(
"A treaty containing %d clause was agreed upon.",
331 "A treaty containing %d clauses was agreed upon.",
349 _(
"Clause requirements are no longer fulfilled. "
350 "Treaty with %s canceled!"),
353 _(
"Clause requirements are no longer fulfilled. "
354 "Treaty with %s canceled!"),
366 _(
"One of the cities the %s are giving away"
367 " is destroyed! Treaty canceled!"),
370 _(
"One of the cities the %s are giving away"
371 " is destroyed! Treaty canceled!"),
377 _(
"The %s no longer control %s! "
382 _(
"The %s no longer control %s! "
390 _(
"Your capital (%s) is requested, "
391 "you can't accept treaty."),
420 _(
"The %s don't have the promised amount "
421 "of gold! Treaty canceled!"),
424 _(
"The %s don't have the promised amount "
425 "of gold! Treaty canceled!"),
454 _(
"You gave an embassy to %s."),
457 _(
"%s allowed you to create an embassy!"),
471 "that %s want to give them.",
480 _(
"You are taught the knowledge of %s."),
489 _(
"You have acquired %s thanks to the %s "
490 "treaty with the %s."),
497 Q_(
"?fromplr:The %s have acquired %s from the %s."),
515 pdest->economic.gold += received;
517 PL_(
"You get %d gold.",
518 "You get %d gold.", received), received);
525 _(
"You receive the %s worldmap."),
534 _(
"You receive the %s seamap."),
544 log_error(
"Treaty city id %d not found - skipping clause.",
550 _(
"You receive the city of %s from %s."),
554 _(
"You give the city of %s to %s."),
573 _(
"You agree on a cease-fire with %s."),
576 _(
"You agree on a cease-fire with %s."),
598 PL_(
"You agree on an armistice with the %s. In %d turn, "
599 "it will become a peace treaty. Move your "
600 "military units out of %s territory to avoid them "
602 "You agree on an armistice with the %s. In %d turns, "
603 "it will become a peace treaty. Move any "
604 "military units out of %s territory to avoid them "
612 PL_(
"You agree on an armistice with the %s. In %d turn, "
613 "it will become a peace treaty. Move your "
614 "military units out of %s territory to avoid them "
616 "You agree on an armistice with the %s. In %d turns, "
617 "it will become a peace treaty. Move any "
618 "military units out of %s territory to avoid them "
637 _(
"You agree on an alliance with %s."),
640 _(
"You agree on an alliance with %s."),
650 _(
"You give shared vision to %s."),
653 _(
"%s gives you shared vision."),
663 _(
"You share your tiles with %s."),
666 _(
"%s shares their tiles with you."),
721 int counterpart,
int giver,
754 int counterpart,
int giver,
814 _(
"%s canceled the meeting!"),
821 _(
"Meeting with %s canceled."),
861 _(
"Your diplomatic envoy was decapitated!"));
#define CALL_PLR_AI_FUNC(_func, _player,...)
bool is_capital(const struct city *pcity)
#define city_tile(_pcity_)
#define city_owner(_pcity_)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
void establish_embassy(struct player *pplayer, struct player *aplayer)
void send_diplomatic_meetings(struct connection *dest)
static void call_treaty_accepted(struct player *pplayer, struct player *aplayer, struct treaty *ptreaty)
void handle_diplomacy_remove_clause_req(struct player *pplayer, int counterpart, int giver, enum clause_type type, int value)
void handle_diplomacy_create_clause_req(struct player *pplayer, int counterpart, int giver, enum clause_type type, int value)
void reject_all_treaties(struct player *pplayer)
enum diplstate_type valid_dst_closest(struct player_diplstate *dst)
static void call_treaty_evaluate(struct player *pplayer, struct player *aplayer, struct treaty *ptreaty)
void set_diplstate_type(struct player_diplstate *state1, struct player_diplstate *state2, enum diplstate_type type)
void handle_diplomacy_init_meeting_req(struct player *pplayer, int counterpart)
void cancel_all_meetings(struct player *pplayer)
void handle_diplomacy_cancel_meeting_req(struct player *pplayer, int counterpart)
static enum diplstate_type dst_closest(enum diplstate_type a, enum diplstate_type b)
static void really_diplomacy_cancel_meeting(struct player *pplayer, struct player *pother)
void handle_diplomacy_accept_treaty_req(struct player *pplayer, int counterpart)
void treaty_remove(struct treaty *ptreaty)
void treaty_add(struct treaty *ptreaty)
struct treaty * find_treaty(struct player *plr0, struct player *plr1)
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)
bool remove_clause(struct treaty *ptreaty, struct player *pfrom, enum clause_type type, int val)
struct clause_info * clause_info_get(enum clause_type type)
bool could_meet_with_player(const struct player *pplayer, const struct player *aplayer)
#define clause_list_iterate_end
#define clause_list_iterate(clauselist, pclause)
#define is_pact_clause(x)
int get_player_bonus(const struct player *pplayer, enum effect_type effect_type)
#define PL_(String1, String2, n)
const struct ft_color ftc_server
const char * city_link(const struct city *pcity)
struct city * game_city_by_number(int id)
#define log_verbose(message,...)
#define fc_assert(condition)
#define fc_assert_action(condition, action)
#define log_error(message,...)
void give_map_from_player_to_player(struct player *pfrom, struct player *pdest)
void give_seamap_from_player_to_player(struct player *pfrom, struct player *pdest)
void give_citymap_from_player_to_player(struct city *pcity, struct player *pfrom, struct player *pdest)
bool map_is_known_and_seen(const struct tile *ptile, const struct player *pplayer, enum vision_layer vlayer)
void give_shared_vision(struct player *pfrom, struct player *pto)
const char * nation_rule_name(const struct nation_type *pnation)
const char * nation_adjective_for_player(const struct player *pplayer)
struct nation_type * nation_of_player(const struct player *pplayer)
const char * nation_plural_for_player(const struct player *pplayer)
void notify_research(const struct research *presearch, const struct player *exclude, enum event_type event, const struct ft_color color, const char *format,...)
void notify_player(const struct player *pplayer, const struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
void notify_research_embassies(const struct research *presearch, const struct player *exclude, enum event_type event, const struct ft_color color, const char *format,...)
void dlsend_packet_diplomacy_init_meeting(struct conn_list *dest, int counterpart, int initiated_from)
void dlsend_packet_diplomacy_remove_clause(struct conn_list *dest, int counterpart, int giver, enum clause_type type, int value)
int dsend_packet_diplomacy_create_clause(struct connection *pc, int counterpart, int giver, enum clause_type type, int value)
int dsend_packet_diplomacy_init_meeting(struct connection *pc, int counterpart, int initiated_from)
void dlsend_packet_diplomacy_create_clause(struct conn_list *dest, int counterpart, int giver, enum clause_type type, int value)
void dlsend_packet_diplomacy_accept_treaty(struct conn_list *dest, int counterpart, bool I_accepted, bool other_accepted)
void dlsend_packet_diplomacy_cancel_meeting(struct conn_list *dest, int counterpart, int initiated_from)
int dsend_packet_diplomacy_accept_treaty(struct connection *pc, int counterpart, bool I_accepted, bool other_accepted)
struct player * player_by_number(const int player_id)
int player_number(const struct player *pplayer)
enum dipl_reason pplayer_can_make_treaty(const struct player *p1, const struct player *p2, enum diplstate_type treaty)
const char * player_name(const struct player *pplayer)
bool player_has_real_embassy(const struct player *pplayer, const struct player *pplayer2)
int player_index(const struct player *pplayer)
struct player_diplstate * player_diplstate_get(const struct player *plr1, const struct player *plr2)
#define players_iterate_end
@ DIPL_ALLIANCE_PROBLEM_THEM
@ DIPL_ALLIANCE_PROBLEM_US
#define players_iterate(_pplayer)
#define player_list_iterate(playerlist, pplayer)
static bool is_barbarian(const struct player *pplayer)
#define player_list_iterate_end
void send_player_all_c(struct player *src, struct conn_list *dest)
void update_players_after_alliance_breakup(struct player *pplayer, struct player *pplayer2, const struct unit_list *pplayer_seen_units, const struct unit_list *pplayer2_seen_units)
bool are_reqs_active(const struct req_context *context, const struct req_context *other_context, const struct requirement_vector *reqs, const enum req_problem_type prob_type)
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
bool research_invention_gettable(const struct research *presearch, const Tech_type_id tech, bool allow_holes)
int research_pretty_name(const struct research *presearch, char *buf, size_t buf_len)
void script_server_signal_emit(const char *signal_name,...)
#define BAD_HEURISTIC_INIT(_ini_val_)
struct packet_game_info info
struct civ_game::@32::@36 server
struct requirement_vector receiver_reqs
struct requirement_vector giver_reqs
bool tech_trade_allow_holes
enum diplstate_type max_state
struct conn_list * connections
struct player_economic economic
const struct player * player
struct clause_list * clauses
const struct player_list * team_members(const struct team *pteam)
struct advance * advance_by_number(const Tech_type_id atype)
const char * advance_name_translation(const struct advance *padvance)
const char * advance_rule_name(const struct advance *padvance)