Freeciv-3.1
|
#include "fc_types.h"
Go to the source code of this file.
Functions | |
bool | diplomat_embassy (struct player *pplayer, struct unit *pdiplomat, struct city *pcity, const struct action *paction) |
bool | diplomat_investigate (struct player *pplayer, struct unit *pdiplomat, struct city *pcity, const struct action *paction) |
void | spy_send_sabotage_list (struct connection *pc, struct unit *pdiplomat, struct city *pcity, const struct action *paction, int request_kind) |
bool | spy_poison (struct player *pplayer, struct unit *pdiplomat, struct city *pcity, const struct action *paction) |
bool | spy_spread_plague (struct player *act_player, struct unit *act_unit, struct city *tgt_city, const struct action *paction) |
bool | spy_sabotage_unit (struct player *pplayer, struct unit *pdiplomat, struct unit *pvictim, const struct action *paction) |
bool | diplomat_bribe (struct player *pplayer, struct unit *pdiplomat, struct unit *pvictim, const struct action *paction) |
bool | spy_attack (struct player *act_player, struct unit *act_unit, struct tile *tgt_tile, const struct action *paction) |
int | diplomats_unignored_tech_stealings (struct unit *pdiplomat, struct city *pcity) |
bool | diplomat_get_tech (struct player *pplayer, struct unit *pdiplomat, struct city *pcity, int technology, const struct action *paction) |
bool | diplomat_incite (struct player *pplayer, struct unit *pdiplomat, struct city *pcity, const struct action *paction) |
bool | diplomat_sabotage (struct player *pplayer, struct unit *pdiplomat, struct city *pcity, Impr_type_id improvement, const struct action *paction) |
bool | spy_steal_gold (struct player *act_player, struct unit *act_unit, struct city *tgt_city, const struct action *paction) |
bool | spy_steal_some_maps (struct player *act_player, struct unit *act_unit, struct city *tgt_city, const struct action *paction) |
bool | spy_nuke_city (struct player *act_player, struct unit *act_unit, struct city *tgt_city, const struct action *paction) |
int | count_diplomats_on_tile (struct tile *ptile) |
int count_diplomats_on_tile | ( | struct tile * | ptile | ) |
Return number of diplomats on this square. AJS 20000130
Definition at line 2349 of file diplomats.c.
Referenced by dai_diplomat_defend(), dai_manage_diplomat(), and find_city_to_diplomat().
bool diplomat_bribe | ( | struct player * | pplayer, |
struct unit * | pdiplomat, | ||
struct unit * | pvictim, | ||
const struct action * | paction | ||
) |
Bribe an enemy unit.
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 648 of file diplomats.c.
Referenced by unit_perform_action().
bool diplomat_embassy | ( | struct player * | pplayer, |
struct unit * | pdiplomat, | ||
struct city * | pcity, | ||
const struct action * | paction | ||
) |
Establish an embassy.
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 488 of file diplomats.c.
Referenced by unit_perform_action().
bool diplomat_get_tech | ( | struct player * | pplayer, |
struct unit * | pdiplomat, | ||
struct city * | pcity, | ||
Tech_type_id | technology, | ||
const struct action * | paction | ||
) |
Try to steal a technology from an enemy city. If paction results in ACTION_SPY_STEAL_TECH or ACTION_SPY_STEAL_TECH_ESC, steal a random technology. Otherwise, steal the technology whose ID is "technology". (Note: Only Spies can select what to steal.)
FIXME: It should give a loss of reputation to steal from a player you are not at war with
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 896 of file diplomats.c.
Referenced by unit_perform_action().
bool diplomat_incite | ( | struct player * | pplayer, |
struct unit * | pdiplomat, | ||
struct city * | pcity, | ||
const struct action * | paction | ||
) |
Incite a city to disaffect.
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 1140 of file diplomats.c.
Referenced by unit_perform_action().
bool diplomat_investigate | ( | struct player * | pplayer, |
struct unit * | pdiplomat, | ||
struct city * | pcity, | ||
const struct action * | paction | ||
) |
Investigate a city.
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 325 of file diplomats.c.
Referenced by receive_packet_city_info_100(), receive_packet_city_info_101(), receive_packet_city_info_102(), receive_packet_city_info_103(), and unit_perform_action().
bool diplomat_sabotage | ( | struct player * | pplayer, |
struct unit * | pdiplomat, | ||
struct city * | pcity, | ||
Impr_type_id | improvement, | ||
const struct action * | paction | ||
) |
Sabotage enemy city's improvement or production. If this is untargeted sabotage city a random improvement or production is targeted. Targeted sabotage city lets the value of "improvement" decide the target. If "improvement" is -1, sabotage current production. Otherwise, sabotage the city improvement whose ID is "improvement".
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 1289 of file diplomats.c.
Referenced by unit_perform_action().
Returns the amount of tech thefts from a city not ignored by the EFT_STEALINGS_IGNORE effect.
Definition at line 855 of file diplomats.c.
Referenced by dai_action_value_unit_vs_city(), diplomat_get_tech(), and find_city_to_diplomat().
bool spy_attack | ( | struct player * | act_player, |
struct unit * | act_unit, | ||
struct tile * | tgt_tile, | ||
const struct action * | paction | ||
) |
Diplomatic battle.
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 812 of file diplomats.c.
Referenced by unit_perform_action().
bool spy_nuke_city | ( | struct player * | act_player, |
struct unit * | act_unit, | ||
struct city * | tgt_city, | ||
const struct action * | paction | ||
) |
Hide a suitcase nuke in a city and detonate it.
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 1839 of file diplomats.c.
Referenced by unit_perform_action().
bool spy_poison | ( | struct player * | pplayer, |
struct unit * | pdiplomat, | ||
struct city * | pcity, | ||
const struct action * | paction | ||
) |
Poison a city's water supply.
'pplayer' is the player who tries to poison 'pcity' with its unit 'pdiplomat'.
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 98 of file diplomats.c.
Referenced by unit_perform_action().
bool spy_sabotage_unit | ( | struct player * | pplayer, |
struct unit * | pdiplomat, | ||
struct unit * | pvictim, | ||
const struct action * | paction | ||
) |
Sabotage an enemy unit.
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 553 of file diplomats.c.
Referenced by unit_perform_action().
void spy_send_sabotage_list | ( | struct connection * | pc, |
struct unit * | pdiplomat, | ||
struct city * | pcity, | ||
const struct action * | paction, | ||
int | request_kind | ||
) |
Get list of improvements from city (for purposes of sabotage).
Only send back to the originating connection, if there is one. (?)
Definition at line 432 of file diplomats.c.
Referenced by handle_unit_action_query().
bool spy_spread_plague | ( | struct player * | act_player, |
struct unit * | act_unit, | ||
struct city * | tgt_city, | ||
const struct action * | paction | ||
) |
Spread a plague to the target city.
'act_player' is the player who tries to infect 'tgt_city' with its unit 'act_unit'.
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 215 of file diplomats.c.
Referenced by unit_perform_action().
bool spy_steal_gold | ( | struct player * | act_player, |
struct unit * | act_unit, | ||
struct city * | tgt_city, | ||
const struct action * | paction | ||
) |
Steal gold from another player. The amount stolen is decided randomly. Not everything stolen reaches the player that ordered it stolen.
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 1561 of file diplomats.c.
Referenced by unit_perform_action().
bool spy_steal_some_maps | ( | struct player * | act_player, |
struct unit * | act_unit, | ||
struct city * | tgt_city, | ||
const struct action * | paction | ||
) |
Steal part of another player's map.
Returns TRUE iff action could be done, FALSE if it couldn't. Even if this returns TRUE, unit may have died during the action.
Definition at line 1703 of file diplomats.c.
Referenced by unit_perform_action().