From 0ba5034dd4cd5fbf184547a278ca1a4a8f300222 Mon Sep 17 00:00:00 2001 From: coyotte508 Date: Sat, 14 Nov 2026 01:20:54 +0000 Subject: [PATCH] Limit solo badge catalog to hosted normal difficulty --- bgs/achievements.js | 19 +++++++++---------- docs/platform-achievements.md | 10 +++++----- test/platform-achievements.test.js | 16 +++++++++++++--- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/bgs/achievements.js b/bgs/achievements.js index 15a7c3a..9ed9e46 100644 --- a/bgs/achievements.js +++ b/bgs/achievements.js @@ -7,11 +7,11 @@ const manifest = { revision: 1, achievements: [ ["island-victory", "Island victory", "Win a multiplayer game outright."], - ...["easy", "normal", "hard"].map((level) => [ - `puertoma-${level}`, - `Puertoma: ${level}`, - `Win outright against both Puertomas on ${level} difficulty.`, - ]), + [ + "puertoma-normal", + "Puertoma: normal", + "Win outright against both Puertomas on normal difficulty.", + ], [ "all-festival-objectives", "Festival sweep", @@ -119,11 +119,10 @@ export function achievements(s) { if (condition) earned.push(id); }; award("island-victory", !s.puertoma && outcome === "win"); - for (const level of ["easy", "normal", "hard"]) - award( - `puertoma-${level}`, - solo && s.puertoma.difficulty === level && outcome === "win", - ); + award( + "puertoma-normal", + solo && s.puertoma.difficulty === "normal" && outcome === "win", + ); const festivals = festival ? (s.festivals ?? []) : []; const cards = s.expansions.includes("achievements") ? (a.achievements ?? []) diff --git a/docs/platform-achievements.md b/docs/platform-achievements.md index 7b9e80c..a3573cc 100644 --- a/docs/platform-achievements.md +++ b/docs/platform-achievements.md @@ -32,9 +32,7 @@ final inventories. | ID | Requirement at a completed game | | --- | --- | | island-victory | Outright multiplayer win | -| puertoma-easy | Outright hosted solo win on easy | | puertoma-normal | Outright hosted solo win on normal | -| puertoma-hard | Outright hosted solo win on hard | | all-festival-objectives | Personally claim all active Festival objectives | | all-personal-achievements | Complete all owned personal cards | | festival-claim | Claim at least one Festival | @@ -72,9 +70,11 @@ use normal human rules, not Puertoma rules. Outcomes compare all players' final total, then coins plus crates. Shared best results are draws, not outright-win badges. Hosted solo returns **only seat 0**, but explicitly compares against both virtual Puertomas. Hosted creation currently -fixes **normal** difficulty. Easy/hard badges are reserved for genuine supported -engine configurations; they are not selectable in the released host, and no -picker has been added. Ordinary multiplayer never earns a solo badge. +fixes **normal** difficulty. The 14-badge MVP therefore includes only the normal +solo victory badge. Easy/hard are supported by the core engine but absent from +the manifest because hosted creation does not expose them. Adding a new setup +option is outside this badge change; no picker has been added. Ordinary +multiplayer never earns a solo badge. Tests: `test/platform-achievements.test.js` plays real completed multiplayer and hosted solo games, validates official runtime schemas, checks deterministic diff --git a/test/platform-achievements.test.js b/test/platform-achievements.test.js index daa68ae..28ead01 100644 --- a/test/platform-achievements.test.js +++ b/test/platform-achievements.test.js @@ -26,7 +26,12 @@ test("official schemas, stable manifest, real completed fixtures, replay and pur const manifest = host.achievementDefinitions(); achievementManifestSchema.parse(manifest); assert.equal(manifest.revision, 1); - assert.equal(manifest.achievements.length, 16); + assert.equal(manifest.achievements.length, 14); + assert( + !manifest.achievements.some(({ id }) => + ["puertoma-easy", "puertoma-hard"].includes(id), + ), + ); for (const s of [completed, solo]) { const before = structuredClone(s); const results = host.achievements(s); @@ -36,7 +41,7 @@ test("official schemas, stable manifest, real completed fixtures, replay and pur assert.deepEqual(s, before); } manifest.achievements.length = 0; - assert.equal(host.achievementDefinitions().achievements.length, 16); + assert.equal(host.achievementDefinitions().achievements.length, 14); }); test("all means this seat's entire nonempty active set, not the table or the deck", () => { @@ -107,7 +112,12 @@ test("solo outcomes explicitly compare both virtual opponents including tie brea s.players[0].vp = 1000; assert.equal(host.achievements(s).length, 1); assert.equal(host.achievements(s)[0].outcome, "win"); - assert(has(s, `puertoma-${difficulty}`)); + assert.equal(has(s, "puertoma-normal"), difficulty === "normal"); + assert(!has(s, "puertoma-easy")); + assert(!has(s, "puertoma-hard")); + achievementResultsSchema(host.achievementDefinitions(), 1).parse( + host.achievements(s), + ); assert(!has(s, "island-victory")); s.players[1].vp = 2000; assert.equal(host.achievements(s)[0].outcome, "loss");