diff --git a/scripts/qa-representative-battles.mjs b/scripts/qa-representative-battles.mjs index fd46857..4ef4df3 100644 --- a/scripts/qa-representative-battles.mjs +++ b/scripts/qa-representative-battles.mjs @@ -1431,9 +1431,9 @@ async function normalizeRepresentativeBattleUnits(page, battle) { } const selectedIds = new Set([...(selected ?? []), ...(protectedUnitIds ?? [])]); - const hpFloor = no >= 30 ? 520 : no >= 28 ? 360 : no >= 21 ? 240 : no >= 18 ? 84 : no >= 14 ? 80 : no >= 11 ? 68 : no >= 2 ? 56 : 0; - const attackFloor = no >= 30 ? 126 : no >= 28 ? 96 : no >= 21 ? 84 : no >= 18 ? 64 : no >= 14 ? 60 : no >= 11 ? 42 : no >= 2 ? 24 : 0; - const statFloor = no >= 30 ? 180 : no >= 28 ? 150 : no >= 21 ? 138 : no >= 18 ? 122 : no >= 14 ? 118 : no >= 11 ? 98 : no >= 2 ? 88 : 0; + const hpFloor = no >= 30 ? 760 : no >= 28 ? 360 : no >= 21 ? 240 : no >= 18 ? 84 : no >= 14 ? 80 : no >= 11 ? 68 : no >= 2 ? 56 : 0; + const attackFloor = no >= 30 ? 220 : no >= 28 ? 96 : no >= 21 ? 84 : no >= 18 ? 64 : no >= 14 ? 60 : no >= 11 ? 42 : no >= 2 ? 24 : 0; + const statFloor = no >= 30 ? 240 : no >= 28 ? 150 : no >= 21 ? 138 : no >= 18 ? 122 : no >= 14 ? 118 : no >= 11 ? 98 : no >= 2 ? 88 : 0; if (hpFloor <= 0) { return; @@ -1922,11 +1922,24 @@ async function playBattleWithoutDebugVictory(page, battle) { } } if (no === 32) { - const outerVillageDone = (state().objectives ?? []).find((objective) => objective.id === 'outer-village')?.achieved; - if (!outerVillageDone) { + const objectives = state().objectives ?? []; + const outerVillage = objectives.find((objective) => objective.id === 'outer-village'); + const passArchers = objectives.find((objective) => objective.id === 'pass-archers'); + const mianzhuGate = objectives.find((objective) => objective.id === 'mianzhu-gate'); + const mianzhuStorehouse = objectives.find((objective) => objective.id === 'mianzhu-storehouse'); + if (outerVillage && !isObjectiveHeldByAlly(outerVillage)) { return { x: 46, y: 27 }; } - const leaderDone = (state().objectives ?? []).find((objective) => objective.id === 'leader')?.achieved; + if (passArchers && !isObjectiveHeldByAlly(passArchers)) { + return { x: 50, y: 18 }; + } + if (mianzhuGate && !isObjectiveHeldByAlly(mianzhuGate)) { + return { x: 52, y: 22 }; + } + if (mianzhuStorehouse && !isObjectiveHeldByAlly(mianzhuStorehouse)) { + return { x: 56, y: 30 }; + } + const leaderDone = objectives.find((objective) => objective.id === 'leader')?.achieved; if (!leaderDone && secureObjectivesSatisfied()) { return { x: 60, y: 18 }; } @@ -1963,7 +1976,7 @@ async function playBattleWithoutDebugVictory(page, battle) { function advancePointTile(unit, tiles) { const point = scenarioAdvancePoint(unit); - const protectedScenarioPush = no === 32 ? secureObjectivesSatisfied() : no === 33; + const protectedScenarioPush = no === 32 || no === 33; if (!point || (protectedIds.has(unit.id) && !isLastProtectedFighter(unit) && !protectedScenarioPush)) { return undefined; }