fix: 外勤医疗预置角色保持初始索敌顺序 (#315)

This commit is contained in:
YinqiMargatroid committed 2026-10-11 08:33:39 +08:00
1 parent bc50cac01f
commit e85942bce1
12 files changed
+153 -21

No files matched your search

+9 -4
View File
@@ -238,12 +238,17 @@ function installMapChars(battle) {
const holders = battle.players.filter((ps) => matchBands(battle, ps.playerId).includes(AMEDIC_BAND));
if (!holders.length) return;
battle.on('battleStart', () => {
const chars = [];
for (const ps of holders) {
const elites = deployedOps(battle, ps.playerId).filter(isElite).length;
for (const id of amedicCharsFor(elites, variants)) {
const u = spawnMapChar(battle, ps.playerId, id);
if (u) fxOn(battle, 'summon', u, keyOf(AMEDIC_BAND), AMEDIC_BAND);
}
for (const id of amedicCharsFor(elites, variants)) chars.push({ playerId: ps.playerId, id });
}
for (const [i, { playerId, id }] of chars.entries()) {
// The reserve medic occupies this stage slot in preparation; Touch replaces it at battle start. [ASSUMED]
// Replacement preserves the slot's priority before ordinary deployments. Shared-field ordering between
// prepared characters follows player order, as for other initial placements (lifecycle.js).
const u = spawnMapChar(battle, playerId, id, { preBattleAggroSeq: i - chars.length });
if (u) fxOn(battle, 'summon', u, keyOf(AMEDIC_BAND), AMEDIC_BAND);
}
});
}