Project

General

Profile

Feature #1205 ยป 0016-AI-Pass-civ_map-to-dai_choose_attacker_air.patch

Marko Lindqvist, 01/06/2025 08:12 AM

View differences:

ai/default/daiair.c
The interface is somewhat different from other ai_choose, but
that's what it should be like, I believe -- GB
**********************************************************************/
bool dai_choose_attacker_air(struct ai_type *ait, struct player *pplayer,
bool dai_choose_attacker_air(struct ai_type *ait, const struct civ_map *nmap,
struct player *pplayer,
struct city *pcity, struct adv_choice *choice,
bool allow_gold_upkeep)
{
bool want_something = FALSE;
const struct civ_map *nmap = &(wld.map);
/* This AI doesn't know how to build planes */
if (has_handicap(pplayer, H_NOPLANES)) {
ai/default/daiair.h
void dai_manage_airunit(struct ai_type *ait, struct player *pplayer,
struct unit *punit);
bool dai_choose_attacker_air(struct ai_type *ait, struct player *pplayer,
bool dai_choose_attacker_air(struct ai_type *ait, const struct civ_map *nmap,
struct player *pplayer,
struct city *pcity, struct adv_choice *choice,
bool allow_gold_upkeep);
ai/default/daimilitary.c
}
/* Consider making an airplane */
(void) dai_choose_attacker_air(ait, pplayer, pcity, choice, allow_gold_upkeep);
(void) dai_choose_attacker_air(ait, nmap, pplayer, pcity, choice,
allow_gold_upkeep);
/* Consider making a paratrooper */
dai_choose_paratrooper(ait, pplayer, pcity, choice, allow_gold_upkeep);
    (1-1/1)