Files
fvtt-celestopol/templates/chat-message.hbs
LeRatierBretonnier 79f961c4fa fix: affiche tous les composants dans la ligne formule du chat
Le total Foundry incluait skillValue + woundMalus mais la décomposition
ne les montrait pas, ce qui rendait le total incompréhensible.

- _getChatCardData : passe skillValue dans le contexte
- chat-message.hbs : affiche skillValue (titre tooltip) et woundMalus
  séparément dans la ligne 'diceSum + skillValue ± woundMalus ± modifier ± aspectMod = total'
- lang : ajoute Roll.skillValue

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

104 lines
3.8 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 skillValue}}
<span class="fl-op">+</span>
<span class="fl-mod" title="{{localize "CELESTOPOL.Roll.skillValue"}}">{{skillValue}}</span>
{{/if}}
{{#if woundMalus}}
<span class="fl-op"></span>
<span class="fl-mod wound" title="{{localize "CELESTOPOL.Roll.woundMalus"}}">{{abs woundMalus}}</span>
{{/if}}
{{#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>