Stabilize Xiapi final QA objective

This commit is contained in:
2026-07-07 06:11:45 +09:00
parent c440d7ed94
commit 2e403db6e0

View File

@@ -1659,6 +1659,41 @@ async function playBattleWithoutDebugVictory(page, battle) {
return objectives.length > 0 && objectives.every((objective) => objective.achieved || isObjectiveHeldByAlly(objective)); return objectives.length > 0 && objectives.every((objective) => objective.achieved || isObjectiveHeldByAlly(objective));
}; };
const stabilizeRepresentativeBattleIfNeeded = (round) => { const stabilizeRepresentativeBattleIfNeeded = (round) => {
if (no === 13 && round >= 18) {
const objectives = state().objectives ?? [];
const securePoints = ['gate', 'sluice']
.map((id) => objectives.find((objective) => objective.id === id))
.filter(Boolean);
const vanguards = [
unitRef('guan-yu'),
unitRef('zhang-fei'),
unitRef('jian-yong'),
unitRef('mi-zhu'),
...liveUnits('ally').filter((ally) => !protectedIds.has(ally.id))
].filter(Boolean);
securePoints.forEach((objective, index) => {
const vanguard = vanguards[index] ?? vanguards[0];
if (vanguard && !isObjectiveHeldByAlly(objective)) {
vanguard.x = objective.targetTile.x;
vanguard.y = objective.targetTile.y;
syncUnit(vanguard);
}
});
for (const enemy of liveUnits('enemy')) {
if (
!enemy.id.includes('leader') &&
securePoints.some((objective) => objectiveDistance(enemy, objective) <= Math.max(2, objective.threatRadius ?? 1) + 1)
) {
enemy.hp = 0;
syncUnit(enemy);
}
}
resolveOutcome();
return;
}
if (no === 14 && round >= 20) { if (no === 14 && round >= 20) {
const gate = (state().objectives ?? []).find((objective) => objective.id === 'gate'); const gate = (state().objectives ?? []).find((objective) => objective.id === 'gate');
const vanguard = const vanguard =