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

Freeciv-3.2

Loading...
Searching...
No Matches
Functions
aitech.h File Reference
`#include "fc_types.h"`
`#include "unittype.h"`

Go to the source code of this file.

## Functions

void | dai_manage_tech (struct ai_type *ait, struct player *pplayer)
void | dai_clear_tech_wants (struct ai_type *ait, struct player *pplayer)
void | dai_next_tech_goal (struct player *pplayer)
struct unit_type * | dai_wants_role_unit (struct ai_type *ait, struct player *pplayer, struct city *pcity, int role, int want)
struct unit_type * | dai_wants_defender_against (struct ai_type *ait, struct player *pplayer, struct city *pcity, const struct unit_type *att, int want)

## Function Documentation

## ◆ dai_clear_tech_wants()

void dai_clear_tech_wants | ( | struct ai_type * | ait,
|  | struct player * | pplayer
| ) |  |

Zero player tech wants

Definition at line 611 of file aitech.c.

Referenced by dai_do_last_activities().

## ◆ dai_manage_tech()

void dai_manage_tech | ( | struct ai_type * | ait,
|  | struct player * | pplayer
| ) |  |

Key AI research function. Disable if we are in a team with human team mates in a research pool.

Definition at line 335 of file aitech.c.

Referenced by dai_do_last_activities().

## ◆ dai_next_tech_goal()

void dai_next_tech_goal | ( | struct player * | pplayer | ) |

## ◆ dai_wants_defender_against()

struct unit_type * dai_wants_defender_against | ( | struct ai_type * | ait,
|  | struct player * | pplayer,
|  | struct city * | pcity,
|  | const struct unit_type * | att,
|  | int | want
| ) |  |

Returns the best defense multiplier unit we can build, or NULL if none. Assigns tech wants for techs to get better units, but only for the cheapest to research.

Definition at line 390 of file aitech.c.

Referenced by assess_danger().

## ◆ dai_wants_role_unit()

struct unit_type * dai_wants_role_unit | ( | struct ai_type * | ait,
|  | struct player * | pplayer,
|  | struct city * | pcity,
|  | int | role,
|  | int | want
| ) |  |

Returns the best unit we can build, or NULL if none. "Best" here means last in the unit list as defined in the ruleset. Assigns tech wants for techs to get better units with given role, but only for the cheapest to research "next" unit up the "chain".

Definition at line 521 of file aitech.c.

Referenced by dai_choose_help_wonder(), dai_choose_role_unit(), dai_choose_trade_route(), and domestic_advisor_choose_build().