A card is an expert of a required stat when it covers on its own twice the requirement of one place; each stat held by a different expert adds 8 % to the score, outside the synergy cap. Requirements rise for 3 to 5 stars and by 10 % per extra player, so a capped card without equipment rarely clears 5 stars while a reflected build does. A mythic now spreads as many level points as its legendary. Migration 21 drops stored requirements so the new defaults apply; the simulator builds teams with vocations and commons, and the balance test checks these targets. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
2.8 KiB
JavaScript
33 lines
2.8 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, simulationCards, soloBuildShares, statCommons } 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}`);
|
|
const commons = statCommons(catalog);
|
|
const cards = simulationCards(catalog);
|
|
console.log("\nCartes seules, part des situations réussies sans équipement / avec un build réfléchi (vocation et communes choisies pour la destination) :");
|
|
for (const [power, stars] of [[55, 3], [70, 3], [85, 4], [100, 4], [100, 5]]) {
|
|
const { bare, built } = soloBuildShares(cards, destinations, power, stars, commons, settings);
|
|
console.log(` Puissance ${String(power).padStart(3)}, ${stars} ★ : ${pct(bare * 100)} / ${pct(built * 100)}`);
|
|
}
|
|
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(" / ")}`);
|