An expedition now opens with a single card. Its creator leaves alone right away, or opens it to the Guild board with an invite link and launches it whenever they want; at the end of recruitment it leaves by itself, alone or as a group, and is never dissolved for lack of players. Stars no longer depend on the number of players, a player has one expedition at a time, and roles are gone: each card brings its stats and a team adds them up, so every requirement is its per-slot share times the number of slots. The page follows the player's path: the offered destination card is revealed once in a modal, then Préparer shows the destinations (stat requirements, condition and dangers coloured for the chosen card, loot effects), a frame with the sent card in large size, its equipment slots and stats, and the duration and departure. Cards and commons are chosen in modals with sorts and highlighted current picks; tags get matching colours on the card and on equipment synergies. Once gone, the trip is shown with a progress bar and moving cards, the loot opens in a modal, and finished expeditions move to a Journal tab with the Grimoire. Power commons get short power names of their own and show their exact effects on hover, a card holds one power at a time, and Coup de folie now draws the real requirements between 80 % and 130 % of the shown ones, revealed on return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
2.4 KiB
JavaScript
27 lines
2.4 KiB
JavaScript
// Rôle : affiche le rapport d'équilibrage des Expéditions Sokko TCG (réglages par défaut, catalogue et destinations du dépôt).
|
|
// Usage : node scripts/simulate-expeditions.mjs. À relancer après l'ajout de cartes, d'étiquettes, de destinations ou un changement de réglages.
|
|
import { fileURLToPath } from "node:url";
|
|
import { loadCardsCatalog } from "../services/cards/catalog.js";
|
|
import { loadExpeditionDestinations } from "../services/cards/expedition-content.js";
|
|
import { DEFAULT_EXPEDITION_SETTINGS, mergeExpeditionSettings } from "../services/cards/expedition-settings.js";
|
|
import { simulate } from "../services/cards/expedition-simulation.js";
|
|
|
|
const root = fileURLToPath(new URL("..", import.meta.url));
|
|
const catalog = loadCardsCatalog(`${root}website/public/data/cards/catalog.json`);
|
|
const destinations = loadExpeditionDestinations(`${root}services/cards/content/expedition-destinations.json`, catalog);
|
|
const settings = mergeExpeditionSettings(DEFAULT_EXPEDITION_SETTINGS, destinations.map((destination) => destination.id));
|
|
const report = simulate(catalog, destinations, settings);
|
|
const pct = (value) => `${value.toFixed(0).padStart(3)} %`;
|
|
|
|
console.log(`Paliers : Réussite à ${settings.score.successPct} %, Triomphe à ${settings.score.triumphPct} %.\n`);
|
|
console.log("Score d'une carte partie seule, par rareté (minimum / médiane / maximum sur les cartes et les destinations, 2 h) :");
|
|
for (const row of report.byRarity) {
|
|
console.log(` ${row.level.padEnd(10)} ${row.rarity.padEnd(9)} ${row.stars} ★ ${pct(row.min)} / ${pct(row.median)} / ${pct(row.max)}`);
|
|
}
|
|
const weakest = [...report.cardBest].sort((a, b) => a.scorePct - b.scorePct).slice(0, 10);
|
|
console.log("\nCartes au meilleur score le plus bas en 2 ★ (niveau 0, seules) :");
|
|
for (const card of weakest) console.log(` ${pct(card.scorePct)} ${card.cardId} (${card.rarity}) à ${card.destinationId}`);
|
|
console.log(`\nDestinations où une rare au plafond triomphe seule en 4 ★ : ${(report.triumphShareAt4 * 100).toFixed(0)} %`);
|
|
console.log(`Puissance au plafond : rare ${report.rareVsMythicAtMax.rare}, mythique ${report.rareVsMythicAtMax.mythic}`);
|
|
console.log("\nÉclats espérés par heure (durées " + settings.durations.hours.join(" / ") + " h) :");
|
|
for (const row of report.lootPerHour) console.log(` ${row.stars} ★ ${row.tier.padEnd(9)} ${row.perHour.map((value) => value.toFixed(2)).join(" / ")}`);
|