Freeciv-3.1: /fast/freeciv/nightly/S3_1/server/advisors/advbuilding.c File Reference

Freeciv-3.1

Loading...
Searching...
No Matches
Functions
advbuilding.c File Reference
`#include "rand.h"`
`#include "ai.h"`
`#include "city.h"`
`#include "effects.h"`
`#include "game.h"`
`#include "movement.h"`
`#include "player.h"`
`#include "specialist.h"`
`#include "path_finding.h"`
`#include "pf_tools.h"`
`#include "citytools.h"`
`#include "plrhand.h"`
`#include "srv_log.h"`
`#include "advdata.h"`
`#include "advtools.h"`
`#include "infracache.h"`
`#include "handicaps.h"`
`#include "advbuilding.h"`

Go to the source code of this file.

## Functions

static void | calculate_city_clusters (struct player *pplayer)
static void | ba_human_wants (struct player *pplayer, struct city *wonder_city)
void | building_advisor (struct player *pplayer)
void | building_advisor_choose (struct city *pcity, struct adv_choice *choice)
void | advisor_choose_build (struct player *pplayer, struct city *pcity)

## Function Documentation

## ◆ advisor_choose_build()

void advisor_choose_build | ( | struct player * | pplayer,
|  | struct city * | pcity
| ) |  |

Setup improvement building

Definition at line 320 of file advbuilding.c.

Referenced by choose_build_target(), and transfer_city().

## ◆ ba_human_wants()

static void ba_human_wants | ( | struct player * | pplayer,
|  | struct city * | wonder_city
| ) |  |

static

Set building wants for human player

Definition at line 120 of file advbuilding.c.

Referenced by building_advisor().

## ◆ building_advisor()

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

Prime pcity->server.adv.building_want[]

Definition at line 180 of file advbuilding.c.

Referenced by begin_phase(), dai_manage_cities(), sg_load_sanitycheck(), and sg_load_sanitycheck().

## ◆ building_advisor_choose()

void building_advisor_choose | ( | struct city * | pcity,
|  | struct adv_choice * | choice
| ) |  |

Choose improvement we like most and put it into adv_choice.

Definition at line 278 of file advbuilding.c.

Referenced by advisor_choose_build(), and domestic_advisor_choose_build().

## ◆ calculate_city_clusters()

static void calculate_city_clusters | ( | struct player * | pplayer | ) |

static

Calculate walking distance to nearest friendly cities from every city.

The hidden assumption here is that a ACTION_HELP_WONDER unit is like any other unit that will use this data.

pcity->server.adv->downtown is set to the number of cities within 4 turns of the best help wonder unit we can currently produce.

Definition at line 58 of file advbuilding.c.

Referenced by building_advisor().