Files
fvtt-celestopol/templates/chat-message.hbs
LeRatierBretonnier 54eacf6afc Fix formule de dés : 2d8 de base (règles Célestopol)
Correction majeure de la mécanique de jet selon les règles :

- Formule : 2d8 + Spécialisation + modificateurs (blessures/aspect/manual)
  (vs. ancienne formule erronée : Nd6 pool variable)
- Dé de la Lune : 1d8 narratif optionnel (résultat 1-8 → Triomphe /
  Brio / Contrecoup / Catastrophe) — pas un bonus numérique
- Destin : disponible uniquement jauge pleine (lvl=8), donne 3d8,
  vide la jauge entière après usage
- system.mjs : MOON_DIE_FACES (tableau 1-8) + MOON_RESULT_TYPES
- roll.mjs : logique complète réécrite (2d8, lune séparée, destin reset)
- character/npc.mjs : prefs.rollMoonDie + destGaugeFull
- roll-dialog.hbs : sans grille lune, checkbox dé lune, destin conditionnel
- chat-message.hbs : résultat dé lune narratif (phase + type + desc),
  dés .d8, suppression moonSymbol/moonBonus header
- roll.less : .form-moon-row, .moon-die-result avec couleurs Triomphe/
  Brio/Contrecoup/Catastrophe
- lang/fr.json : Moon.triomphe/brio/contrecoup/catastrophe + Full descs,
  Roll.rollMoonDie/destGaugeFull/destGaugeEmpty/baseDice

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-29 16:19:04 +02:00

96 lines
3.4 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div class="celestopol chat-roll {{resultClass}}">
{{!-- En-tête : acteur + domaine --}}
<div class="roll-header">
{{#if actorImg}}
<img src="{{actorImg}}" class="actor-img" alt="{{actorName}}">
{{/if}}
<div class="roll-info">
<span class="actor-name">{{actorName}}</span>
<span class="skill-info">
{{#if statLabel}}<span class="stat-lbl">{{statLabel}}</span><span class="sep"> </span>{{/if}}
<span class="skill-lbl">{{skillLabel}}</span>
</span>
{{#if woundLabel}}<span class="wound-info">⚠ {{woundLabel}}</span>{{/if}}
</div>
</div>
{{!-- Zone dés --}}
<div class="dice-zone">
{{#each diceResults as |die|}}
<span class="die-face d8 {{#if (eq die 8)}}max{{/if}}{{#if (eq die 1)}}min{{/if}}">{{die}}</span>
{{/each}}
</div>
{{!-- Formule détaillée --}}
<div class="formula-line">
<span class="fl-label">{{localize "CELESTOPOL.Roll.formula"}} :</span>
<span class="fl-ndice">{{nbDice}}d8</span>
<span class="fl-eq"> = </span>
<span class="fl-sum">{{diceSum}}</span>
{{#if modifier}}
<span class="fl-op">{{#if (gt modifier 0)}}+{{else}}{{/if}}</span>
<span class="fl-mod">{{abs modifier}}</span>
{{/if}}
{{#if aspectMod}}
<span class="fl-op">{{#if (gt aspectMod 0)}}+{{else}}{{/if}}</span>
<span class="fl-asp" title="{{localize "CELESTOPOL.Roll.usedAspect"}}">✦{{abs aspectMod}}</span>
{{/if}}
<span class="fl-sep">=</span>
<span class="fl-total">{{total}}</span>
</div>
{{!-- Seuil et marge --}}
<div class="threshold-line">
<span class="vs-wrap">
<span class="vs-label">vs</span>
<span class="diff-label">{{difficultyLabel}}</span>
<span class="diff-val">({{difficultyValue}})</span>
</span>
{{#if margin}}
<span class="margin-badge {{#if marginAbove}}above{{else}}below{{/if}}">
{{#if marginAbove}}+{{/if}}{{margin}}
</span>
{{/if}}
</div>
{{!-- Infos bonus (Destin, Aspect) --}}
{{#if useDestin}}
<div class="used-info">
<span class="used-destin">✦ {{localize "CELESTOPOL.Roll.usedDestin"}}</span>
</div>
{{/if}}
{{!-- Résultat du Dé de la Lune (narratif) --}}
{{#if hasMoonDie}}
<div class="moon-die-result {{moonResultClass}}">
<span class="moon-die-face">{{moonFaceSymbol}}</span>
<div class="moon-die-info">
<span class="moon-die-phase">{{moonFaceLabel}}</span>
<span class="moon-die-type">{{moonResultLabel}}</span>
<span class="moon-die-desc">{{moonResultDesc}}</span>
</div>
</div>
{{/if}}
{{!-- Bandeau résultat --}}
<div class="roll-result-banner {{resultClass}}">
{{#if isCriticalSuccess}}
<span class="result-icon">✦✦</span>
<span class="result-label">{{localize "CELESTOPOL.Roll.criticalSuccess"}}</span>
<span class="result-desc">{{localize "CELESTOPOL.Roll.criticalSuccessDesc"}}</span>
{{else if isSuccess}}
<span class="result-icon">✦</span>
<span class="result-label">{{localize "CELESTOPOL.Roll.success"}}</span>
{{else if isCriticalFailure}}
<span class="result-icon">✖✖</span>
<span class="result-label">{{localize "CELESTOPOL.Roll.criticalFailure"}}</span>
<span class="result-desc">{{localize "CELESTOPOL.Roll.criticalFailureDesc"}}</span>
{{else if isFailure}}
<span class="result-icon">✖</span>
<span class="result-label">{{localize "CELESTOPOL.Roll.failure"}}</span>
{{/if}}
</div>
</div>