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

Freeciv-3.2

Loading...
Searching...
No Matches
Functions
daieffects.h File Reference

Go to the source code of this file.

## Functions

adv_want | dai_effect_value (struct player *pplayer, const struct adv_data *adv, const struct city *pcity, const bool capital, int turns, const struct effect *peffect, const int c, const int nplayers)
adv_want | dai_content_effect_value (const struct player *pplayer, const struct city *pcity, int amount, int num_cities, int happiness_step)
bool | dai_can_requirement_be_met_in_city (const struct requirement *preq, const struct player *pplayer, const struct city *pcity)

## Function Documentation

## ◆ dai_can_requirement_be_met_in_city()

bool dai_can_requirement_be_met_in_city | ( | const struct requirement * | preq,
|  | const struct player * | pplayer,
|  | const struct city * | pcity
| ) |  |

Does the AI expect to ever be able to meet this requirement.

The return value of this function is unreliable for requirements that are currently active: the caller should only call this function to determine if a currently inactive requirement could be met in the future.

City may be NULL, so request pplayer separately.

Definition at line 782 of file daieffects.c.

Referenced by adjust_improvement_wants_by_effects(), dai_can_requirement_be_met_in_city(), dai_wants_defender_against(), and utype_needs_improvement().

## ◆ dai_content_effect_value()

adv_want dai_content_effect_value | ( | const struct player * | pplayer,
|  | const struct city * | pcity,
|  | int | amount,
|  | int | num_cities,
|  | int | happiness_step
| ) |  |

How desirable particular effect making people content is for a particular city?

Definition at line 77 of file daieffects.c.

Referenced by dai_effect_value(), and military_advisor_choose_build().

## ◆ dai_effect_value()

adv_want dai_effect_value | ( | struct player * | pplayer,
|  | const struct adv_data * | adv,
|  | const struct city * | pcity,
|  | const bool | capital,
|  | int | turns,
|  | const struct effect * | peffect,
|  | const int | c,
|  | const int | nplayers
| ) |  |

How desirable is a particular effect for a particular city, given the number of cities in range (c).

Definition at line 138 of file daieffects.c.

Referenced by adjust_improvement_wants_by_effects(), dai_gov_value(), and dai_tech_effect_values().