Project

General

Profile

Feature #1226 ยป 0031-AI-Pass-civ_map-to-dai_choose_paratrooper.patch

Marko Lindqvist, 01/27/2025 11:47 PM

View differences:

ai/default/daimilitary.c
allow_gold_upkeep);
/* Consider making a paratrooper */
dai_choose_paratrooper(ait, pplayer, pcity, choice, allow_gold_upkeep);
dai_choose_paratrooper(ait, nmap, pplayer, pcity, choice, allow_gold_upkeep);
/* Check if we want a sailing attacker. Have to put sailing first
before we mung the seamap */
ai/default/daiparadrop.c
/*************************************************************************//**
Chooses to build a paratroopers if necessary
*****************************************************************************/
void dai_choose_paratrooper(struct ai_type *ait,
void dai_choose_paratrooper(struct ai_type *ait, const struct civ_map *nmap,
struct player *pplayer, struct city *pcity,
struct adv_choice *choice, bool allow_gold_upkeep)
{
const struct research *presearch = research_get(pplayer);
int profit;
struct ai_plr *plr_data = def_ai_player_data(pplayer, ait);
const struct civ_map *nmap = &(wld.map);
/* military_advisor_choose_build() does something idiotic,
* this function should not be called if there is danger... */
ai/default/daiparadrop.h
void dai_manage_paratrooper(struct ai_type *ait, struct player *pplayer,
struct unit *punit);
void dai_choose_paratrooper(struct ai_type *ait, struct player *pplayer,
void dai_choose_paratrooper(struct ai_type *ait, const struct civ_map *nmap,
struct player *pplayer,
struct city *pcity, struct adv_choice *choice,
bool allow_gold_upkeep);
    (1-1/1)