Files
fvtt-celestopol/templates/roll-dialog.hbs

238 lines
9.7 KiB
Handlebars
Raw Permalink 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="roll-dialog-content">
{{!-- En-tête : acteur + domaine + formule de base --}}
<div class="roll-info-block">
<div class="roll-actor">{{actorName}}</div>
{{!-- Arme (mode combat) --}}
{{#if isCombat}}
<div class="roll-weapon-line">
<span class="weapon-icon">{{#if isRangedDefense}}🛡{{else}}{{/if}}</span>
<span class="weapon-name">{{weaponName}}</span>
{{#if isRangedDefense}}
<span class="weapon-tag ranged-defense">{{localize "CELESTOPOL.Combat.rangedDefenseTag"}}</span>
{{else}}
<span class="weapon-degats">+{{weaponDegats}}</span>
{{/if}}
</div>
{{/if}}
<div class="roll-skill-line">
{{#if statLabel}}<span class="stat-label">{{localize statLabel}}</span><span class="sep"> </span>{{/if}}
<span class="skill-label">{{localize skillLabel}}</span>
</div>
<div class="roll-dice-summary">
<div class="dice-breakdown">
<span class="base-dice">2d8</span>
<span class="plus-sign"> + </span>
<span class="dval">{{skillValue}}</span>
{{#if woundMalus}}
<span class="dminus"> {{abs woundMalus}}</span>
{{/if}}
{{#if armorMalus}}
<span class="dminus armor-malus"> {{abs armorMalus}}</span>
{{/if}}
</div>
{{#if woundLabel}}
<div class="wound-info">⚠ {{woundLabel}}</div>
{{/if}}
{{#if armorMalus}}
<div class="wound-info armor-info">🛡 {{localize "CELESTOPOL.Roll.armorMalus"}}</div>
{{/if}}
</div>
</div>
<div class="roll-form-rows">
{{!-- Difficulté : Corps PNJ en combat, fixe 11 en test normal --}}
{{#if isCombat}}
{{!-- Sélecteur de cible PNJ (si des tokens NPCs sont disponibles) --}}
{{#if availableTargets.length}}
<div class="form-row-line form-target-row">
<label for="targetSelect"><i class="fas fa-crosshairs"></i> {{localize "CELESTOPOL.Combat.targetLabel"}}</label>
<select id="targetSelect" name="targetSelect">
<option value="">— {{localize "CELESTOPOL.Combat.targetAuto"}} —</option>
{{#each availableTargets as |t|}}
<option value="{{t.id}}" data-corps="{{t.corps}}">{{t.name}}</option>
{{/each}}
</select>
</div>
{{/if}}
<div class="form-row-line form-corps-pnj" id="corps-pnj-row">
<label for="corpsPnj">{{localize "CELESTOPOL.Combat.corpsPnj"}}</label>
<input type="number" id="corpsPnj" name="corpsPnj" value="7" min="1" max="30" class="corps-pnj-input">
</div>
<div class="form-row-line form-target-confirmed" id="target-confirmed-row" style="display:none">
<span class="target-confirmed-badge"><i class="fas fa-crosshairs"></i> <span id="target-confirmed-name"></span></span>
</div>
{{!-- Modificateurs tir (distance uniquement) --}}
{{#if isRangedAttack}}
<div class="form-row-line form-ranged-mod">
<label for="rangedMod"><i class="fas fa-bullseye"></i> {{localize "CELESTOPOL.Combat.rangedMod"}}</label>
<select id="rangedMod" name="rangedMod">
{{#each rangedModChoices as |choice|}}
<option value="{{choice.value}}" {{#if (eq choice.id "none")}}selected{{/if}}>{{choice.label}}</option>
{{/each}}
</select>
</div>
{{/if}}
{{else}}
<div class="form-row-line form-threshold-fixed">
<label>{{localize "CELESTOPOL.Roll.threshold"}}</label>
<span class="threshold-value" id="threshold-display">11</span>
</div>
{{!-- Test en opposition : le résultat sera masqué, MJ décide --}}
<div class="form-opposition-row">
<label class="opposition-toggle" for="isOpposition">
<input type="checkbox" id="isOpposition" name="isOpposition">
<span class="opposition-icon">⚔</span>
<span class="opposition-text">
<span class="opposition-main">{{localize "CELESTOPOL.Roll.opposition"}}</span>
<span class="opposition-sub">{{localize "CELESTOPOL.Roll.oppositionDesc"}}</span>
</span>
</label>
</div>
{{/if}}
{{!-- Options non disponibles en test de résistance --}}
{{#unless isResistance}}
{{!-- Modificateur & Aspect côte à côte (tests normaux) --}}
<div class="form-two-col">
<div class="form-row-line">
<label for="modifier">{{localize "CELESTOPOL.Roll.modifier"}}</label>
<select id="modifier" name="modifier">
{{#each modifierChoices as |choice|}}
<option value="{{choice.value}}" {{#if (eq choice.id "malaise")}}selected{{/if}}>{{choice.label}}</option>
{{/each}}
</select>
</div>
<div class="form-row-line">
<label for="aspectModifier">{{localize "CELESTOPOL.Roll.aspect"}}</label>
<select id="aspectModifier" name="aspectModifier">
{{#each aspectChoices as |choice|}}
<option value="{{choice.value}}" {{#if (eq choice.value 0)}}selected{{/if}}>{{choice.label}}</option>
{{/each}}
</select>
</div>
</div>
{{else}}
{{!-- En résistance : Bonus/Malus d'Aspect disponible --}}
<div class="form-row-line form-resistance-aspect">
<label for="aspectModifier">{{localize "CELESTOPOL.Roll.aspect"}}</label>
<select id="aspectModifier" name="aspectModifier">
{{#each aspectChoices as |choice|}}
<option value="{{choice.value}}" {{#if (eq choice.value 0)}}selected{{/if}}>{{choice.label}}</option>
{{/each}}
</select>
</div>
{{/unless}}{{!-- /isResistance aspect --}}
{{#if factionAspectChoices.length}}
<div class="form-row-line form-faction-aspect">
<label for="factionAspectId">{{localize "CELESTOPOL.FactionAspect.rollLabel"}}</label>
<select id="factionAspectId" name="factionAspectId">
<option value="">{{localize "CELESTOPOL.FactionAspect.noneOption"}}</option>
{{#each factionAspectChoices as |choice|}}
<option value="{{choice.id}}" data-value="{{choice.value}}">{{choice.label}} (+{{choice.value}})</option>
{{/each}}
</select>
</div>
{{/if}}
{{!-- Options non disponibles en test de résistance (lune, destin, puiser, fortune) --}}
{{#unless isResistance}}
{{!-- Dé de la Lune --}}
<div class="form-moon-row">
<label class="moon-toggle" for="rollMoonDie">
<input type="checkbox" id="rollMoonDie" name="rollMoonDie" {{#if defaultRollMoonDie}}checked{{/if}}>
<span class="moon-icon">🌑</span>
<span class="moon-text">{{localize "CELESTOPOL.Roll.rollMoonDie"}}</span>
</label>
</div>
{{!-- Destin (3d8) — seulement si jauge pleine --}}
<div class="form-destin-row {{#unless destGaugeFull}}destin-disabled{{/unless}}">
<label class="destin-toggle" for="useDestin">
<input type="checkbox" id="useDestin" name="useDestin" {{#unless destGaugeFull}}disabled{{/unless}}>
<span class="destin-icon">✦</span>
<span class="destin-text">
<span class="destin-main">{{localize "CELESTOPOL.Roll.destin"}}</span>
<span class="destin-bonus">{{localize "CELESTOPOL.Roll.destinBonus"}}</span>
</span>
{{#if destGaugeFull}}
<span class="destin-badge full">{{localize "CELESTOPOL.Roll.destGaugeFull"}}</span>
{{else}}
<span class="destin-badge empty">{{localize "CELESTOPOL.Roll.destGaugeEmpty"}}</span>
{{/if}}
</label>
</div>
{{!-- Puiser dans ses ressources — affiché dynamiquement via JS si malus --}}
<div class="form-puiser-row" id="puiser-row" style="display:none">
<label class="puiser-toggle" for="puiserRessources">
<input type="checkbox" id="puiserRessources" name="puiserRessources">
<span class="puiser-icon">💪</span>
<span class="puiser-text">
<span class="puiser-main">{{localize "CELESTOPOL.Roll.puiser"}}</span>
<span class="puiser-sub">{{localize "CELESTOPOL.Roll.puiserDesc"}}</span>
</span>
<span class="puiser-cost">+1 <i class="fas fa-face-sad-tear"></i></span>
</label>
</div>
{{!-- Fortune (1d8+8) — seulement si Fortune > 0 --}}
{{#if fortuneValue}}
<div class="form-fortune-row">
<label class="fortune-toggle" for="useFortune">
<input type="checkbox" id="useFortune" name="useFortune">
<span class="fortune-icon">⚜</span>
<span class="fortune-text">
<span class="fortune-main">{{localize "CELESTOPOL.Roll.fortune"}}</span>
<span class="fortune-bonus">{{localize "CELESTOPOL.Roll.fortuneBonus"}}</span>
</span>
<span class="fortune-badge">{{fortuneValue}}</span>
</label>
</div>
{{/if}}
{{/unless}}{{!-- /isResistance (lune, destin, puiser, fortune) --}}
{{!-- Modificateur de situation (-8 à +8) — tous les jets --}}
<div class="form-row-line form-situation-mod">
<label for="situationMod">{{localize "CELESTOPOL.Roll.situationMod"}}</label>
<select id="situationMod" name="situationMod">
{{#each situationChoices}}
<option value="{{this.value}}" {{#if (eq this.value 0)}}selected{{/if}}>{{this.label}}</option>
{{/each}}
</select>
</div>
{{!-- Visibilité --}}
<div class="form-row-line form-visibility">
<label for="visibility">{{localize "CELESTOPOL.Roll.visibility"}}</label>
<select id="visibility" name="visibility">
<option value="publicroll">{{localize "CELESTOPOL.Roll.visibilityPublic"}}</option>
<option value="gmroll">{{localize "CELESTOPOL.Roll.visibilityGM"}}</option>
<option value="selfroll">{{localize "CELESTOPOL.Roll.visibilitySelf"}}</option>
</select>
</div>
</div>
{{!-- Prévisualisation formule --}}
<div class="dice-preview">
<span class="preview-label">{{localize "CELESTOPOL.Roll.formula"}}</span>
<span class="preview-formula" id="preview-formula">2d8</span>
</div>
</div>