Polish Princess Lima map data and interaction feedback
All checks were successful
Build Org Website / build (push) Successful in 38s

This commit is contained in:
gitea-actions
2026-07-30 13:58:25 +01:00
parent 15b626ee0d
commit a6502b168d
13 changed files with 198 additions and 51 deletions

View File

@@ -51,6 +51,29 @@ test("all named spawns are collision-safe and invalid positions recover", () =>
assert.equal(systems.isSafePosition(current, recovered.region, recovered.x, recovered.y), true);
});
test("mountain bridge controls are reachable before repair and crossing opens afterward", () => {
let current = state.fresh("Ada", "azure");
const mountain = data.MAPS.mountain;
const controls = mountain.puzzle.objects.map(([, x, y]) => ({ x, y }));
controls.forEach((point) => {
assert.equal(systems.isSafePosition(current, "mountain", point.x, point.y), true);
});
assert.ok(Math.hypot(controls[0].x - controls[1].x, controls[0].y - controls[1].y) <= 80);
assert.equal(systems.isSafePosition(current, "mountain", 365, 345), false);
current = systems.solvePuzzle(current, "bridge_winches");
assert.equal(current.unlockedRoutes.includes("bridge_repaired"), true);
assert.equal(systems.isSafePosition(current, "mountain", 365, 345), true);
});
test("every region has an unbroken outer collision border", () => {
const current = state.fresh("Ada", "azure");
data.MAP_IDS.forEach((region) => {
[[10, 360], [710, 360], [360, 10], [360, 710]].forEach(([x, y]) => {
assert.equal(systems.isSafePosition(current, region, x, y), false, `${region}:${x},${y}`);
});
});
});
test("quest progression grants rewards once and unlocks routes", () => {
let current = state.fresh("Ada", "azure");
current = systems.completeQuest(current, "aftermath");