Polish Princess Lima map data and interaction feedback
All checks were successful
Build Org Website / build (push) Successful in 38s
All checks were successful
Build Org Website / build (push) Successful in 38s
This commit is contained in:
@@ -48,6 +48,16 @@ test("all authored actors and interaction points sit outside visible terrain col
|
||||
});
|
||||
});
|
||||
|
||||
test("every region exposes named Tiled-compatible collision and object layers", () => {
|
||||
const expected = ["Collision", "Dynamic Collision", "Exits", "NPCs", "Enemies", "Puzzles", "Items"];
|
||||
data.MAP_IDS.forEach((region) => {
|
||||
const layers = data.MAP_LAYERS[region];
|
||||
assert.deepEqual(layers.map((layer) => layer.name), expected);
|
||||
assert.ok(layers.every((layer) => layer.type === "objectgroup"));
|
||||
assert.equal(layers.find((layer) => layer.name === "Collision").objects, data.MAPS[region].obstacles);
|
||||
});
|
||||
});
|
||||
|
||||
test("keyboard-only page contains one left HUD and no touch controls", () => {
|
||||
assert.match(rpgSource, /class="lima-hud"/);
|
||||
assert.match(rpgSource, /Inventory <kbd>I<\/kbd>/);
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user