Bug #1847 ยป 0045-dai_unit_attack-Handle-fake-generalized-versions-of-.patch
| ai/default/daitools.c | ||
|---|---|---|
|
/* Choose "Bombard Lethal". */
|
||
|
unit_do_action(unit_owner(punit), punit->id, tile_index(ptile),
|
||
|
0, "", ACTION_BOMBARD_LETHAL);
|
||
|
} else if (is_action_enabled_unit_on_stack(nmap, ACTION_BOMBARD_LETHAL2,
|
||
|
punit, ptile)) {
|
||
|
/* Choose "Bombard Lethal 2". */
|
||
|
unit_do_action(unit_owner(punit), punit->id, tile_index(ptile),
|
||
|
0, "", ACTION_BOMBARD_LETHAL2);
|
||
|
} else if (is_action_enabled_unit_on_stack(nmap, ACTION_BOMBARD,
|
||
|
punit, ptile)) {
|
||
|
/* Choose "Bombard". */
|
||
| ... | ... | |
|
/* Choose "Bombard 3". */
|
||
|
unit_do_action(unit_owner(punit), punit->id, tile_index(ptile),
|
||
|
0, "", ACTION_BOMBARD3);
|
||
|
} else if (is_action_enabled_unit_on_stack(nmap, ACTION_BOMBARD4,
|
||
|
punit, ptile)) {
|
||
|
/* Choose "Bombard 4". */
|
||
|
unit_do_action(unit_owner(punit), punit->id, tile_index(ptile),
|
||
|
0, "", ACTION_BOMBARD4);
|
||
|
} else if (is_action_enabled_unit_on_stack(nmap, ACTION_NUKE_UNITS,
|
||
|
punit, ptile)) {
|
||
|
/* Choose "Nuke Units". */
|
||
| ... | ... | |
|
/* Choose regular attack. */
|
||
|
unit_do_action(unit_owner(punit), punit->id, tile_index(ptile),
|
||
|
0, "", ACTION_ATTACK);
|
||
|
} else if (is_action_enabled_unit_on_stack(nmap, ACTION_ATTACK2,
|
||
|
punit, ptile)) {
|
||
|
/* Choose regular attack 2. */
|
||
|
unit_do_action(unit_owner(punit), punit->id, tile_index(ptile),
|
||
|
0, "", ACTION_ATTACK2);
|
||
|
} else if (is_action_enabled_unit_on_stack(nmap, ACTION_SUICIDE_ATTACK,
|
||
|
punit, ptile)) {
|
||
|
/* Choose suicide attack (explode missile). */
|
||
|
unit_do_action(unit_owner(punit), punit->id, tile_index(ptile),
|
||
|
0, "", ACTION_SUICIDE_ATTACK);
|
||
|
} else if (is_action_enabled_unit_on_stack(nmap, ACTION_SUICIDE_ATTACK2,
|
||
|
punit, ptile)) {
|
||
|
/* Choose suicide attack (explode missile) 2. */
|
||
|
unit_do_action(unit_owner(punit), punit->id, tile_index(ptile),
|
||
|
0, "", ACTION_SUICIDE_ATTACK2);
|
||
|
} else if ((tcity = tile_city(ptile))
|
||
|
&& is_action_enabled_unit_on_city(nmap, ACTION_CONQUER_CITY_SHRINK,
|
||
|
punit, tcity)) {
|
||