patchFreeciv - Patches: patch #3808, Fast units avoid autoattack

Show feedback again

patch #3808: Fast units avoid autoattack

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Thu Mar 28 05:46:12 2013  
Category: generalPriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Planned Release: Contains string changes: None

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Thu Mar 28 13:27:06 2013, comment #3:

My apologies: I misunderstood the intent. My concern is that I would like autoattack to do something, even slow units autoattacking fast units. Not having autoattack happen mid-turn before the attacking unit actually attacks improves the tactical flexibility (one no longer needs to send defensively-oriented units to be attacked prior to calling in the cavalry, and may more quickly (and safely) infiltrate territory with spies). But in such a case, auto-attack should happen at the start of the new turn or during turn change, unless the faster unit has moved away during the original turn, otherwise it becomes easy to use a fast unit to attack during one turn, and then immediately retreat so that the autoattacking unit was unable to respond (even manually) (or just attack many times, given movement from two turns in which to do so, assuming enough is reserved to avoid the autoattack limit).

In the Fighter/Bomber case, allowing fighters to always autoattack means that bombers approaching cities with fighters would usually die. making bombing runs very expensive. Allowing autoattack only during turn change means that Bombers could safely overfly (well, adjacent) defended areas or safely drop their payloads, but having dropped bombs would be subject to retaliation (quite possibly dying), making bombers useful again, although perhaps still expensive against protected cities (as is the case in no-autoattack games where players cannot double-move either by agreement or use of phasemode to provide restrictions).

With the current proposed implementation, it also significantly downgrades the functional manueverability of IgTer units: while they could outpace move_rate=2 units in many environments previously, and would sometimes be used in an Attack Fast manner, the move count reckoning would imply they were tired at 2/3 move, while in practice the unit has plenty of energy to go away if they had not intended to attack, or complete an attack within their turn rather than being used for siege.

Emmet Hikory <persia>
Project Member
Thu Mar 28 09:00:48 2013, comment #2:

The problem I'm trying to find answer with this patch relates to turn-based nature of freeciv, not to combat abilities of the units. That is, autoattack should not happen when it's still turn of the approaching unit.

You should consider the reason "autoattack" exist. I don't know if it's the universal answer, but we (people I play with) have now enabled it to give defender some protection against so called double-moves in our turn / day games. We don't want to have any trust based rules to forbid double-moves as that would slow down game even further (one couldn't play next turn immediately if he was last one to finish previous turn and thus initiated turn change). However, fast units should be able to both approach and attack within their turn without being killed midway by autoattack.

Futher complication is that Fighters are completely useless against Bombers without autoattack. Bomber would come and go and Fighter would just wait on the airport for player's commands (and player is nowhere near his home, less so his computer) Fighters should be able to autoattack approaching Bombers regarless of how much moves Bomber has left.

Marko Lindqvist <cazfi>
Project Administrator
Thu Mar 28 07:59:44 2013, comment #1:

Rather than being an absolute measure of the ability of the threatening unit to get away, could this be a measure of difference between threatening unit and auto-attacking unit? For example, in the default ruleset, untired Horsemen should clearly be able to dance away from even Riflemen, but an Armor shouldn't be able to avoid an auto-attack Stealth Fighter. Roads are another complicating factor: should an untired Cavalry be able to escape Alpine Troops in unimproved terrain? How about if the road is only native to the AutoAttacking unit?

Emmet Hikory <persia>
Project Member
Thu Mar 28 05:46:12 2013, original submission:

Turn autoattack setting from boolean to integer telling how fast & nontired units autoattack is possible. Attack is possible against units that have at most this setting * 1/3 movement left.
This can be used to give fast units some edge over slower ones. For instance value 2 means that move rate 1 units (3 * 1/3) can always be attacked when they have moved next to autoattacker, while move rate 2 units couldn't if they use just their first movement point (6 - 3 = 3) to get there.

This patch is still missing handling of old savegames where setting was boolean. This requires resolving of bug #20667 first

Marko Lindqvist <cazfi>
Project Administrator


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #17570:  AutoattackSlow.patch added by cazfi (3kB - text/x-diff)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by persia (Posted a comment)
  • -unavailable- added by cazfi (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Jan 21 07:08:19 2016cazfiPlanned Release2.6.0=>
    Mon Apr 1 22:41:14 2013cazfiStatusIn Progress=>None
    Thu Mar 28 05:46:12 2013cazfiAttached File-=>Added AutoattackSlow.patch, #17570
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup