feat: gestion de l'expérience (XP)

- Schéma xp dans CelestopolCharacter : actuel (éditable), log[] ({montant, raison, date}), depense (calculé dans prepareDerivedData)
- Bouton 'Dépenser XP' → DialogV2 (montant + raison) : décrémente actuel, logge l'entrée
- Suppression d'entrée de log avec remboursement des points (mode édition)
- Section XP en haut de l'onglet Biographie : compteurs, tableau du log, référentiel des coûts
- i18n : section CELESTOPOL.XP.* complète
- CSS : .xp-section avec compteurs, tableau de log et accordéon de référence

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-31 00:33:59 +02:00
parent 79a68ee9ab
commit 9dbd614c5a
40 changed files with 849 additions and 529 deletions

View File

@@ -4,22 +4,16 @@
<span class="track-title">{{localize "CELESTOPOL.Track.blessures"}}</span>
</div>
<div class="track-boxes">
{{#each (array "b1" "b2" "b3" "b4" "b5" "b6" "b7" "b8") as |key|}}
<div class="track-box {{#if (lookup ../system.blessures key 'checked')}}checked{{/if}}">
<input type="checkbox" name="system.blessures.{{key}}.checked"
{{#if (lookup ../system.blessures key 'checked')}}checked{{/if}}
{{#unless ../isEditable}}disabled{{/unless}}>
<label class="box-label">{{lookup ../system.blessures key 'malus'}}</label>
{{#each (range 8) as |lvl|}}
<div class="track-box {{#if (lte lvl ../system.blessures.lvl)}}filled{{/if}}"
{{#if ../isEditable}}data-action="trackBox" data-path="system.blessures.lvl" data-index="{{lvl}}"{{/if}}>
<span class="box-label">{{lookup @root.woundLevels lvl 'malus'}}</span>
</div>
{{/each}}
</div>
<div class="track-level">
<label>{{localize "CELESTOPOL.Track.level"}}</label>
{{#if isEditMode}}
<input type="number" name="system.blessures.lvl" value="{{system.blessures.lvl}}" min="0" max="8">
{{else}}
<span>{{system.blessures.lvl}}</span>
{{/if}}
<span>{{system.blessures.lvl}}</span>
</div>
</section>