Freeciv-3.2: /fast/freeciv/nightly/S3_2/ai/default/aihand.h File Reference

Freeciv-3.2

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 117 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 747 of file aihand.c.

Referenced by cai_do_first_activities(), and texwai_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 773 of file aihand.c.

Referenced by cai_do_last_activities(), and texwai_last_activities().