Freeciv-3.1: /fast/freeciv/nightly/S3_1/ai/aitraits.c File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Functions
aitraits.c File Reference
`#include "mem.h"`
`#include "rand.h"`
`#include "game.h"`
`#include "player.h"`
`#include "traits.h"`
`#include "aitraits.h"`

Go to the source code of this file.

## Functions

void | ai_traits_init (struct player *pplayer)
void | ai_traits_close (struct player *pplayer)
int | ai_trait_get_value (enum trait tr, struct player *pplayer)

## Function Documentation

## ◆ ai_trait_get_value()

int ai_trait_get_value | ( | enum trait | tr,
|  | struct player * | pplayer
| ) |  |

Get current value of player trait

Definition at line 68 of file aitraits.c.

Referenced by adjust_ai_unit_choice(), api_methods_player_trait(), dai_build_adv_adjust(), dai_choose_trade_route(), dai_diplomacy_actions(), dai_effect_value(), domestic_advisor_choose_build(), and military_advisor_choose_build().

## ◆ ai_traits_close()

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

Free resources associated with player ai traits.

Definition at line 58 of file aitraits.c.

Referenced by server_remove_player().

## ◆ ai_traits_init()

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

Initialize ai traits for player

Definition at line 32 of file aitraits.c.

Referenced by generate_players(), player_nation_defaults(), sg_load_player_main(), sg_load_player_main(), sg_load_players(), and sg_load_players().