Complete.Org: Mailing Lists: Archives: freeciv-ai: August 2002:
[freeciv-ai] coreai: reinforcements ()

[freeciv-ai] coreai: reinforcements ()

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-ai@xxxxxxxxxxx
Subject: [freeciv-ai] coreai: reinforcements ()
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Wed, 28 Aug 2002 18:23:07 +0000 (GMT)

Here I follow most of Ross' cleanup and go a little further, in that I
"inline" some small code that is only used once from a function for easier
readability (removing city_reinforcements_cost_and_value). In the same
function, I disagree with this

+  /* Add a basic city cost, i.e. SETTLERS + 20 per extra pop
+   * This insures that even empty cities have value.
+  */
+  pcity->ai.bcost += (pcity->size + 1) * 20;

I think this is a misunderstanding of what pcity->ai.bcost is all about
for hostile cities (which this sets). It is the value of attacking units,
not of the city or its defenders.


Attachment: coreai7.diff
Description: Text document

[Prev in Thread] Current Thread [Next in Thread]