38#define LOG_DIPLOMAT LOG_DEBUG
48 if (pimprove->sabotage > 0) {
63 const struct player *target_player)
68 if (actor_research != target_research) {
78 == TECH_PREREQS_KNOWN))) {
159 int incite_cost, expenses;
164 if (incite_cost <= actor_player->
economic.
gold - 2 * expenses) {
179 ACTRES_SPY_TARGETED_SABOTAGE_CITY))) {
182 if (count_impr > 0) {
190 ACTRES_SPY_SABOTAGE_CITY_PRODUCTION))) {
193 if (count_impr > 0) {
229 const enum effect_type casus_belli_eft[] = {
230 EFT_CASUS_BELLI_SUCCESS,
231 EFT_CASUS_BELLI_CAUGHT,
234 for (i = 0; i <
ARRAY_SIZE(casus_belli_eft); i++) {
237 casus_belli_eft[i], paction,
242 case CBR_VICTIM_ONLY:
246 case CBR_INTERNATIONAL_OUTRAGE:
275 struct tile *from_tile;
302 return MAX(0, utility);
330 int tgt_impr_vul = 0;
334 int impr_vul = pimprove->sabotage;
336 impr_vul -= (impr_vul
341 impr_vul =
MAX(impr_vul, 100);
350 if (impr_vul >= tgt_impr_vul) {
352 tgt_impr_vul = impr_vul;
enum action_actor_kind action_get_actor_kind(const struct action *paction)
enum action_target_kind action_get_target_kind(const struct action *paction)
#define action_has_result(_act_, _res_)
void dai_calc_data(const struct player *pplayer, int *trade, int *expenses, int *income)
const char * city_name_get(const struct city *pcity)
#define city_tile(_pcity_)
#define city_owner(_pcity_)
#define city_built_iterate(_pcity, _p)
#define city_built_iterate_end
int city_incite_cost(struct player *pplayer, struct city *pcity)
int dai_action_choose_sub_tgt_unit_vs_city(struct action *paction, struct unit *actor_unit, struct city *target_city)
static Tech_type_id choose_tech_to_steal(const struct player *actor_player, const struct player *target_player)
adv_want dai_action_value_unit_vs_city(struct action *paction, struct unit *actor_unit, struct city *target_city, int sub_tgt_id, int count_tech)
static int count_sabotagable_improvements(struct city *pcity)
struct unit struct city * target_city
int diplomats_unignored_tech_stealings(struct unit *pdiplomat, struct city *pcity)
int get_city_bonus(const struct city *pcity, enum effect_type effect_type)
Impr_type_id improvement_number(const struct impr_type *pimprove)
#define fc_assert_msg(condition, message,...)
#define fc_assert_ret_val(condition, val)
static int map_move_cost_unit(const struct civ_map *nmap, struct unit *punit, const struct tile *ptile)
bool pplayers_at_war(const struct player *pplayer, const struct player *pplayer2)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
enum casus_belli_range casus_belli_range_for(const struct player *offender, const struct unit_type *off_ut, const struct player *tgt_plr, const enum effect_type outcome, const struct action *paction, const struct tile *tgt_tile)
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)
#define UNIT_LOG(loglevel, punit, msg,...)
struct packet_game_info info
bool tech_steal_allow_holes
struct player_economic economic
Tech_type_id advance_number(const struct advance *padvance)
#define advance_iterate(_start, _p)
#define advance_iterate_end
int unit_pays_mp_for_action(const struct action *paction, const struct unit *punit)
const struct unit_type * unit_type_get(const struct unit *punit)
bool utype_pays_for_regular_move_to_tgt(const struct action *paction, const struct unit_type *utype)
bool utype_is_moved_to_tgt_by_action(const struct action *paction, const struct unit_type *utype)
int unit_build_shield_cost_base(const struct unit *punit)
bool utype_is_consumed_by_action(const struct action *paction, const struct unit_type *utype)
bool utype_is_unmoved_by_action(const struct action *paction, const struct unit_type *utype)