Project

General

Profile

Actions

Bug #2484

open

AI: find_rampage_target() never takes an empty enemy city

Added by Sweet Tea Dorminy 14 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
AI
Target version:
Start date:
11/15/2026
Due date:
% Done:

0%

Estimated time:

Description

dai_rampage_want() rates an empty enemy city at exactly RAMPAGE_FREE_CITY_OR_BETTER (99999), and some callers pass that value as thresh_move. find_rampage_target() accepts only want > thresh, not want >= thresh. So bodyguards, city defenders, units recovering hit points and landed paratroopers walk past an empty enemy city one move away.

The constant names ("_OR_BETTER") read as inclusive, and strict > dates from 2003.

Attached patch tests want >= thresh. "Nothing" is want 0, so RAMPAGE_ANYTHING (1) still means any positive want. main has its own patch; S3_3 and S3_2 share one (a comment line differs by trailing whitespace).


Files

No data to display

Actions

Also available in: Atom PDF