Feature #2041 ยป 0036-AI-Enable-rampage-when-unit-can-do-Nuke-Tile-with-ci.patch
| ai/default/daiunit.c | ||
|---|---|---|
|
enum action_target_kind *kind)
|
||
|
{
|
||
|
enum gen_action selected;
|
||
|
struct city *pcity;
|
||
|
if ((selected = select_actres_action_unit_on_stack(nmap, ACTRES_CAPTURE_UNITS,
|
||
|
punit, ptile))
|
||
| ... | ... | |
|
return selected;
|
||
|
}
|
||
|
pcity = tile_city(ptile);
|
||
|
if (pcity != nullptr) {
|
||
|
if ((selected = select_actres_action_unit_on_city(nmap, ACTRES_NUKE,
|
||
|
punit, pcity))
|
||
|
!= ACTION_NONE) {
|
||
|
if (kind != nullptr) {
|
||
|
*kind = ATK_CITY;
|
||
|
}
|
||
|
return selected;
|
||
|
}
|
||
|
}
|
||
|
if ((selected = select_actres_action_unit_on_stack(nmap, ACTRES_ATTACK,
|
||
|
punit, ptile))
|
||
|
!= ACTION_NONE) {
|
||