Project

General

Profile

Actions

Bug #2454

open

ai: city site scoring values hills less than grassland

Added by Sweet Tea Dorminy 3 days ago.

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

0%

Estimated time:

Description

result_defense_bonus() in daisettler.c is (int) 100 / (result->total + 1) * (100 / defense_bonus * DEFENSE_EMPHASIS), but needs to be a little more subtle:

The first factor is 0 for any site worth more than 99, which is every site the AI actually considers, so the defence term has been contributing nothing.

On the (currently unconsidered) sites where it survives, it goes the wrong way as defence grows (total 50: grassland 200, hills 120, mountains 100), the opposite of the comment above it.

Patch makes it a share of the site total growing with the bonus, like naval_bonus() does: at total 500, grassland 0, forest 20, hills 50, mountains 100. Rivers and other extras count through the same bonus.


Files

No data to display

Actions

Also available in: Atom PDF