Freeciv-3.1
Loading...
Searching...
No Matches
Functions
aihand.h File Reference
#include "fc_types.h"

Go to the source code of this file.

Functions

void dai_do_first_activities (struct ai_type *ait, struct player *pplayer)
 
void dai_do_last_activities (struct ai_type *ait, struct player *pplayer)
 
void dai_calc_data (const struct player *pplayer, int *trade, int *expenses, int *income)
 

Function Documentation

◆ dai_calc_data()

void dai_calc_data ( const struct player pplayer,
int *  trade,
int *  expenses,
int *  income 
)

Returns the total amount of trade generated (trade), total amount of gold needed as upkeep (expenses), and total amount of gold gained (income).

Definition at line 118 of file aihand.c.

Referenced by dai_action_value_unit_vs_city(), dai_choose_diplomat_offensive(), dai_diplomat_bribe_nearby(), dai_manage_taxes(), dai_spend_gold(), dai_upgrade_units(), and find_city_to_diplomat().

◆ dai_do_first_activities()

void dai_do_first_activities ( struct ai_type ait,
struct player pplayer 
)

Activities to be done by AI before human turn. Here we just move the units intelligently.

Definition at line 749 of file aihand.c.

Referenced by cai_do_first_activities(), texwai_first_activities(), and twai_first_activities().

◆ dai_do_last_activities()

void dai_do_last_activities ( struct ai_type ait,
struct player pplayer 
)

Activities to be done by AI after human turn. Here we respond to dangers created by human and AI opposition by ordering defenders in cities and setting taxes accordingly. We also do other duties.

We do not move units here, otherwise humans complain that AI moves twice.

Definition at line 775 of file aihand.c.

Referenced by cai_do_last_activities(), texwai_last_activities(), and twai_last_activities().