Project

General

Profile

Bug #1242 » 1242_3_1_patch.diff

Dean Brown, 02/18/2025 07:17 AM

View differences:

ai/default/aiunit.c
CHECK_UNIT(punit);
if (can_unit_attack_tile(punit, NULL, ptile)
&& (pdef = get_defender(nmap, punit, ptile))) {
&& (pdef = get_defender(nmap, punit, ptile))
/* action enablers might prevent attacking */
&& is_action_enabled_unit_on_units(nmap, ACTION_ATTACK,
punit, ptile)) {
/* See description of kill_desire() about these variables. */
int attack = unit_att_rating_now(punit);
int benefit = stack_cost(punit, pdef);
(3-3/4)