Opened 8 years ago

Last modified 7 months ago

#1847 new enhancement

[PATCH] Attack Move Enhancements

Reported by: Jonathan Waller Owned by:
Priority: Should Have Milestone: Backlog
Component: Core engine Keywords: ui, attack move patch
Cc: Patch:

Description (last modified by Imarok)

When the cursor is over the minimap the cursor is the standard one not the attack cursor.

A UI button should be added, similar to the garrison button. A hotkey which when pressed works identically to the button would be good as well, as an alternative to the key/mouse chord.

It would be nice to randomize the attack targets a bit for each unit. This would prevent lots of focus fire and overkill (when 20 arrows hit a unit a lot of the damage is wasted since the first 10 arrows killed it).

Attachments (1)

attack-move-v4.diff (8.2 KB ) - added by mimo 8 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 by Jonathan Waller, 8 years ago

Description: modified (diff)

comment:2 by historic_bruno, 8 years ago

I think a different action cursor would help distinguish attack-move from attack.

Also, there's no AltGr key on US keyboards and there doesn't seem to be an equivalent combination (tested in Win 7/x64). Could we use Alt instead for one of these hotkeys?

comment:3 by Jonathan Waller, 8 years ago

In 13207:

Use attack move icon as a cursor. Refs #1847.

in reply to:  description comment:4 by mimo, 8 years ago

Replying to quantumstate:

It would be nice to randomize the attack targets a bit for each unit. This would prevent lots of focus fire and overkill (when 20 arrows hit a unit a lot of the damage is wasted since the first 10 arrows killed it).

In the previous version of the patch, there was only one target for the whole formation. The idea was that it is better to concentrate the attack on a few targets and kill them quickly than scatter it on several targets which will only be injured and able to respond. But I fully agree that having too much units targeting only one is overkill.

I've now a wip version where each unit of the formation may have its own target. See the patch attached. It works quite well, but I'm not fully happy because it may give too much tagets at the same time, thus loosing the advantage of killing quickly some ennemy units to decrease its firepower.

A solution I would propose is to change a bit the way the targets are sorted in Attack.js : presently only the index of the preferred class is used, so a small integer p. When the unit belongs to a formation, we could modify this by adding some penalty depending on the number of units from the formation which are already targeting the target. So if p is the present preference of a target, we could use as new preference

2*p if not already targeted (or if target is a building)

2*p-1 if already between 1 and 6 units targeting it, so that gives preference to attack a target already under attack

2*p+1 if already between 7 and 12 units, thus reluctance to attack with too much units

2*p+3 if already more then 13 units, thus when too much units, preference to attack even one class above which is at 2*p+2

Let me know what you think of such solution

by mimo, 8 years ago

Attachment: attack-move-v4.diff added

comment:5 by stanislas69, 6 years ago

Keywords: review patch added
Summary: Attack Move Enhancements[PATCH] Attack Move Enhancements

Sorry to add things to your review queue but it seems it was forgotten.

comment:6 by Itms, 6 years ago

This patch is completely outdated, naturally. mimo, are you willing to update it or do you want to backlog it and let someone else continue that?

comment:7 by mimo, 6 years ago

Keywords: review removed
Owner: mimo removed

Yes, it's been a long time, and I do not know anymore the details of this patch.

comment:8 by Imarok, 7 months ago

Description: modified (diff)

In r23619: Show correct action cursor over minimap.

Note: See TracTickets for help on using tickets.