Files
fvtt-chroniques-de-l-etrange/templates/form/cde-dice-result.html
T
uberwald 75f79c1c08 feat(magic): reorder schools, fix Wu Xing aspect & power formula
- `magicOrder` ArrayField + ▲/▼ buttons for manual reordering
- Magic rolls use school's aspect for Wu Xing, not speciality's element
- Spell power: `difficulty × (aspectValue + freePowerLevels)` (not `successes × diff`)
- Prompt replaces `aspectspeciality`/`bonusmalusspeciality`/`heispend` with `freepowerlevels`

fix: code review issues
- combat.js: guard undefined `ids` in rollInitiative
- rolling.js: catch Dice So Nice promise, normalize French→English kungfu aspects
- weapon/armor/ingredient: `{ min: 0 }` on quantity
- character.js/npc.js: catch rollForActor fire-and-forget promises
- roll-actions.js/tinji-app.js: await ChatMessage.create
- sanhei.js: null guard on properties
- spell.js/kungfu.js: fix aspect name comments (French→English)
2026-06-10 15:54:31 +02:00

141 lines
6.0 KiB
HTML
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="cde-roll-result" data-aspect="{{aspect}}">
{{!-- Header: aspect identity + roll label --}}
<div class="cde-rr-header">
<div class="cde-rr-header-left">
<img class="cde-rr-aspect-icon" src="{{aspectIcon}}" alt="{{aspectLabel}}" />
<div class="cde-rr-header-text">
<span class="cde-rr-aspect-label">{{aspectLabel}}</span>
<span class="cde-rr-roll-label">{{rollLabel}}</span>
</div>
</div>
{{#if actorImg}}
<div class="cde-rr-header-right">
<img class="cde-rr-actor-avatar" src="{{actorImg}}" alt="{{actorName}}" />
<span class="cde-rr-actor-name">{{actorName}}</span>
</div>
{{/if}}
</div>
{{!-- Hero: successes count (+ spell power for magic rolls) --}}
<div class="cde-rr-hero">
<span class="cde-rr-hero-count">{{successesdice}}</span>
{{#if loksyuBonusSuc}}
<span class="cde-rr-loksyu-bonus cde-rr-loksyu-bonus--success" title="Loksyu">+{{loksyuBonusSuc}} ☯</span>
{{/if}}
<div class="cde-rr-hero-right">
<span class="cde-rr-hero-label">{{ localize "CDE.UpperCaseSuccesses" }}</span>
<span class="cde-rr-hero-dice">{{totalDice}} <span class="cde-rr-hero-dice-label">d10</span></span>
</div>
{{#if spellPower}}
<div class="cde-rr-spell-power">
<span class="cde-rr-spell-power-count">{{spellPower}}</span>
<span class="cde-rr-spell-power-formula">{{spellPowerAspectLabel}} ({{spellPowerAspectValue}}{{#if spellPowerFreeLevels}} + {{spellPowerFreeLevels}}{{/if}}) × {{rollDifficulty}}</span>
<span class="cde-rr-spell-power-label">{{ localize "CDE.SpellPower" }}</span>
</div>
{{/if}}
</div>
{{!-- Detail rows: auspicious / noxious / loksyu / tinji --}}
<div class="cde-rr-details">
<div class="cde-rr-row cde-rr-row--auspicious">
<span class="cde-rr-count">{{auspiciousdice}}</span>
{{#if loksyuBonusFaste}}
<span class="cde-rr-loksyu-bonus cde-rr-loksyu-bonus--faste" title="Loksyu">+{{loksyuBonusFaste}} ☯</span>
{{/if}}
<div class="cde-rr-icon"></div>
<span class="cde-rr-label">{{ localize "CDE.UpperCaseAuspiciousDice" }}</span>
</div>
<div class="cde-rr-row cde-rr-row--noxious">
<span class="cde-rr-count">{{noxiousdice}}</span>
<div class="cde-rr-icon"></div>
<span class="cde-rr-label">{{ localize "CDE.UpperCaseNoxiousDice" }}</span>
</div>
<div class="cde-rr-row cde-rr-row--loksyu">
<span class="cde-rr-count">{{loksyudice}}</span>
<div class="cde-rr-icon"></div>
<span class="cde-rr-label">{{ localize "CDE.UpperCaseLoksyu" }}
<span class="cde-rr-partition">{{loksyurepartition}}</span>
</span>
</div>
<div class="cde-rr-row cde-rr-row--tinji">
<span class="cde-rr-count">{{tinjidice}}</span>
<div class="cde-rr-icon"></div>
<span class="cde-rr-label">{{ localize "CDE.UpperCaseTinJi" }}</span>
</div>
</div>
{{!-- Weapon damage (only for weapon rolls) --}}
{{#if weaponName}}
<div class="cde-rr-weapon-damage">
<i class="fas fa-khanda cde-rr-weapon-icon"></i>
<div class="cde-rr-weapon-text">
<span class="cde-rr-weapon-name">{{weaponName}}</span>
<span class="cde-rr-weapon-calc">
{{#if damageBase}}{{damageBase}} + {{/if}}{{damageAspectLabel}} ({{damageAspectValue}})
= <strong class="cde-rr-weapon-total">{{totalDamage}}</strong>
<span class="cde-rr-weapon-unit">{{ localize "CDE.TotalDamage" }}</span>
</span>
</div>
</div>
{{/if}}
{{!-- Modifiers footer (only if non-empty) --}}
{{#if modifiersText}}
<div class="cde-rr-footer">
<span class="cde-rr-footer-label">{{ localize "CDE.Modifiers" }}</span>
<span class="cde-rr-footer-text">{{modifiersText}}</span>
</div>
{{/if}}
{{!-- Die face counts grid (d1d9, d0=10) --}}
<div class="cde-dice-grid">
<div class="cde-dice-cell" data-face="1">
<span class="cde-dice-count">{{d1}}</span>
<img class="cde-dice-plate" src="systems/fvtt-chroniques-de-l-etrange/images/dice-plate/d10-1.webp" alt="1" />
</div>
<div class="cde-dice-cell" data-face="2">
<span class="cde-dice-count">{{d2}}</span>
<img class="cde-dice-plate" src="systems/fvtt-chroniques-de-l-etrange/images/dice-plate/d10-2.webp" alt="2" />
</div>
<div class="cde-dice-cell" data-face="3">
<span class="cde-dice-count">{{d3}}</span>
<img class="cde-dice-plate" src="systems/fvtt-chroniques-de-l-etrange/images/dice-plate/d10-3.webp" alt="3" />
</div>
<div class="cde-dice-cell" data-face="4">
<span class="cde-dice-count">{{d4}}</span>
<img class="cde-dice-plate" src="systems/fvtt-chroniques-de-l-etrange/images/dice-plate/d10-4.webp" alt="4" />
</div>
<div class="cde-dice-cell" data-face="5">
<span class="cde-dice-count">{{d5}}</span>
<img class="cde-dice-plate" src="systems/fvtt-chroniques-de-l-etrange/images/dice-plate/d10-5.webp" alt="5" />
</div>
<div class="cde-dice-cell" data-face="6">
<span class="cde-dice-count">{{d6}}</span>
<img class="cde-dice-plate" src="systems/fvtt-chroniques-de-l-etrange/images/dice-plate/d10-6.webp" alt="6" />
</div>
<div class="cde-dice-cell" data-face="7">
<span class="cde-dice-count">{{d7}}</span>
<img class="cde-dice-plate" src="systems/fvtt-chroniques-de-l-etrange/images/dice-plate/d10-7.webp" alt="7" />
</div>
<div class="cde-dice-cell" data-face="8">
<span class="cde-dice-count">{{d8}}</span>
<img class="cde-dice-plate" src="systems/fvtt-chroniques-de-l-etrange/images/dice-plate/d10-8.webp" alt="8" />
</div>
<div class="cde-dice-cell" data-face="9">
<span class="cde-dice-count">{{d9}}</span>
<img class="cde-dice-plate" src="systems/fvtt-chroniques-de-l-etrange/images/dice-plate/d10-9.webp" alt="9" />
</div>
<div class="cde-dice-cell" data-face="0">
<span class="cde-dice-count">{{d0}}</span>
<img class="cde-dice-plate" src="systems/fvtt-chroniques-de-l-etrange/images/dice-plate/d10-0.webp" alt="10" />
</div>
</div>
</div>