URL:
<http://gna.org/patch/?2592>
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:
_______________________________________________________
Details:
This post is mirrored on the forum
<http://forum.freeciv.org/viewtopic.php?t=6724>.
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
turn.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 09 Mar 2011 09:18:31 PM GMT Name: autoretreat.diff Size: 10kB
By: milesdlh
Patch on svn revision 19509
<http://gna.org/patch/download.php?file_id=12649>
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?2592>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev