Freeciv21
Develop your civilization from humble roots to a global empire
daidomestic.cpp File Reference
#include "log.h"
#include "city.h"
#include "game.h"
#include "government.h"
#include "movement.h"
#include "traderoutes.h"
#include "unit.h"
#include "unitlist.h"
#include "unittype.h"
#include "pf_tools.h"
#include "citytools.h"
#include "srv_log.h"
#include "unittools.h"
#include "advbuilding.h"
#include "advchoice.h"
#include "advdata.h"
#include "infracache.h"
#include "aitraits.h"
#include "handicaps.h"
#include "aidata.h"
#include "ailog.h"
#include "aiplayer.h"
#include "aitech.h"
#include "aitools.h"
#include "daicity.h"
#include "daidomestic.h"
+ Include dependency graph for daidomestic.cpp:

Go to the source code of this file.

Functions

static void dai_choose_help_wonder (struct ai_type *ait, struct city *pcity, struct adv_choice *choice, struct adv_data *ai)
 Evaluate the need for units (like caravans) that aid wonder construction. More...
 
static void dai_choose_trade_route (struct ai_type *ait, struct city *pcity, struct adv_choice *choice, struct adv_data *ai)
 Evaluate the need for units (like caravans) that create trade routes. More...
 
struct adv_choicedomestic_advisor_choose_build (struct ai_type *ait, struct player *pplayer, struct city *pcity)
 This function should fill the supplied choice structure. More...
 
void dai_wonder_city_distance (struct ai_type *ait, struct player *pplayer, struct adv_data *adv)
 Calculate walking distances to wonder city from nearby cities. More...
 

Function Documentation

◆ dai_choose_help_wonder()

static void dai_choose_help_wonder ( struct ai_type ait,
struct city pcity,
struct adv_choice choice,
struct adv_data ai 
)
static

Evaluate the need for units (like caravans) that aid wonder construction.

If another city is building wonder and needs help but pplayer is not advanced enough to build caravans, the corresponding tech will be stimulated.

Definition at line 60 of file daidomestic.cpp.

Referenced by domestic_advisor_choose_build().

◆ dai_choose_trade_route()

static void dai_choose_trade_route ( struct ai_type ait,
struct city pcity,
struct adv_choice choice,
struct adv_data ai 
)
static

Evaluate the need for units (like caravans) that create trade routes.

If pplayer is not advanced enough to build caravans, the corresponding tech will be stimulated.

Definition at line 162 of file daidomestic.cpp.

Referenced by domestic_advisor_choose_build().

◆ dai_wonder_city_distance()

void dai_wonder_city_distance ( struct ai_type ait,
struct player pplayer,
struct adv_data adv 
)

Calculate walking distances to wonder city from nearby cities.

Definition at line 579 of file daidomestic.cpp.

Referenced by cai_wonder_city_distance(), texwai_wonder_city_distance(), and twai_wonder_city_distance().

◆ domestic_advisor_choose_build()

struct adv_choice* domestic_advisor_choose_build ( struct ai_type ait,
struct player pplayer,
struct city pcity 
)

This function should fill the supplied choice structure.

If want is 0, this advisor doesn't want anything.

Definition at line 423 of file daidomestic.cpp.

Referenced by dai_city_choose_build().