Refonte complète du système Anomalies

- DataModel : renommage value→level (1-4), ajout usesRemaining (0-4), suppression scores/notes
- Config : ajout ANOMALY_DEFINITIONS avec compétences applicables par type (8 anomalies)
- Fiche item anomalie : header avec level/uses visuels (dots), barre de compétences applicables,
  2 onglets Description + Technique/Narratif (suppression onglet Scores)
- Fiche PJ onglet Domaines : bloc anomalie proéminent unique avec:
  - Nom + sous-type + icône
  - Dots niveau (●●○○)
  - Dots usages + bouton Utiliser + bouton Réinitialiser
  - Chips des domaines applicables
- Actions : useAnomaly (décrémente usesRemaining), resetAnomalyUses (reset au niveau)
- Contrainte : max 1 anomalie par personnage (drop + createAnomaly)
- Helpers HBS : lte, gte, lt ajoutés
- i18n : nouvelles clés Anomaly.* (level, usesRemaining, use, resetUses, etc.)
- CSS : .anomaly-block sur fiche PJ, dots animés, .anomaly-uses-row sur fiche item

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-28 18:15:06 +01:00
parent cff700bd3d
commit f9ddcdf9da
11 changed files with 474 additions and 41 deletions

View File

@@ -55,7 +55,7 @@ Hooks.once("init", () => {
CONFIG.Actor.trackableAttributes = {
character: {
bar: ["blessures.lvl"],
value: ["initiative", "anomaly.value"],
value: ["initiative", "anomaly.level"],
},
npc: {
bar: ["blessures.lvl"],
@@ -132,6 +132,15 @@ function _registerHandlebarsHelpers() {
// Helper : greater than
Handlebars.registerHelper("gt", (a, b) => a > b)
// Helper : less than or equal
Handlebars.registerHelper("lte", (a, b) => a <= b)
// Helper : greater than or equal
Handlebars.registerHelper("gte", (a, b) => a >= b)
// Helper : less than
Handlebars.registerHelper("lt", (a, b) => a < b)
// Helper : logical OR
Handlebars.registerHelper("or", (...args) => args.slice(0, -1).some(Boolean))