Freeciv-3.2
|
#include "support.h"
#include "fc_types.h"
#include "tech.h"
#include "srv_main.h"
#include "advtools.h"
#include "specenum_gen.h"
Go to the source code of this file.
Data Structures | |
struct | ai_dip_intel |
struct | ai_plr |
Macros | |
#define | SPECENUM_NAME war_reason |
#define | SPECENUM_VALUE0 DAI_WR_BEHAVIOUR |
#define | SPECENUM_VALUE0NAME "Behaviour" |
#define | SPECENUM_VALUE1 DAI_WR_SPACE |
#define | SPECENUM_VALUE1NAME "Space" |
#define | SPECENUM_VALUE2 DAI_WR_EXCUSE |
#define | SPECENUM_VALUE2NAME "Excuse" |
#define | SPECENUM_VALUE3 DAI_WR_HATRED |
#define | SPECENUM_VALUE3NAME "Hatred" |
#define | SPECENUM_VALUE4 DAI_WR_ALLIANCE |
#define | SPECENUM_VALUE4NAME "Alliance" |
#define | SPECENUM_VALUE5 DAI_WR_NONE |
#define | SPECENUM_VALUE5NAME "None" |
Enumerations | |
enum | winning_strategy { WIN_OPEN , WIN_WAR , WIN_SPACE , WIN_CAPITAL } |
Functions | |
void | dai_data_init (struct ai_type *ait, struct player *pplayer) |
void | dai_data_close (struct ai_type *ait, struct player *pplayer) |
void | dai_data_phase_begin (struct ai_type *ait, struct player *pplayer, bool is_new_phase) |
void | dai_data_phase_finished (struct ai_type *ait, struct player *pplayer) |
bool | is_ai_data_phase_open (struct ai_type *ait, struct player *pplayer) |
struct ai_plr * | dai_plr_data_get (struct ai_type *ait, struct player *pplayer, bool *caller_closes) |
struct ai_dip_intel * | dai_diplomacy_get (struct ai_type *ait, const struct player *plr1, const struct player *plr2) |
void | dai_gov_value (struct ai_type *ait, struct player *pplayer, struct government *gov, adv_want *val, bool *override) |
void | dai_adjust_policies (struct ai_type *ait, struct player *pplayer) |
#define SPECENUM_NAME war_reason |
#define SPECENUM_VALUE0 DAI_WR_BEHAVIOUR |
#define SPECENUM_VALUE1 DAI_WR_SPACE |
#define SPECENUM_VALUE2 DAI_WR_EXCUSE |
#define SPECENUM_VALUE3 DAI_WR_HATRED |
#define SPECENUM_VALUE4 DAI_WR_ALLIANCE |
#define SPECENUM_VALUE5 DAI_WR_NONE |
Adjust multiplier values.
Definition at line 442 of file daidata.c.
Referenced by dai_do_last_activities().
Deinitialize ai data structure
Definition at line 104 of file daidata.c.
Referenced by dai_player_free(), and texai_player_free().
Initialize ai data structure
Definition at line 59 of file daidata.c.
Referenced by dai_player_alloc(), and texai_player_alloc().
Make and cache lots of calculations needed for other functions.
Definition at line 142 of file daidata.c.
Referenced by cai_data_phase_begin(), dai_plr_data_get(), and texwai_phase_begin().
Clean up ai data after phase finished.
Definition at line 285 of file daidata.c.
Referenced by cai_data_phase_finished(), dai_auto_settler_reset(), dai_data_close(), dai_goldequiv_clause(), dai_player_copy(), dai_plr_data_get(), dai_treaty_accepted(), and texwai_phase_finished().
struct ai_dip_intel * dai_diplomacy_get | ( | struct ai_type * | ait, |
const struct player * | plr1, | ||
const struct player * | plr2 | ||
) |
Returns diplomatic state type between two players
Definition at line 402 of file daidata.c.
Referenced by dai_consider_plr_dangerous(), dai_data_phase_begin(), dai_declare_war(), dai_diplomacy_actions(), dai_diplomacy_begin_new_phase(), dai_diplomacy_defaults(), dai_diplomacy_destroy(), dai_go_to_war(), dai_goldequiv_clause(), dai_on_war_footing(), dai_player_load_relations(), dai_player_save_relations(), dai_players_can_agree_on_ceasefire(), dai_treaty_accepted(), dai_treaty_react(), dai_war_desire(), real_diplo_log(), and war_countdown().
void dai_gov_value | ( | struct ai_type * | ait, |
struct player * | pplayer, | ||
struct government * | gov, | ||
adv_want * | val, | ||
bool * | override | ||
) |
Set value of the government.
Definition at line 524 of file daidata.c.
Referenced by cai_gov_value(), and texwai_gov_value().
struct ai_plr * dai_plr_data_get | ( | struct ai_type * | ait, |
struct player * | pplayer, | ||
bool * | caller_closes | ||
) |
Get current default ai data related to player. If close is set, data phase will be opened even if it's currently closed, and the boolean will be set accordingly to tell caller that phase needs closing.
Definition at line 308 of file daidata.c.
Referenced by contemplate_terrain_improvements(), dai_auto_settler_reset(), dai_diplomacy_actions(), dai_diplomacy_begin_new_phase(), dai_goldequiv_clause(), dai_player_copy(), dai_treaty_accepted(), dai_war_desire(), domestic_advisor_choose_build(), kill_something_with(), tdc_plr_get(), tdc_plr_set(), and texai_city_worker_wants().
Return whether data phase is currently open. Data phase is open between dai_data_phase_begin() and dai_data_phase_finished() calls.