Summary: Server-side auto-retreat
                 Project: Freeciv
            Submitted by: milesdlh
            Submitted on: Wed 09 Mar 2011 09:18:31 PM GMT
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 



This post is mirrored on the forum

This is a patch I've been tinkering with which introduces an 'auto-retreat'
server option to parallel 'auto-attack'. The idea is to give obviously
vulnerable units the opportunity to withdraw to a nearby city or fort when
they have the moves to do so and would've been able to anticipate the attack
anyway. (Think: ironclads approaching engineers working coastal tiles.) 

Units will attempt to auto-retreat when an enemy enters an adjacent tile (and
survives any auto-attacks against it) that: 
1. has spare movement points, and 
2. 75% or better combat odds against the endangered tile. 

The endangered unit must: 
1. have spare movement points, 
2. not be fortified or fortifying, and 
3. not occupying a city or fort. 

Auto-retreating units will attempt to find a path to a "safe" tile reachable
in a single turn, preferring above all cities and forts, and immediately go
there. The unit's owner is notified so they know where their unit has gone.
Automated civilians stay automated; they will usually return to work next


File Attachments:

Date: Wed 09 Mar 2011 09:18:31 PM GMT  Name: autoretreat.diff  Size: 10kB  
By: milesdlh
Patch on svn revision 19509


Reply to this item at:


  Message sent via/by Gna!

Freeciv-dev mailing list

Reply via email to