Project

General

Profile

Bug #2106 » 0041-random_movements-Correct-attack-legality-check.patch

main - Marko Lindqvist, 08/01/2026 10:07 AM

View differences:

server/unittools.c
struct tile *dest = mapstep(&(wld.map), curtile, dirs[choice]);
if (dest != nullptr) {
if (action_prob_possible(action_prob_vs_stack(nmap, punit, ACTION_ATTACK,
dest))) {
if (is_action_enabled_unit_on_stack(nmap, ACTION_ATTACK, punit, dest)) {
if (unit_perform_action(pplayer, id, tile_index(dest), NO_TARGET,
"", ACTION_ATTACK, ACT_REQ_RULES)) {
moved = TRUE;
(1-1/2)