feat: ajoute la règle Fortune dans les jets

Règle : si Fortune > 0, le joueur peut cocher 'Fortune' pour lancer
1d8 + 8 au lieu de 2d8 (contraint les probabilités vers le haut).

- character.mjs : passe fortuneValue dans roll.prompt()
- roll.mjs : checkbox Fortune, formule 1d8 + 8 + totalModifier si cochée
- roll-dialog.hbs : bloc Fortune (visible si fortuneValue > 0), preview mis à jour
- chat-message.hbs : affiche '+8' dans la zone dés, ligne formule avec badge Fortune
- roll.less : styles .form-fortune-row, .fl-mod.fortune, .fortune-fixed-badge
- lang/fr.json : Roll.fortune/fortuneBonus/fortuneFixed/usedFortune

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-29 20:08:06 +02:00
parent 79f961c4fa
commit 3cb31dfdef
6 changed files with 153 additions and 8 deletions

View File

@@ -20,14 +20,25 @@
{{#each diceResults as |die|}}
<span class="die-face d8 {{#if (eq die 8)}}max{{/if}}{{#if (eq die 1)}}min{{/if}}">{{die}}</span>
{{/each}}
{{#if useFortune}}<span class="fortune-fixed-badge">+8</span>{{/if}}
</div>
{{!-- Formule détaillée --}}
<div class="formula-line">
<span class="fl-label">{{localize "CELESTOPOL.Roll.formula"}} :</span>
{{#if useFortune}}
<span class="fl-ndice">1d8</span>
<span class="fl-op">+</span>
<span class="fl-mod fortune" title="{{localize "CELESTOPOL.Roll.fortuneFixed"}}">8</span>
{{else}}
<span class="fl-ndice">{{nbDice}}d8</span>
{{/if}}
<span class="fl-eq"> = </span>
<span class="fl-sum">{{diceSum}}</span>
{{#if useFortune}}
<span class="fl-op">+</span>
<span class="fl-mod fortune">8</span>
{{/if}}
{{#if skillValue}}
<span class="fl-op">+</span>
<span class="fl-mod" title="{{localize "CELESTOPOL.Roll.skillValue"}}">{{skillValue}}</span>
@@ -62,12 +73,17 @@
{{/if}}
</div>
{{!-- Infos bonus (Destin, Aspect) --}}
{{!-- Infos bonus (Destin, Fortune, Aspect) --}}
{{#if useDestin}}
<div class="used-info">
<span class="used-destin">✦ {{localize "CELESTOPOL.Roll.usedDestin"}}</span>
</div>
{{/if}}
{{#if useFortune}}
<div class="used-info">
<span class="used-fortune">⚜ {{localize "CELESTOPOL.Roll.usedFortune"}}</span>
</div>
{{/if}}
{{!-- Résultat du Dé de la Lune (narratif) --}}
{{#if hasMoonDie}}