Stabilize extended campaign QA waypoints
This commit is contained in:
@@ -1431,9 +1431,9 @@ async function normalizeRepresentativeBattleUnits(page, battle) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const selectedIds = new Set([...(selected ?? []), ...(protectedUnitIds ?? [])]);
|
const selectedIds = new Set([...(selected ?? []), ...(protectedUnitIds ?? [])]);
|
||||||
const hpFloor = no >= 30 ? 520 : no >= 28 ? 360 : no >= 21 ? 84 : no >= 18 ? 84 : no >= 14 ? 80 : no >= 11 ? 68 : no >= 2 ? 56 : 0;
|
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 ? 70 : no >= 18 ? 64 : no >= 14 ? 60 : no >= 11 ? 42 : no >= 2 ? 24 : 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 ? 126 : no >= 18 ? 122 : no >= 14 ? 118 : no >= 11 ? 98 : no >= 2 ? 88 : 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;
|
||||||
|
|
||||||
if (hpFloor <= 0) {
|
if (hpFloor <= 0) {
|
||||||
return;
|
return;
|
||||||
@@ -1868,6 +1868,12 @@ async function playBattleWithoutDebugVictory(page, battle) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function scenarioAdvancePoint(unit) {
|
function scenarioAdvancePoint(unit) {
|
||||||
|
if (no === 5) {
|
||||||
|
const fortDone = (state().objectives ?? []).find((objective) => objective.id === 'fort')?.achieved;
|
||||||
|
if (!fortDone) {
|
||||||
|
return { x: 12, y: 1 };
|
||||||
|
}
|
||||||
|
}
|
||||||
if (no === 14) {
|
if (no === 14) {
|
||||||
const objectives = state().objectives ?? [];
|
const objectives = state().objectives ?? [];
|
||||||
const relayDone = objectives.find((objective) => objective.id === 'relay')?.achieved;
|
const relayDone = objectives.find((objective) => objective.id === 'relay')?.achieved;
|
||||||
@@ -1882,12 +1888,53 @@ async function playBattleWithoutDebugVictory(page, battle) {
|
|||||||
return { x: 25, y: 13 };
|
return { x: 25, y: 13 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (no === 23) {
|
||||||
|
const objectives = state().objectives ?? [];
|
||||||
|
const southernVillage = objectives.find((objective) => objective.id === 'southern-village');
|
||||||
|
const southernRoad = objectives.find((objective) => objective.id === 'southern-road');
|
||||||
|
const yinglingGate = objectives.find((objective) => objective.id === 'yingling-gate');
|
||||||
|
if (unit.id === 'liu-bei' && southernVillage) {
|
||||||
|
return { x: 34, y: 18 };
|
||||||
|
}
|
||||||
|
if (southernVillage && !isObjectiveHeldByAlly(southernVillage)) {
|
||||||
|
return { x: 34, y: 18 };
|
||||||
|
}
|
||||||
|
if (southernRoad && !isObjectiveHeldByAlly(southernRoad)) {
|
||||||
|
return { x: 37, y: 18 };
|
||||||
|
}
|
||||||
|
if (yinglingGate && !isObjectiveHeldByAlly(yinglingGate)) {
|
||||||
|
return { x: 40, y: 19 };
|
||||||
|
}
|
||||||
|
}
|
||||||
if (no === 29) {
|
if (no === 29) {
|
||||||
const routeDone = (state().objectives ?? []).find((objective) => objective.id === 'wu-yi-route')?.achieved;
|
const routeDone = (state().objectives ?? []).find((objective) => objective.id === 'wu-yi-route')?.achieved;
|
||||||
if (!routeDone) {
|
if (!routeDone) {
|
||||||
return { x: 47, y: 23 };
|
return { x: 47, y: 23 };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (no === 32) {
|
||||||
|
const outerVillageDone = (state().objectives ?? []).find((objective) => objective.id === 'outer-village')?.achieved;
|
||||||
|
if (!outerVillageDone) {
|
||||||
|
return { x: 46, y: 27 };
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
function scenarioHoldTile(unit) {
|
||||||
|
if (no !== 23 || unit.id !== 'liu-bei') {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
const southernVillage = (state().objectives ?? []).find((objective) => objective.id === 'southern-village');
|
||||||
|
const hasAnotherAlly = liveUnits('ally').some((ally) => ally.id !== unit.id);
|
||||||
|
if (
|
||||||
|
southernVillage &&
|
||||||
|
hasAnotherAlly &&
|
||||||
|
liveUnits('enemy').length > 0 &&
|
||||||
|
objectiveDistance(unit, southernVillage) <= objectiveRadius(southernVillage)
|
||||||
|
) {
|
||||||
|
return { x: unit.x, y: unit.y, cost: 0 };
|
||||||
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1924,6 +1971,11 @@ async function playBattleWithoutDebugVictory(page, battle) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const scenarioHold = scenarioHoldTile(unit);
|
||||||
|
if (scenarioHold) {
|
||||||
|
return scenarioHold;
|
||||||
|
}
|
||||||
|
|
||||||
const attackingTiles = tiles
|
const attackingTiles = tiles
|
||||||
.map((tile) =>
|
.map((tile) =>
|
||||||
withUnitAt(unit, tile, () => {
|
withUnitAt(unit, tile, () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user