![]() |
Freeciv21
Develop your civilization from humble roots to a global empire
|
#include "fc_types.h"
Include dependency graph for aidiplomat.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Functions | |
| void | dai_manage_diplomat (struct ai_type *ait, struct player *pplayer, struct unit *punit) |
| If we are the only diplomat in a threatened city, defend against enemy actions. More... | |
| 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. More... | |
| 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. More... | |
| 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 108 of file aidiplomat.cpp.
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 155 of file aidiplomat.cpp.
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 696 of file aidiplomat.cpp.
Referenced by dai_manage_unit().