Cover the daily team end to end and measure keep or recruit on the race

A last Sokko TCG journey plays five days on a moved server clock: gold stars
from the daily card, a recruitment that survives reloads, a race interrupted by
a reload and finished with its boost, a full race, the team's three days and a
full reserve that turns the daily reward back into plain stardust.

scripts/simulate-team-race.mjs measures keeping against recruiting on the race
itself. inventTeam takes an optional gold reserve for it. Keeping wins 1.6
stardust per race over recruiting every day; choosing by average power adds 0.4.
The figures are in docs/equipe-du-jour.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-12-01 14:20:05 +01:00
parent f3428b17a5
commit ba2ebfb19d
8 changed files with 324 additions and 5 deletions

View file

@ -84,6 +84,7 @@ Chaque mécanique suit le même découpage :
npm run test:cards # tests Node du TCG
node scripts/simulate-expeditions.mjs # rapport d'équilibrage des Expéditions
node scripts/team-specialties.mjs # spécialités des personnages d'équipe
node scripts/simulate-team-race.mjs # garder ou refaire son équipe, mesuré sur la Course (≈ 3 min)
npm run check:cards # lint + tests + parcours Playwright du TCG
```

View file

@ -247,13 +247,14 @@ export const WATCHER_TEAM_LEVELS = Object.freeze({ strong: 90, medium: 60, weak:
/**
* Joue un recrutement entier. Un choix bien fait prend le personnage le plus utile au parcours et n'améliore que sous 28 % de risque ;
* un choix mal fait prend un personnage au hasard et s'arrête dès 15 % de risque.
* un choix mal fait prend un personnage au hasard et s'arrête dès 15 % de risque. `goldReserve` : étoiles dorées ajoutées au ciel,
* comme la réserve d'un joueur (scripts d'équilibrage ; les Équipes des Veilleurs n'en ont pas).
*/
export function inventTeam(characters, zones, skill, random = defaultRandom, settings = DEFAULT_TEAM_SETTINGS) {
export function inventTeam(characters, zones, skill, random = defaultRandom, settings = DEFAULT_TEAM_SETTINGS, goldReserve = 0) {
const ownedIds = new Set(characters.filter((character) => character.active).map((character) => character.id));
const byId = new Map(characters.map((character) => [character.id, character]));
const needs = [...zones];
let state = startRecruitment(characters, { ownedIds, settings }, random);
let state = startRecruitment(characters, { ownedIds, goldReserve, settings }, random);
while (!recruitmentFinished(state) && state.offer.length) {
const good = random(100) < skill;
const worth = (id) => Math.max(...needs.map((stat) => byId.get(id).profile[stat]));