Freeciv-3.2
Loading...
Searching...
No Matches
Functions | Variables
classicai.c File Reference
#include "ai.h"
#include "player.h"
#include "advdata.h"
#include "autosettlers.h"
#include "aiferry.h"
#include "aihand.h"
#include "aitools.h"
#include "daicity.h"
#include "daidata.h"
#include "daidiplomacy.h"
#include "daidomestic.h"
#include "dailog.h"
#include "daimilitary.h"
#include "daiplayer.h"
#include "daisettler.h"
#include "classicai.h"

Go to the source code of this file.

Functions

const charfc_ai_classic_capstr (void)
 
static void classic_ai_set_self (struct ai_type *ai)
 
static struct ai_typeclassic_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)
 
static void cai_revolution_start (struct player *pplayer)
 
bool fc_ai_classic_setup (struct ai_type *ai)
 

Variables

static struct ai_typeself = NULL
 

Function Documentation

◆ cai_auto_settler_cont()

static void cai_auto_settler_cont ( struct player pplayer,
struct unit punit,
struct settlermap state 
)
static

Call default ai with classic ai type as parameter.

Definition at line 422 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_auto_settler_reset()

static void cai_auto_settler_reset ( struct player pplayer)
static

Call default ai with classic ai type as parameter.

Definition at line 400 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_auto_settler_run()

static void cai_auto_settler_run ( struct player pplayer,
struct unit punit,
struct settlermap state 
)
static

Call default ai with classic ai type as parameter.

Definition at line 410 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_build_adv_adjust()

static void cai_build_adv_adjust ( struct player pplayer,
struct city wonder_city 
)
static

Call default ai with classic ai type as parameter.

Definition at line 255 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_build_adv_init()

static void cai_build_adv_init ( struct player pplayer)
static

Call default ai with classic ai type as parameter.

Definition at line 245 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_build_adv_override()

static void cai_build_adv_override ( struct city pcity,
struct adv_choice choice 
)
static

Call default ai with classic ai type as parameter.

Definition at line 225 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_city_alloc()

static void cai_city_alloc ( struct city pcity)
static

Call default ai with classic ai type as parameter.

Definition at line 183 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_city_free()

static void cai_city_free ( struct city pcity)
static

Call default ai with classic ai type as parameter.

Definition at line 193 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_city_load()

static void cai_city_load ( const struct section_file file,
struct city pcity,
const char citystr 
)
static

Call default ai with classic ai type as parameter.

Definition at line 214 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_city_log()

static void cai_city_log ( char buffer,
int  buflength,
const struct city pcity 
)
static

Call default ai with classic ai type as parameter.

Definition at line 532 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_city_save()

static void cai_city_save ( struct section_file file,
const struct city pcity,
const char citystr 
)
static

Call default ai with classic ai type as parameter.

Definition at line 203 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_consider_plr_dangerous()

static void cai_consider_plr_dangerous ( struct player plr1,
struct player plr2,
enum override_bool result 
)
static

Call default ai with classic ai type as parameter.

Definition at line 552 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_consider_tile_dangerous()

static void cai_consider_tile_dangerous ( struct tile ptile,
struct unit punit,
enum override_bool result 
)
static

Call default ai with classic ai type as parameter.

Definition at line 563 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_consider_wonder_city()

static void cai_consider_wonder_city ( struct city pcity,
bool result 
)
static

Call default ai with classic ai type as parameter.

Definition at line 574 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_created_by_civil_war()

static void cai_created_by_civil_war ( struct player original,
struct player created 
)
static

Call default ai with classic ai type as parameter.

Definition at line 152 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_data_phase_begin()

static void cai_data_phase_begin ( struct player pplayer,
bool  is_new_phase 
)
static

Call default ai with classic ai type as parameter.

Definition at line 163 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_data_phase_finished()

static void cai_data_phase_finished ( struct player pplayer)
static

Call default ai with classic ai type as parameter.

Definition at line 173 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_diplomacy_actions()

static void cai_diplomacy_actions ( struct player pplayer)
static

Call default ai with classic ai type as parameter.

Definition at line 465 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_diplomacy_first_contact()

static void cai_diplomacy_first_contact ( struct player pplayer,
struct player aplayer 
)
static

Call default ai with classic ai type as parameter.

Definition at line 507 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_do_first_activities()

static void cai_do_first_activities ( struct player pplayer)
static

Call default ai with classic ai type as parameter.

Definition at line 445 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_do_last_activities()

static void cai_do_last_activities ( struct player pplayer)
static

Call default ai with classic ai type as parameter.

Definition at line 475 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_ferry_init_ferry()

static void cai_ferry_init_ferry ( struct unit ferry)
static

Call default ai with classic ai type as parameter.

Definition at line 316 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_ferry_lost()

static void cai_ferry_lost ( struct unit punit)
static

Call default ai with classic ai type as parameter.

Definition at line 336 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_ferry_transformed()

static void cai_ferry_transformed ( struct unit ferry,
const struct unit_type old 
)
static

Call default ai with classic ai type as parameter.

Definition at line 326 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_gained_control()

static void cai_gained_control ( struct player pplayer)
static

Call default ai with classic ai type as parameter.

Definition at line 131 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_gov_value()

static void cai_gov_value ( struct player pplayer,
struct government gov,
adv_want val,
bool override 
)
static

Call default ai with classic ai type as parameter.

Definition at line 265 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_incident()

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

Call default ai with classic ai type as parameter.

Definition at line 518 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_module_close()

static void cai_module_close ( void  )
static

Free resources allocated by the classic AI module

Definition at line 74 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_player_alloc()

static void cai_player_alloc ( struct player pplayer)
static

