feat: tests de résistance (2d8+TR, auto-blessure sur échec)

- rollResistance(statId) dans character.mjs : formule 2d8 + bonus TR + malus blessures
- Dialog sans Modificateur/Aspect/Lune/Destin/Fortune/Puiser en mode résistance
- Auto-cochage de la prochaine case de blessure sur échec
- Chat message : notification blessure cochée (woundTaken)
- Stat-res cliquable (rollable) en mode jeu dans l'onglet compétences
- base-actor-sheet : routing clic stat-res → rollResistance
- CSS : .resistance-wound-notice
- i18n : resistanceTest, resistanceClickToRoll, woundTaken

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-29 23:35:38 +02:00
parent df2ed14f34
commit 89d47ba6ec
8 changed files with 107 additions and 22 deletions

View File

@@ -5,7 +5,8 @@
<div class="stat-block">
<div class="stat-header">
<span class="stat-name">{{localize stat.label}}</span>
<div class="stat-res">
<div class="stat-res {{#unless ../isEditMode}}rollable{{/unless}}" data-stat-id="{{statId}}"
title="{{localize 'CELESTOPOL.Roll.resistanceClickToRoll'}}">
<label>{{localize "CELESTOPOL.Stat.res"}}</label>
<span class="stat-res-value">{{lookup (lookup ../system.stats statId) 'res'}}</span>
</div>

View File

@@ -123,5 +123,12 @@
<span class="result-label">{{localize "CELESTOPOL.Roll.failure"}}</span>
{{/if}}
</div>
{{!-- Blessure auto-cochée (test de résistance raté) --}}
{{#if woundTaken}}
<div class="resistance-wound-notice">
<span class="wound-icon">🩹</span>
<span>{{localize "CELESTOPOL.Roll.woundTaken"}}</span>
</div>
{{/if}}
</div>

View File

@@ -36,6 +36,9 @@
</select>
</div>
{{!-- Options non disponibles en test de résistance --}}
{{#unless isResistance}}
{{!-- Modificateur & Aspect côte à côte --}}
<div class="form-two-col">
<div class="form-row-line">
@@ -110,6 +113,8 @@
</div>
{{/if}}
{{/unless}}{{!-- /isResistance --}}
{{!-- Visibilité --}}
<div class="form-row-line form-visibility">
<label for="visibility">{{localize "CELESTOPOL.Roll.visibility"}}</label>