URL:
  <http://gna.org/bugs/?20504>

                 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
                 Release: 
         Discussion Lock: Any
        Operating System: None
         Planned Release: 

    _______________________________________________________

Details:

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:

  <http://gna.org/bugs/?20504>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to