URL:
<http://gna.org/patch/?5471>
Summary: Build defensive unit even if defensive building not
good
Project: Freeciv
Submitted by: cazfi
Submitted on: Fri 28 Nov 2014 07:04:44 AM EET
Category: ai
Priority: 5 - Normal
Status: In Progress
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: 2.6.0
_______________________________________________________
Details:
AI code has always wanted to build defensive building (City Walls) first, and
only then units behind.
We've already changed that so that it builds one unit first - there's no
benefits from City Walls if there's nobody behind it.
But ignoring the first unit case, AI won't build defensive units before it has
built City Walls (& other available defense buildings). I've got debug traces
where AI would *want* the defensive unit, but for some reason does not want
the City Walls (this might be a bug in itself, but that's not important here),
so it builds neither.
Attached patch makes AI to consider both the defensive building and defensive
unit, and to build better one. Some testing is needed to make sure it doesn't
prefer units over buildings when irt should not -> we may need to change this
so that it considers units only when it had absolutely no want for the
building.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Fri 28 Nov 2014 07:04:44 AM EET Name: UnitIfNotBuilding.patch Size:
3kB By: cazfi
<http://gna.org/patch/download.php?file_id=22994>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?5471>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev