Skip to content

Zero Hour rebuilt from EA's source: x64, Direct3D 11, VS2022/CMake, ~60 original bugs fixed, an AI that builds a base. Bring your own game.

feat(gameengine): split attack-line shots along the stroke

Olcay Seygan546b8b819263
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b5a9be01c..d8f4feb07 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -183,7 +183,7 @@ found and fixed — EA's own, not port damage.**
- A unit standing guard draws its marker on the ground it is guarding. A guard order clears the unit's goal on the way in, so every guard marker used to sit in the bottom left corner of the map with a thread running the whole way across it, whatever the unit was actually watching.
- A is attack and D is attack move, each arming the next order click. A click on the ground with A held down is a shot at that ground, on your own tank a shot at your own tank, and the mode drops again the moment the order goes out, so nothing stays armed behind your back. The click keeps your group, too: an attack click that was not a drag used to run the same deselect an ordinary left click runs, so the order arrived a moment after the units it was meant for had been dropped. Both orders are aimed with the left button, the way a special power is, and a right click puts the key down again without giving any order. Holding ctrl no longer forces fire: A is the one way to shoot the ground, and ctrl on a move is only the shared pace. The two keys turn each other off, and the letters they took were sitting on grid commands that moved.
- G is guard, armed the same way and aimed with the same left button. A left click posts the selection on that spot: they hold it, shoot what walks into range and do not chase it off the post you put them on. The cursor turns into the targeting cross while G is armed, so you can see the key is down before you click, and a right click puts it down again. Drag the left button with G armed (the right one draws nothing while G is down) and they post along the line you draw, one unit per station, which is how a hill or a bridge approach gets covered in one gesture instead of a click per tank. Guard has its own colour, blue, on the line while you draw it and on the thread and marker afterwards, so a group told to hold ground reads apart from one told to walk there. Hold position, which posts every unit on the spot it is already standing on, has moved to H.
-- With A armed, hold the left button and drag a circle instead: the enemies you can see inside it are split across the units that can shoot, as evenly as the numbers allow, in the order both sides stand around the circle. The tank on the left of your group takes the enemy on the left of theirs. Ten of yours against three of theirs put four guns on one and three on each of the others. Three of yours against ten of theirs each take a run of three or four and work down that run. One enemy, and every selected gun takes it. When a unit's target dies the next of its own goes out the same frame, so a strike group clears a circle without you clicking once per tank. It moves on from a target the group has stopped working on, too, rather than only from a dead one: something none of them can reach or hurt used to sit at the head of the list and hold every other target behind it for the rest of the match. That list is the same queue a shift-clicked attack builds, so you can see it: every target still owed has its own thread and marker, in the order they will be taken, instead of one line to whatever is being shot at this second. Hold shift while you draw the circle and its targets go on the end of what the group is already working through; draw it without shift and the circle replaces the lot. The ground inside the circle is washed the same red while you drag it, painted on the map rather than over it, so it runs up the hills inside the circle and your own tanks stand on top of it. Any order you give by hand ends the list. Losing a unit does not: the list belongs to the group that was told and carries on with whoever is left, which is worth saying because for a while it did not, and one tank dying threw away every target still owed. A target with enough of your fire already in the air to kill it counts as done, so the rest of the group takes the next thing on the list rather than emptying itself into something that is dead and has not fallen over yet. Aircraft are what this is for: a flight fires from range and the missiles are seconds behind, and four planes used to spend all four loads on the first tank in the circle. Running out of ammo does not cost you the list either. A flight that empties its racks flies home, lands, rearms and comes back to the target it left, and the queue waits for it instead of counting the trip as the group giving up: a circle drawn for four planes used to be empty by the time they were back in the air, one entry lost every two seconds they were away. The threads stay on the ground for the whole trip, too. A plane flying home has no target and no order to read, so the list it was still holding used to vanish off the map the moment it turned for base and reappear only when it was shooting again, which looks exactly like the list being thrown away. What the circle picks up is what you can shoot: a shell or a missile crossing it is on the enemy's side like everything else and used to go on the list as a target, costing the group a two second stall on something that was about to stop existing. A target that has driven into the shroud since you picked it keeps its place in the list but stops drawing its thread, so the line cannot be used to trace it through the fog. An attack-move queued behind other orders keeps the force fire it was given rather than losing it when the attack key drops. A line drawn with A works the same way now: every enemy the line is drawn across goes on the list, in the order the line crosses them, so the way you draw it is the way the group fights along it. It used to pour fire into the ground under the line and hit whatever happened to be standing there. A line that crosses nobody still fires on the ground along it.
+- With A armed, hold the left button and drag a circle instead: the enemies you can see inside it are split across the units that can shoot, as evenly as the numbers allow, in the order both sides stand around the circle. The tank on the left of your group takes the enemy on the left of theirs. Ten of yours against three of theirs put four guns on one and three on each of the others. Three of yours against ten of theirs each take a run of three or four and work down that run. One enemy, and every selected gun takes it. When a unit's target dies the next of its own goes out the same frame, so a strike group clears a circle without you clicking once per tank. It moves on from a target the group has stopped working on, too, rather than only from a dead one: something none of them can reach or hurt used to sit at the head of the list and hold every other target behind it for the rest of the match. That list is the same queue a shift-clicked attack builds, so you can see it: every target still owed has its own thread and marker, in the order they will be taken, instead of one line to whatever is being shot at this second. Hold shift while you draw the circle and its targets go on the end of what the group is already working through; draw it without shift and the circle replaces the lot. The ground inside the circle is washed the same red while you drag it, painted on the map rather than over it, so it runs up the hills inside the circle and your own tanks stand on top of it. Any order you give by hand ends the list. Losing a unit does not: the list belongs to the group that was told and carries on with whoever is left, which is worth saying because for a while it did not, and one tank dying threw away every target still owed. A target with enough of your fire already in the air to kill it counts as done, so the rest of the group takes the next thing on the list rather than emptying itself into something that is dead and has not fallen over yet. Aircraft are what this is for: a flight fires from range and the missiles are seconds behind, and four planes used to spend all four loads on the first tank in the circle. Running out of ammo does not cost you the list either. A flight that empties its racks flies home, lands, rearms and comes back to the target it left, and the queue waits for it instead of counting the trip as the group giving up: a circle drawn for four planes used to be empty by the time they were back in the air, one entry lost every two seconds they were away. The threads stay on the ground for the whole trip, too. A plane flying home has no target and no order to read, so the list it was still holding used to vanish off the map the moment it turned for base and reappear only when it was shooting again, which looks exactly like the list being thrown away. What the circle picks up is what you can shoot: a shell or a missile crossing it is on the enemy's side like everything else and used to go on the list as a target, costing the group a two second stall on something that was about to stop existing. A target that has driven into the shroud since you picked it keeps its place in the list but stops drawing its thread, so the line cannot be used to trace it through the fog. An attack-move queued behind other orders keeps the force fire it was given rather than losing it when the attack key drops. A stroke drawn across enemies splits them across the units that can shoot, as evenly as the numbers allow, in the order both sides stand along the stroke. The unit nearest the start takes the enemy nearest the start. Ten guns on three enemies put four on one and three on each of the others. Three guns on ten each work down a run of three or four. The whole group used to walk one list and pour every gun into each enemy in turn. Before that the line poured fire into the ground under it and hit whatever happened to be standing there. A stroke that crosses nobody still fires on the ground along it.
- Shift queues a guard as well, and it is where the line of orders stops. Hold shift with G armed and click, and the group takes up its post once it has finished everything queued in front of it: clear that ridge, then sit on it, in one set of clicks instead of standing over the fight waiting to give the last order. Nothing goes behind a guard, because a posted unit has no next place to be. The thread to the post is drawn in the guard colour like any other guard.
- Shift queues an attack now, not only a move. A or F held down while you shift-click adds a force-attack or an attack-move to the line of orders a group is already holding, and it fires the moment the order in front of it is finished - a target dead, or nobody left chasing an attack-move point. The coloured thread that shows a queued order covers it too, so a queue of "go here, then attack that, then attack-move over there" reads as one continuous line in three colours. The game's own white waypoint markings, which used to draw over the same ground the moment shift went down, are gone - they only ever duplicated what the coloured thread already showed, and doing both left a queued attack sitting under two different pictures of itself.
- The shift queue takes any mix of orders now and stays with the units you gave it to. Move, attack-move, attack a target, draw a formation line, then guard: hold shift, click them in whatever order you like, and the group works down the list by itself. Queue an army's whole route, select something else, go back to your base, and the army keeps going. Before, clicking anything else threw the list away. Each step also starts the moment the one before it is done. It used to wait for the order to travel to the other players and back, which on a 250ms connection was a quarter of a second standing still at every corner. The group keeps together: nobody starts the next order until everyone still alive has finished this one, so a column does not string out behind its fastest tank. Select part of a group and shift-click, and that part takes its own copy of the list with the new order on the end while the others carry on with theirs. Shift-click a group that is already on an ordinary move and the new point goes behind the move instead of replacing it.
diff --git a/GeneralsMD/Code/GameEngine/Include/Common/DrawnPath.h b/GeneralsMD/Code/GameEngine/Include/Common/DrawnPath.h
index e1e3c3c42..e40df666c 100644
--- a/GeneralsMD/Code/GameEngine/Include/Common/DrawnPath.h
+++ b/GeneralsMD/Code/GameEngine/Include/Common/DrawnPath.h
@@ -67,8 +67,14 @@ struct AttackAssignSlot
Real y;
};
-/// Who shoots, and which target in the sorted target list. Both indexes are into lists that
-/// orderAroundPoint has already sorted.
+/// The same order as the unit list above, for a position and an id. Nearest the start of the
+/// curve first, and the id breaks a tie. The attack line stands both the guns and the enemies
+/// this way.
+extern void orderAlongPath( std::vector<AttackAssignSlot>& slots, const std::vector<Coord3D>& path,
+ const std::vector<Real>& arc );
+
+/// Who shoots, and which target in the sorted target list. Both indexes are into lists already
+/// sorted the same way, around a circle or along a stroke.
struct AttackAssignPair
{
Int attacker;
@@ -81,7 +87,7 @@ struct AttackAssignPair
extern void orderAroundPoint( std::vector<AttackAssignSlot>& slots, Real centerX, Real centerY );
/// Pair attackers with targets so the counts differ by one at most. Both counts are the lengths
-/// of lists already stood around the same centre. With at least as many attackers as targets,
+/// of lists already sorted in the order the gesture drew. With at least as many attackers as targets,
/// each attacker takes one target and the extras share, in contiguous blocks. With more targets
/// than attackers, every target is still shot and each attacker queues a contiguous run of them.
/// Either side empty writes nothing.
diff --git a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
index 23a47a689..63cb76acc 100644
--- a/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
+++ b/GeneralsMD/Code/GameEngine/Include/GameClient/InGameUI.h
@@ -563,7 +563,7 @@ public: // ********************************************************************
void beginAttackCircle( const ICoord2D& pt );
void updateAttackCircle( const ICoord2D& pt );
Bool issueAttackCircle( void ); ///< FALSE when the press never became a drag, so it was an ordinary attack click
- Int issueAttackLine( const std::vector<Coord3D>& line ); ///< every enemy a line drawn with the attack key runs across, as a target list in line order
+ Int issueAttackLine( const std::vector<Coord3D>& line ); ///< enemies the stroke crosses, shared along it across the units that can shoot
Bool isAttackListTarget( const Object *obj, const Player *local ) const; ///< would the circle or the attack line take this
void cancelAttackCircle( void ) { m_isAttackCircling = FALSE; }
Bool isAttackCircling( void ) const { return m_isAttackCircling; }
diff --git a/GeneralsMD/Code/GameEngine/Source/Common/DrawnPath.cpp b/GeneralsMD/Code/GameEngine/Source/Common/DrawnPath.cpp
index 78e702099..b6aae36c9 100644
--- a/GeneralsMD/Code/GameEngine/Source/Common/DrawnPath.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/Common/DrawnPath.cpp
@@ -129,6 +129,39 @@ void orderAlongPath( std::vector<Object *>& movers, const std::vector<Coord3D>&
}
}
+//-------------------------------------------------------------------------------------------------
+void orderAlongPath( std::vector<AttackAssignSlot>& slots, const std::vector<Coord3D>& path,
+ const std::vector<Real>& arc )
+{
+ const Int count = (Int)slots.size();
+
+ std::vector<Real> keys;
+ keys.reserve( count );
+ for( Int i = 0; i < count; i++ )
+ keys.push_back( distanceAlongPath( path, arc, slots[ i ].x, slots[ i ].y ) );
+
+ // Same insertion sort as the unit list. A few dozen guns, a few hundred enemies on a stroke,
+ // and the comparator is a total order, so the answer does not depend on who was found first.
+ for( Int i = 1; i < count; i++ )
+ {
+ AttackAssignSlot held = slots[ i ];
+ const Real heldKey = keys[ i ];
+
+ Int j = i - 1;
+ while( j >= 0 )
+ {
+ if( keys[ j ] < heldKey || (keys[ j ] == heldKey && slots[ j ].id < held.id) )
+ break;
+ slots[ j + 1 ] = slots[ j ];
+ keys[ j + 1 ] = keys[ j ];
+ j--;
+ }
+
+ slots[ j + 1 ] = held;
+ keys[ j + 1 ] = heldKey;
+ }
+}
+
//-------------------------------------------------------------------------------------------------
/** Upper half, +x ray included, is 0. Lower half, -x ray included, is 1. The origin counts as
* the +x ray so a man standing on the centre sorts with the start of the sweep. */
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
index e73c85ba5..e87cddb7f 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp
@@ -5768,11 +5768,13 @@ Bool InGameUI::isAttackListTarget( const Object *obj, const Player *local ) cons
}
//-------------------------------------------------------------------------------------------------
-/** The line drawn with the attack key: every enemy it runs across goes on the target list, in the
- * order the line reaches it, so the direction it was drawn in is the direction the group fights
- * along. "Across" is the line passing over the object's own footprint, give or take a few feet for
- * a hand that is not steady. Returns how many targets went out; with none, the caller fires on
- * the ground along the line instead. */
+/** The line drawn with the attack key: every enemy it runs across is shared across the units that
+ * can shoot, in the order both sides stand along the stroke, nearest the start first. The shots
+ * are dealt the same way as the circle, so the counts differ by one at most, and each unit works
+ * down its own share. "Across" is the line passing over the object's own footprint, give or take
+ * a few feet for a hand that is not steady. Returns how many enemies the line crossed. With
+ * none, the caller fires on the ground along the line instead. Enemies that nobody selected can
+ * shoot still count, so the ground is not fired in their place. */
//-------------------------------------------------------------------------------------------------
Int InGameUI::issueAttackLine( const std::vector<Coord3D>& line )
{
@@ -5809,8 +5811,9 @@ Int InGameUI::issueAttackLine( const std::vector<Coord3D>& line )
ObjectIterator *iter = ThePartitionManager->iterateObjectsInRange( &center, reach, FROM_CENTER_2D, NULL );
MemoryPoolObjectHolder holder( iter );
- // how far along the line each target is, so they can go out in the order the line meets them
- std::vector< std::pair<Real, ObjectID> > targets;
+ // enemies the stroke actually crosses. who stands where along it is sorted afterwards, guns and
+ // enemies the same way, so the deal does not depend on the order the range query handed them over
+ std::vector<AttackAssignSlot> targets;
for( Object *obj = iter->first(); obj; obj = iter->next() )
{
if( !isAttackListTarget( obj, local ) )
@@ -5842,21 +5845,89 @@ Int InGameUI::issueAttackLine( const std::vector<Coord3D>& line )
}
if( along >= 0.0f )
- targets.push_back( std::make_pair( along, obj->getID() ) );
+ {
+ AttackAssignSlot slot;
+ slot.id = obj->getID();
+ slot.x = pos->x;
+ slot.y = pos->y;
+ targets.push_back( slot );
+ }
}
- std::sort( targets.begin(), targets.end() );
-
- for( size_t i = 0; i < targets.size(); ++i )
+ // who can actually shoot. a dozer standing in the selection is not given somebody else's target.
+ // a passenger whose transport is also selected is left out too: the transport's own order already
+ // tells everyone inside it to fire. the circle collects the same list.
+ std::vector<AttackAssignSlot> attackers;
+ std::vector<AttackAssignPair> pairs;
+ if( !targets.empty() )
{
- const Bool startsList = i == 0 && !isInWaypointMode();
- markNextOrderQueued( startsList ? ORDER_QUEUE_FRESH : ORDER_QUEUE_APPEND );
- GameMessage *attack = TheMessageStream->appendMessage( GameMessage::MSG_DO_ATTACK_OBJECT );
- attack->appendObjectIDArgument( targets[ i ].second );
+ const DrawableList *selected = getAllSelectedLocalDrawables();
+ std::vector<const Object *> shooters;
+ shooters.reserve( selected->size() );
+ for( DrawableListCIt it = selected->begin(); it != selected->end(); ++it )
+ {
+ const Object *obj = (*it) ? (*it)->getObject() : NULL;
+ if( obj == NULL || obj->isEffectivelyDead() || !obj->isAbleToAttack() )
+ continue;
+ shooters.push_back( obj );
+ }
+
+ attackers.reserve( shooters.size() );
+ for( std::vector<const Object *>::const_iterator it = shooters.begin(); it != shooters.end(); ++it )
+ {
+ const Object *obj = *it;
+ const Object *container = obj->getContainedBy();
+ if( container != NULL )
+ {
+ Bool containerSelected = FALSE;
+ for( std::vector<const Object *>::const_iterator other = shooters.begin(); other != shooters.end(); ++other )
+ {
+ if( *other == container )
+ {
+ containerSelected = TRUE;
+ break;
+ }
+ }
+ if( containerSelected )
+ continue;
+ }
+
+ AttackAssignSlot slot;
+ slot.id = obj->getID();
+ slot.x = obj->getPosition()->x;
+ slot.y = obj->getPosition()->y;
+ attackers.push_back( slot );
+ }
+
+ std::vector<Real> arc;
+ buildPathArcLengths( line, arc );
+ orderAlongPath( attackers, line, arc );
+ orderAlongPath( targets, line, arc );
+ assignAttacks( (Int)attackers.size(), (Int)targets.size(), pairs );
+
+ ObjectID previousAttacker = INVALID_ID;
+ for( std::vector<AttackAssignPair>::const_iterator pair = pairs.begin(); pair != pairs.end(); ++pair )
+ {
+ const AttackAssignSlot& attacker = attackers[ pair->attacker ];
+ const AttackAssignSlot& target = targets[ pair->target ];
+ if( attacker.id == target.id )
+ continue;
+
+ const Bool firstForThisAttacker = attacker.id != previousAttacker;
+ previousAttacker = attacker.id;
+
+ // each unit's first shot starts that unit's list. the rest of its run is queued behind it.
+ // shift appends the whole run onto whatever that one unit was already doing.
+ const Bool startsList = firstForThisAttacker && !isInWaypointMode();
+ markNextOrderQueued( startsList ? ORDER_QUEUE_FRESH : ORDER_QUEUE_APPEND );
+ GameMessage *attack = TheMessageStream->appendMessage( GameMessage::MSG_DO_ATTACK_OBJECT );
+ attack->appendObjectIDArgument( target.id );
+ attack->appendObjectIDArgument( attacker.id );
+ }
}
- DEBUG_LOG(("attack line: %d points, %d targets, %d selected\n", (Int)line.size(), (Int)targets.size(),
- getSelectCount()));
+ DEBUG_LOG(("attack line: %d points, %d targets, %d attackers, %d shots\n", (Int)line.size(),
+ (Int)targets.size(), (Int)attackers.size(), (Int)pairs.size()));
return (Int)targets.size();
}
diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
index 3e5d30279..8bc8507f8 100644
--- a/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
+++ b/GeneralsMD/Code/GameEngine/Source/GameClient/MessageStream/CommandXlat.cpp
@@ -1488,9 +1488,9 @@ void CommandTranslator::finishFormationDrag( const ICoord2D& lift )
line.push_back( world );
}
- // a line drawn with the attack key across enemies is aimed at them: each one it crosses goes on
- // the target list, in the order the line meets them, and the ground under the line is not shot
- // at. Only a line that crosses nobody fires on the ground along it
+ // a line drawn with the attack key across enemies is aimed at them: the units that can shoot
+ // share those enemies along the stroke, and the ground under the line is not shot at. Only a
+ // line that crosses nobody fires on the ground along it
const Bool aimedAtTargets = formationType == GameMessage::MSG_DO_FORMATION_FORCEATTACK
&& TheInGameUI->issueAttackLine( line ) > 0;
if( !aimedAtTargets )
diff --git a/GeneralsMD/Code/Tests/test_gameengine.cpp b/GeneralsMD/Code/Tests/test_gameengine.cpp
index 93e1af79d..190b54921 100644
--- a/GeneralsMD/Code/Tests/test_gameengine.cpp
+++ b/GeneralsMD/Code/Tests/test_gameengine.cpp
@@ -1362,6 +1362,57 @@ TEST(attack_circle_stands_both_sides_around_the_centre)
}
}
+/* DrawnPath.cpp: the attack line stands both sides along the stroke, nearest the start first,
+ the same total order a move line uses. The deal itself is assignAttacks. */
+TEST(attack_line_stands_both_sides_along_the_stroke)
+{
+ /* an L: 100 along x, then 100 along y. */
+ std::vector<Coord3D> path;
+ path.push_back( drawnPathPoint( 0.0f, 0.0f ) );
+ path.push_back( drawnPathPoint( 100.0f, 0.0f ) );
+ path.push_back( drawnPathPoint( 100.0f, 100.0f ) );
+
+ std::vector<Real> arc;
+ buildPathArcLengths( path, arc );
+
+ /* shuffled. off the stroke but nearest the start, then the same point twice so the id
+ breaks the tie, then the corner, then halfway up the second leg. */
+ std::vector<AttackAssignSlot> slots;
+ slots.push_back( attackSlot( 4, 100.0f, 50.0f ) );
+ slots.push_back( attackSlot( 8, 50.0f, 0.0f ) );
+ slots.push_back( attackSlot( 2, 50.0f, 0.0f ) );
+ slots.push_back( attackSlot( 1, 0.0f, 10.0f ) );
+ slots.push_back( attackSlot( 3, 100.0f, 0.0f ) );
+
+ std::vector<AttackAssignSlot> reversed = slots;
+ std::reverse( reversed.begin(), reversed.end() );
+
+ orderAlongPath( slots, path, arc );
+ orderAlongPath( reversed, path, arc );
+
+ const int expect[] = { 1, 2, 8, 3, 4 };
+ CHECK_EQ( 5, (int)slots.size() );
+ for( int i = 0; i < 5; i++ )
+ {
+ CHECK_EQ( expect[i], (int)slots[i].id );
+ CHECK_EQ( expect[i], (int)reversed[i].id );
+ }
+
+ /* the enemy nearest the start is the first target, and the gun nearest the start takes it. */
+ std::vector<AttackAssignSlot> enemies;
+ enemies.push_back( attackSlot( 20, 100.0f, 50.0f ) );
+ enemies.push_back( attackSlot( 10, 0.0f, 0.0f ) );
+ orderAlongPath( enemies, path, arc );
+
+ std::vector<AttackAssignPair> pairs;
+ assignAttacks( (Int)slots.size(), (Int)enemies.size(), pairs );
+ CHECK_EQ( 5, (int)pairs.size() );
+ CHECK_EQ( 0, pairs[0].attacker );
+ CHECK_EQ( 0, pairs[0].target );
+ CHECK_EQ( 1, (int)slots[0].id );
+ CHECK_EQ( 10, (int)enemies[0].id );
+}
+
/* AssaultTransportAIUpdate.cpp: the troop crawler deploys its passengers at a target and used to
leave them walking behind it for the rest of the attack move once that target died - and on a
plain attack order it re-boarded them the instant the target died, once per dead enemy. Both