|
Freeciv-3.1
|
#include "ai.h"#include "player.h"#include "advdata.h"#include "autosettlers.h"#include "aidata.h"#include "aiferry.h"#include "aihand.h"#include "ailog.h"#include "aiplayer.h"#include "aitools.h"#include "aiunit.h"#include "daicity.h"#include "daidiplomacy.h"#include "daidomestic.h"#include "daimilitary.h"#include "daisettler.h"#include "classicai.h"Go to the source code of this file.
Functions | |
| const char * | fc_ai_classic_capstr (void) |
| static void | classic_ai_set_self (struct ai_type *ai) |
| static struct ai_type * | classic_ai_get_self (void) |
| static void | cai_module_close (void) |
| static void | cai_player_alloc (struct player *pplayer) |
| static void | cai_player_free (struct player *pplayer) |
| static void | cai_player_save_relations (struct player *pplayer, struct player *other, struct section_file *file, int plrno) |
| static void | cai_player_load_relations (struct player *pplayer, struct player *other, const struct section_file *file, int plrno) |
| static void | cai_gained_control (struct player *pplayer) |
| static void | cai_split_by_civil_war (struct player *original, struct player *created) |
| static void | cai_created_by_civil_war (struct player *original, struct player *created) |
| static void | cai_data_phase_begin (struct player *pplayer, bool is_new_phase) |
| static void | cai_data_phase_finished (struct player *pplayer) |
| static void | cai_city_alloc (struct city *pcity) |
| static void | cai_city_free (struct city *pcity) |
| static void | cai_city_save (struct section_file *file, const struct city *pcity, const char *citystr) |
| static void | cai_city_load (const struct section_file *file, struct city *pcity, const char *citystr) |
| static void | cai_build_adv_override (struct city *pcity, struct adv_choice *choice) |
| static void | cai_wonder_city_distance (struct player *pplayer, struct adv_data *adv) |
| static void | cai_build_adv_init (struct player *pplayer) |
| static void | cai_build_adv_adjust (struct player *pplayer, struct city *wonder_city) |
| static void | cai_gov_value (struct player *pplayer, struct government *gov, adv_want *val, bool *override) |
| static void | cai_units_ruleset_init (void) |
| static void | cai_units_ruleset_close (void) |
| static void | cai_unit_init (struct unit *punit) |
| static void | cai_unit_close (struct unit *punit) |
| static void | cai_ferry_init_ferry (struct unit *ferry) |
| static void | cai_ferry_transformed (struct unit *ferry, const struct unit_type *old) |
| static void | cai_ferry_lost (struct unit *punit) |
| static void | cai_unit_turn_end (struct unit *punit) |
| static void | cai_unit_move_or_attack (struct unit *punit, struct tile *ptile, struct pf_path *path, int step) |
| static void | cai_unit_new_adv_task (struct unit *punit, enum adv_unit_task task, struct tile *ptile) |
| static void | cai_unit_save (struct section_file *file, const struct unit *punit, const char *unitstr) |
| static void | cai_unit_load (const struct section_file *file, struct unit *punit, const char *unitstr) |
| static void | cai_auto_settler_reset (struct player *pplayer) |
| static void | cai_auto_settler_run (struct player *pplayer, struct unit *punit, struct settlermap *state) |
| static void | cai_auto_settler_cont (struct player *pplayer, struct unit *punit, struct settlermap *state) |
| static void | cai_switch_to_explore (struct unit *punit, struct tile *target, enum override_bool *allow) |
| static void | cai_do_first_activities (struct player *pplayer) |
| static void | cai_restart_phase (struct player *pplayer) |
| static void | cai_diplomacy_actions (struct player *pplayer) |
| static void | cai_do_last_activities (struct player *pplayer) |
| static void | cai_treaty_evaluate (struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty) |
| static void | cai_treaty_accepted (struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty) |
| static void | cai_diplomacy_first_contact (struct player *pplayer, struct player *aplayer) |
| static void | cai_incident (enum incident_type type, enum casus_belli_range scope, const struct action *paction, struct player *receiver, struct player *violator, struct player *victim) |
| static void | cai_city_log (char *buffer, int buflength, const struct city *pcity) |
| static void | cai_unit_log (char *buffer, int buflength, const struct unit *punit) |
| static void | cai_consider_plr_dangerous (struct player *plr1, struct player *plr2, enum override_bool *result) |
| static void | cai_consider_tile_dangerous (struct tile *ptile, struct unit *punit, enum override_bool *result) |
| static void | cai_consider_wonder_city (struct city *pcity, bool *result) |
| bool | fc_ai_classic_setup (struct ai_type *ai) |
Variables | |
| static struct ai_type * | self = NULL |
|
static |
Call default ai with classic ai type as parameter.
Definition at line 423 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 401 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 411 of file classicai.c.
Referenced by fc_ai_classic_setup().
Call default ai with classic ai type as parameter.
Definition at line 256 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 246 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 226 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 184 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 194 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 215 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 533 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 204 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 553 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 564 of file classicai.c.
Referenced by fc_ai_classic_setup().
Call default ai with classic ai type as parameter.
Definition at line 575 of file classicai.c.
Referenced by fc_ai_classic_setup().
Call default ai with classic ai type as parameter.
Definition at line 153 of file classicai.c.
Referenced by fc_ai_classic_setup().
Call default ai with classic ai type as parameter.
Definition at line 164 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 174 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 466 of file classicai.c.
Referenced by fc_ai_classic_setup().
Call default ai with classic ai type as parameter.
Definition at line 508 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 446 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 476 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 317 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 337 of file classicai.c.
Referenced by fc_ai_classic_setup().
Call default ai with classic ai type as parameter.
Definition at line 327 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 132 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 266 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 519 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Free resources allocated by the classic AI module
Definition at line 75 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 85 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 95 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 119 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter. Classicai stores information to "ai" like the default ai common code.
Definition at line 106 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Mark turn done as we have already done everything before game was saved.
Definition at line 458 of file classicai.c.
Referenced by fc_ai_classic_setup().
Call default ai with classic ai type as parameter.
Definition at line 142 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 435 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 497 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 486 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 307 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 297 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 390 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 543 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 357 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 368 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 379 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 347 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 287 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Call default ai with classic ai type as parameter.
Definition at line 277 of file classicai.c.
Referenced by fc_ai_classic_setup().
Call default ai with classic ai type as parameter.
Definition at line 236 of file classicai.c.
Referenced by fc_ai_classic_setup().
|
static |
Get pointer to ai type of the classic ai.
Definition at line 59 of file classicai.c.
Referenced by cai_auto_settler_cont(), cai_auto_settler_reset(), cai_auto_settler_run(), cai_build_adv_adjust(), cai_build_adv_init(), cai_build_adv_override(), cai_city_alloc(), cai_city_free(), cai_city_load(), cai_city_log(), cai_city_save(), cai_consider_plr_dangerous(), cai_consider_tile_dangerous(), cai_consider_wonder_city(), cai_created_by_civil_war(), cai_data_phase_begin(), cai_data_phase_finished(), cai_diplomacy_actions(), cai_diplomacy_first_contact(), cai_do_first_activities(), cai_do_last_activities(), cai_ferry_init_ferry(), cai_ferry_lost(), cai_ferry_transformed(), cai_gained_control(), cai_gov_value(), cai_incident(), cai_module_close(), cai_player_alloc(), cai_player_free(), cai_player_load_relations(), cai_player_save_relations(), cai_split_by_civil_war(), cai_switch_to_explore(), cai_treaty_accepted(), cai_treaty_evaluate(), cai_unit_close(), cai_unit_init(), cai_unit_load(), cai_unit_log(), cai_unit_move_or_attack(), cai_unit_new_adv_task(), cai_unit_save(), cai_unit_turn_end(), cai_units_ruleset_close(), cai_units_ruleset_init(), and cai_wonder_city_distance().
|
static |
Set pointer to ai type of the classic ai.
Definition at line 51 of file classicai.c.
Referenced by fc_ai_classic_setup().
| const char * fc_ai_classic_capstr | ( | void | ) |
Return module capability string
Definition at line 67 of file classicai.c.
Setup player ai_funcs function pointers.
Definition at line 585 of file classicai.c.
Referenced by ai_init().
|
static |
Definition at line 46 of file classicai.c.
Referenced by api_methods_city_inspire_partisans(), audio_none_init(), audio_sdl_init(), classic_ai_get_self(), classic_ai_set_self(), close_connections_and_socket(), cma_init(), cmafec_init(), info_popup_closed(), none_audio_init(), none_audio_shutdown(), sdl_audio_init(), sdl_audio_shutdown(), simple_historian_init(), tolua_game_Achievement_name_translation00(), tolua_game_Achievement_rule_name00(), tolua_game_Action_name_translation00(), tolua_game_Action_rule_name00(), tolua_game_Action_target_kind00(), tolua_game_Building_Type_is_great_wonder00(), tolua_game_Building_Type_is_improvement00(), tolua_game_Building_Type_is_small_wonder00(), tolua_game_Building_Type_is_wonder00(), tolua_game_Building_Type_name_translation00(), tolua_game_Building_Type_rule_name00(), tolua_game_City_culture00(), tolua_game_City_has_building00(), tolua_game_City_inspire_partisans00(), tolua_game_City_is_capital00(), tolua_game_City_is_celebrating00(), tolua_game_City_is_gov_center00(), tolua_game_City_is_happy00(), tolua_game_City_is_primary_capital00(), tolua_game_City_is_unhappy00(), tolua_game_City_link_text00(), tolua_game_City_List_Link_data00(), tolua_game_City_List_Link_next00(), tolua_game_City_map_sq_radius00(), tolua_game_City_properties_size00(), tolua_game_City_properties_tile00(), tolua_game_City_tile_link_text00(), tolua_game_direction_next_ccw00(), tolua_game_direction_next_cw00(), tolua_game_direction_opposite00(), tolua_game_Disaster_name_translation00(), tolua_game_Disaster_rule_name00(), tolua_game_Government_name_translation00(), tolua_game_Government_rule_name00(), tolua_game_methods_private_Player_city_list_head00(), tolua_game_methods_private_Player_unit_list_head00(), tolua_game_methods_private_Tile_unit_list_head00(), tolua_game_methods_private_Unit_cargo_list_head00(), tolua_game_Nation_Type_name_translation00(), tolua_game_Nation_Type_plural_translation00(), tolua_game_Nation_Type_rule_name00(), tolua_game_Player_controlling_gui00(), tolua_game_Player_culture00(), tolua_game_Player_gold00(), tolua_game_Player_has_flag00(), tolua_game_Player_has_wonder00(), tolua_game_Player_knows_tech00(), tolua_game_Player_num_cities00(), tolua_game_Player_num_units00(), tolua_game_Player_properties_id00(), tolua_game_Player_research_name_translation00(), tolua_game_Player_research_rule_name00(), tolua_game_Player_shares_research00(), tolua_game_Tech_Type_name_translation00(), tolua_game_Tech_Type_rule_name00(), tolua_game_Terrain_class_name00(), tolua_game_Terrain_name_translation00(), tolua_game_Terrain_rule_name00(), tolua_game_Tile_city00(), tolua_game_Tile_city_exists_within_max_city_map00(), tolua_game_Tile_extra_owner00(), tolua_game_Tile_has_base00(), tolua_game_Tile_has_extra00(), tolua_game_Tile_has_road00(), tolua_game_Tile_is_enemy00(), tolua_game_Tile_link_text00(), tolua_game_Tile_num_units00(), tolua_game_Tile_properties_nat_x00(), tolua_game_Tile_properties_nat_y00(), tolua_game_Tile_properties_x00(), tolua_game_Tile_properties_y00(), tolua_game_Tile_sq_distance00(), tolua_game_Unit_facing00(), tolua_game_Unit_is_on_possible_city_tile00(), tolua_game_Unit_link_text00(), tolua_game_Unit_List_Link_data00(), tolua_game_Unit_List_Link_next00(), tolua_game_Unit_properties_tile00(), tolua_game_Unit_tile_link_text00(), tolua_game_Unit_transporter00(), tolua_game_Unit_Type_can_exist_at_tile00(), tolua_game_Unit_Type_has_flag00(), tolua_game_Unit_Type_has_role00(), tolua_game_Unit_Type_name_translation00(), tolua_game_Unit_Type_rule_name00(), tolua_get_Achievement_Achievement_id(), tolua_get_Action_Action_id(), tolua_get_Building_Type_Building_Type_build_cost(), tolua_get_Building_Type_Building_Type_item_number(), tolua_get_City_City_id(), tolua_get_City_City_name(), tolua_get_City_City_original_ptr(), tolua_get_City_City_owner_ptr(), tolua_get_Connection_Connection_id(), tolua_get_Disaster_Disaster_id(), tolua_get_Government_Government_item_number(), tolua_get_Nation_Type_Nation_Type_item_number(), tolua_get_Player_Player_government_ptr(), tolua_get_Player_Player_is_alive(), tolua_get_Player_Player_name(), tolua_get_Player_Player_nation_ptr(), tolua_get_Tech_Type_Tech_Type_item_number(), tolua_get_Terrain_Terrain_item_number(), tolua_get_Tile_Tile_index(), tolua_get_Tile_Tile_owner_ptr(), tolua_get_Tile_Tile_terrain_ptr(), tolua_get_Unit_Type_Unit_Type_build_cost(), tolua_get_Unit_Type_Unit_Type_item_number(), tolua_get_Unit_Type_Unit_Type_obsoleted_by_ptr(), tolua_get_Unit_Unit_homecity(), tolua_get_Unit_Unit_id(), tolua_get_Unit_Unit_owner_ptr(), tolua_get_Unit_Unit_utype_ptr(), tolua_get_Unit_Unit_veteran(), tolua_server_edit_add_city_history00(), tolua_server_edit_add_player_history00(), tolua_server_edit_give_bulbs00(), tolua_server_edit_movement_allow00(), tolua_server_edit_movement_disallow00(), tolua_server_edit_player_victory00(), tolua_server_edit_unit_kill00(), tolua_server_edit_unit_move00(), tolua_server_edit_unit_move01(), tolua_server_edit_unit_teleport00(), tolua_server_edit_unit_teleport01(), tolua_set_Building_Type_Building_Type_build_cost(), tolua_set_City_City_original_ptr(), tolua_set_City_City_owner_ptr(), tolua_set_Player_Player_government_ptr(), tolua_set_Player_Player_is_alive(), tolua_set_Player_Player_nation_ptr(), tolua_set_Tile_Tile_owner_ptr(), tolua_set_Tile_Tile_terrain_ptr(), tolua_set_Unit_Type_Unit_Type_build_cost(), tolua_set_Unit_Type_Unit_Type_obsoleted_by_ptr(), tolua_set_Unit_Unit_homecity(), tolua_set_Unit_Unit_owner_ptr(), tolua_set_Unit_Unit_utype_ptr(), and tolua_set_Unit_Unit_veteran().