Freeciv-3.1
|
#include "fc_types.h"
Go to the source code of this file.
Functions | |
void | dai_manage_diplomat (struct ai_type *ait, struct player *pplayer, struct unit *punit) |
void | dai_choose_diplomat_defensive (struct ai_type *ait, struct player *pplayer, struct city *pcity, struct adv_choice *choice, int def) |
void | dai_choose_diplomat_offensive (struct ai_type *ait, struct player *pplayer, struct city *pcity, struct adv_choice *choice) |
void dai_choose_diplomat_defensive | ( | struct ai_type * | ait, |
struct player * | pplayer, | ||
struct city * | pcity, | ||
struct adv_choice * | choice, | ||
int | def | ||
) |
Calculates our need for diplomats as defensive units. May replace values in choice. The values 16000 and 3000 used below are totally arbitrary but seem to work.
Definition at line 115 of file aidiplomat.c.
Referenced by military_advisor_choose_build().
void dai_choose_diplomat_offensive | ( | struct ai_type * | ait, |
struct player * | pplayer, | ||
struct city * | pcity, | ||
struct adv_choice * | choice | ||
) |
Calculates our need for diplomats as offensive units. May replace values in choice.
Definition at line 164 of file aidiplomat.c.
Referenced by military_advisor_choose_build().
If we are the only diplomat in a threatened city, defend against enemy actions. The passive defense is set by game.diplchance. The active defense is to bribe units which end their move nearby. Our next trick is to look for enemy cities on our continent and do our diplomat things.
FIXME: It is important to establish contact with all civilizations, so we should send diplomats by boat eventually. I just don't know how that part of the code works, yet - Per
Definition at line 721 of file aidiplomat.c.
Referenced by dai_manage_unit().