Give Sokko TCG's server files headers that explain their role, callers and pitfalls

Each core file of services/cards now says where it sits, its entry points,
who calls it and what to watch for: admin checks living in the service, the
methods added to ExpeditionService and TeamService by Object.assign, the
InTx suffix, settings defaults that do not change an existing database, and
rules shared with the browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-12-01 09:47:18 +01:00
parent 22b397ebfa
commit 73bd5ae21c
29 changed files with 291 additions and 73 deletions

View file

@ -1,10 +1,16 @@
/**
* @file Améliorations des cartes Sokko TCG pour les Expéditions : niveaux par Éclats ou doublon, Éveil aux
* paliers, expérience de terrain, plans de progression (vocation ou points libres, changés avec un
* Parchemin d'oubli), pont depuis la poussière et achat des objets de la boutique.
* @file Amélioration des cartes de Sokko TCG pour les Expéditions : niveaux par Éclats ou doublon, Éveil aux
* paliers de Puissance, expérience de terrain, plans de progression (vocation ou points libres, changés
* avec un Parchemin d'oubli), pont de la poussière vers les Éclats et achat des objets de la boutique.
*
* Ces méthodes s'ajoutent à ExpeditionService (Object.assign sur son prototype) et utilisent `this` comme
* lui.
* Contexte : méthodes d'ExpeditionService, ajoutées à son prototype par `Object.assign` en fin
* d'expedition-service.js ; `this` est l'instance d'ExpeditionService.
* Points d'entrée : `upgradeCard`, `setCardPlan`, `convertStardust`, `buyShopItem`, `cardProgressView`.
* Utilisé par : api.js (par `service.expeditions`) ; `gainFieldXpInTx` par `claim` d'expedition-service.js.
* Dépend de : expedition-rules.js (niveaux, Éveil, répartition des points).
* Attention : l'Éveil peut consommer des doublons d'une autre collection quand celle de la carte ne s'ouvre
* pas (collection fermée, Carnets des Veilleurs, Poussières d'étoiles) ; le nombre suit les taux de tirage.
* @see docs/expeditions/equilibrage.md
*/
import { allocationError, awakeningPower, awakeningsAhead, cardExpeditionData, clampAllocation, editionExpeditionData, fieldXpPct, gainProgress, levelPoints, maxLevel, maxStatPoints, PLAN_IDS, planStats, SHOP_ITEM_PRICES, splitPower, STAT_IDS, upgradeCost, VOCATION_IDS } from "./expedition-rules.js";