Call default ai with classic ai type as parameter.

Definition at line 84 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_player_free()

static void cai_player_free ( struct player pplayer)
static

Call default ai with classic ai type as parameter.

Definition at line 94 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_player_load_relations()

static void cai_player_load_relations ( struct player pplayer,
struct player other,
const struct section_file file,
int  plrno 
)
static

Call default ai with classic ai type as parameter.

Definition at line 118 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_player_save_relations()

static void cai_player_save_relations ( struct player pplayer,
struct player other,
struct section_file file,
int  plrno 
)
static

Call default ai with classic ai type as parameter. Classicai stores information to "ai" like the default ai common code.

Definition at line 105 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_restart_phase()

static void cai_restart_phase ( struct player pplayer)
static

Mark turn done as we have already done everything before game was saved.

Definition at line 457 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_revolution_start()

static void cai_revolution_start ( struct player pplayer)
static

Call default ai with classic ai type as parameter.

Definition at line 584 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_split_by_civil_war()

static void cai_split_by_civil_war ( struct player original,
struct player created 
)
static

Call default ai with classic ai type as parameter.

Definition at line 141 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_switch_to_explore()

static void cai_switch_to_explore ( struct unit punit,
struct tile target,
enum override_bool allow 
)
static

Call default ai with classic ai type as parameter.

Definition at line 434 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_treaty_accepted()

static void cai_treaty_accepted ( struct player pplayer,
struct player aplayer,
struct Treaty ptreaty 
)
static

Call default ai with classic ai type as parameter.

Definition at line 496 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_treaty_evaluate()

static void cai_treaty_evaluate ( struct player pplayer,
struct player aplayer,
struct Treaty ptreaty 
)
static

Call default ai with classic ai type as parameter.

Definition at line 485 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_unit_close()

static void cai_unit_close ( struct unit punit)
static

Call default ai with classic ai type as parameter.

Definition at line 306 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_unit_init()

static void cai_unit_init ( struct unit punit)
static

Call default ai with classic ai type as parameter.

Definition at line 296 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_unit_load()

static void cai_unit_load ( const struct section_file file,
struct unit punit,
const char unitstr 
)
static

Call default ai with classic ai type as parameter.

Definition at line 389 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_unit_log()

static void cai_unit_log ( char buffer,
int  buflength,
const struct unit punit 
)
static

Call default ai with classic ai type as parameter.

Definition at line 542 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_unit_move_or_attack()

static void cai_unit_move_or_attack ( struct unit punit,
struct tile ptile,
struct pf_path path,
int  step 
)
static

Call default ai with classic ai type as parameter.

Definition at line 356 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_unit_new_adv_task()

static void cai_unit_new_adv_task ( struct unit punit,
enum adv_unit_task  task,
struct tile ptile 
)
static

Call default ai with classic ai type as parameter.

Definition at line 367 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_unit_save()

static void cai_unit_save ( struct section_file file,
const struct unit punit,
const char unitstr 
)
static

Call default ai with classic ai type as parameter.

Definition at line 378 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_unit_turn_end()

static void cai_unit_turn_end ( struct unit punit)
static

Call default ai with classic ai type as parameter.

Definition at line 346 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_units_ruleset_close()

static void cai_units_ruleset_close ( void  )
static

Call default ai with classic ai type as parameter.

Definition at line 286 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_units_ruleset_init()

static void cai_units_ruleset_init ( void  )
static

Call default ai with classic ai type as parameter.

Definition at line 276 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ cai_wonder_city_distance()

static void cai_wonder_city_distance ( struct player pplayer,
struct adv_data adv 
)
static

Call default ai with classic ai type as parameter.

Definition at line 235 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ classic_ai_get_self()

static struct ai_type * classic_ai_get_self ( void  )
static

◆ classic_ai_set_self()

static void classic_ai_set_self ( struct ai_type ai)
static

Set pointer to ai type of the classic ai.

Definition at line 50 of file classicai.c.

Referenced by fc_ai_classic_setup().

◆ fc_ai_classic_capstr()

const char * fc_ai_classic_capstr ( void  )

Return module capability string

Definition at line 66 of file classicai.c.

◆ fc_ai_classic_setup()

bool fc_ai_classic_setup ( struct ai_type ai)

Setup player ai_funcs function pointers.

Definition at line 594 of file classicai.c.

Referenced by ai_init().

Variable Documentation

◆ self

struct ai_type* self = NULL
static

Definition at line 45 of file classicai.c.

Referenced by api_edit_unit_hitpoints(), api_edit_unit_movepoints(), api_methods_city_inspire_partisans(), api_methods_tile_known(), api_methods_tile_seen(), api_methods_unit_seen(), 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_Direction_properties_cardinal00(), 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_infrapoints00(), 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_known00(), 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_seen00(), 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_seen00(), 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_Game_Info_Game_Info_base_tech_cost(), tolua_get_Game_Info_Game_Info_min_tech_cost(), tolua_get_Game_Info_Game_Info_sciencebox(), tolua_get_Game_Info_Game_Info_tech_leak_pct(), tolua_get_Game_Info_Game_Info_tech_loss_allow_holes(), tolua_get_Game_Info_Game_Info_tech_parasite_allow_holes(), tolua_get_Game_Info_Game_Info_tech_steal_allow_holes(), tolua_get_Game_Info_Game_Info_tech_trade_allow_holes(), tolua_get_Game_Info_Game_Info_tech_trade_loss_allow_holes(), 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_cost(), 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_add_hitpoints00(), tolua_server_edit_unit_add_movepoints00(), tolua_server_edit_unit_kill00(), tolua_server_edit_unit_move00(), tolua_server_edit_unit_teleport00(), 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().