URL:
<http://gna.org/patch/?3672>
Summary: Select "CanFortify"defender
Project: Freeciv
Submitted by: cazfi
Submitted on: Wed 06 Feb 2013 06:11:28 AM EET
Category: ai
Priority: 5 - Normal
Status: Ready For Test
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Planned Release: 2.4.0, 2.5.0
_______________________________________________________
Details:
Introduce new get_fortified_defense_power() function.
Unlike get_total_defense_power() it can be called with NULL attacker. Unlike
get_defense_power() it takes defense_multiplication() bonuses in to account.
Changed AI defender assessing to use this new function instead of
get_defense_power(). As attacker is not known, get_total_defense_power()
couldn't be used.
In practice this means that unit's ability to fortify is taken in to account.
Of otherwise equal units one with "CanFortify" flag would get better score as
it would get fortified bonus.
The other bonus applied by defense_multiplication() in case of NULL attacker
is extras (bases & roads) bonuses. It's not important at the moment (bases are
never inside city and this is ever called for city defenders only, roads
usually have no defense bonus) but it turns more important once rivers are
handled as road types.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 06 Feb 2013 06:11:28 AM EET Name: AiCanFortifyDefense.patch Size:
2kB By: cazfi
<http://gna.org/patch/download.php?file_id=17142>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?3672>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev