Simplify joining a Sokko TCG group and let a test player open one locally
Some checks failed
Validate and deploy Sokko G / deploy (push) Blocked by required conditions
Validate and deploy Sokko G / validate (push) Has been cancelled

- On the local dev server, a test player can open a group on one of its destinations, with the 20 s test trip; it departs by itself after 5 minutes, since only the creator may launch it.
- While a player chooses their card to join, the expedition planner is hidden; Cancel brings it back.
- Joining and readying are one button, "Valider et se mettre en prêt", at the bottom right of the loadout frame, also after "Modifier ma préparation", which now sits next to "Quitter l'expédition".
- The redundant "you are ready" block is gone: the member list already shows the Ready badge.
- The card a player sends is called their explorer in the texts about that role.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-30 11:22:35 +01:00
parent 82cebd0fd1
commit 8eb7f2e53e
12 changed files with 196 additions and 88 deletions

View file

@ -528,7 +528,6 @@ export function validateSiteContent(site) {
"cards.expeditions.ownLoadoutTitle",
"cards.expeditions.ownLoadoutHelp",
"cards.expeditions.ready",
"cards.expeditions.readyText",
"cards.expeditions.readyNotice",
"cards.expeditions.unready",
"cards.expeditions.unreadyNotice",
@ -547,6 +546,8 @@ export function validateSiteContent(site) {
"cards.expeditions.testPlayer",
"cards.expeditions.testDuration",
"cards.expeditions.testPlayerAdded",
"cards.expeditions.testGroup",
"cards.expeditions.testGroupOpened",
"cards.expeditions.reportPlayers",
"cards.expeditions.you",
"cards.expeditions.eyebrow",

View file

@ -367,6 +367,33 @@ test("in local development a test player joins a group expedition with a card of
plain.open();
assert.equal(plain.service.expeditions.getExpeditions(plain.player.id).testPlayers, false);
assert.throws(() => plain.service.expeditions.addTestPlayer(plain.player.id, group.id), (error) => error.code === "NOT_FOUND");
assert.throws(() => plain.service.expeditions.openTestGroup(plain.player.id), (error) => error.code === "NOT_FOUND");
});
// Serveur Vite local : un joueur de test ouvre une expédition à la durée de test ; le joueur qui la rejoint (prêt d'emblée) ne peut
// pas la lancer, elle part d'elle-même au bout de cinq minutes.
test("in local development a test player opens a group that the player joins ready and that departs by itself", () => {
const { service, player, open, rares, clock } = expeditionService({ devPerks: true });
open();
const board = service.expeditions.openTestGroup(player.id).expeditions.groups;
assert.equal(board.length, 1);
const [group] = board;
assert.match(group.creatorName, /^Joueur de test \d+$/);
assert.equal(group.canJoin, true);
assert.equal(group.canDepart, false);
assert.throws(() => service.expeditions.departGroup(player.id, group.id), (error) => error.code === "EXPEDITION_NOT_CREATOR");
assert.equal(group.recruitUntil, clock.now + 5 * 60_000);
const joined = service.expeditions.joinGroup(player.id, group.id, { editionId: rares[0], ready: true }).expeditions.groups.find((item) => item.id === group.id);
assert.equal(joined.isMember, true);
assert.deepEqual(joined.ownSlot, { editionId: rares[0], ready: true });
assert.equal(joined.canDepart, false);
assert.throws(() => service.expeditions.departGroup(player.id, group.id), (error) => error.code === "EXPEDITION_NOT_CREATOR");
const second = service.expeditions.openTestGroup(player.id).expeditions.groups.find((item) => item.id !== group.id);
assert.notEqual(second.creatorName, group.creatorName);
clock.now += 5 * 60_000;
const departed = service.expeditions.getExpeditions(player.id).expeditions.find((item) => item.id === group.id);
assert.equal(departed.mode, "group");
assert.equal(departed.returnsAt - departed.departsAt, 20_000);
});
// Une carte de destination est unique : jamais en double, remplacée dans un paquet, jamais échangée ni donnée.