Summary: City defenders rampaging
                 Project: Freeciv
            Submitted by: cazfi
            Submitted on: Wed 13 Feb 2013 05:34:25 AM EET
                Category: ai
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
        Operating System: None
         Planned Release: 



dai_military_defend() is supposed to handle unit assigned to defend a city,
including the case unit already is in that city and enemy is next to it.
dai_military_defend() calls dai_military_rampage() with parameters that denote
that any target is worth going after. This may mean that defender leaves the
city to kill target a couple of tiles away. So, if there's strong attacker
adjacent to city ready to enter, and weaker enemy further away, defender
leaves city defenseless for the strong attacker to take while it itself hunts
down the weaker enemy.

It also seems to me that even if there was no stronger attacker present, the
code would never draw the defender back to city. Once it's outside, it next
turn loses its DEFEND_HOME task and only units already inside city get that
task (re)assigned.


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to