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,19 +4,14 @@
<div class="track-header">
<span class="track-title">{{localize "CELESTOPOL.Track.blessures"}}</span>
<span class="wound-malus">{{localize "CELESTOPOL.Track.currentMalus"}} :
<strong>{{system.blessures.lvl}}</strong>
<strong>{{lookup @root.woundLevels system.blessures.lvl 'malus'}}</strong>
</span>
</div>
<div class="track-boxes">
{{#each (array "b1" "b2" "b3" "b4" "b5" "b6" "b7" "b8") as |key idx|}}
<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}}
class="wound-checkbox"
data-track="blessures"
data-index="{{idx}}">
<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>
@@ -29,18 +24,13 @@
{{!-- Destin --}}
<section class="track-section">
<div class="track-header">
<span class="track-title">{{localize "CELESTOPOL.Track.destin"}}</span>
<span class="track-title track-title-destin"
title="{{localize 'CELESTOPOL.Track.destinTooltip'}}">{{localize "CELESTOPOL.Track.destin"}}</span>
</div>
<div class="track-boxes destin-boxes">
{{#each (array "d1" "d2" "d3" "d4" "d5" "d6" "d7" "d8") as |key|}}
<div class="track-box destiny {{#if (lookup ../system.destin key 'checked')}}checked{{/if}}">
<input type="checkbox" name="system.destin.{{key}}.checked"
{{#if (lookup ../system.destin key 'checked')}}checked{{/if}}
{{#unless ../isEditable}}disabled{{/unless}}
class="wound-checkbox"
data-track="destin"
data-index="{{@index}}">
</div>
{{#each (range 8) as |lvl|}}
<div class="track-box destiny {{#if (lte lvl ../system.destin.lvl)}}filled{{/if}}"
{{#if ../isEditable}}data-action="trackBox" data-path="system.destin.lvl" data-index="{{lvl}}"{{/if}}></div>
{{/each}}
</div>
<div class="track-level">
@@ -55,15 +45,9 @@
<span class="track-title">{{localize "CELESTOPOL.Track.spleen"}}</span>
</div>
<div class="track-boxes spleen-boxes">
{{#each (array "s1" "s2" "s3" "s4" "s5" "s6" "s7" "s8") as |key|}}
<div class="track-box spleen {{#if (lookup ../system.spleen key 'checked')}}checked{{/if}}">
<input type="checkbox" name="system.spleen.{{key}}.checked"
{{#if (lookup ../system.spleen key 'checked')}}checked{{/if}}
{{#unless ../isEditable}}disabled{{/unless}}
class="wound-checkbox"
data-track="spleen"
data-index="{{@index}}">
</div>
{{#each (range 8) as |lvl|}}
<div class="track-box spleen {{#if (lte lvl ../system.spleen.lvl)}}filled{{/if}}"
{{#if ../isEditable}}data-action="trackBox" data-path="system.spleen.lvl" data-index="{{lvl}}"{{/if}}></div>
{{/each}}
</div>
<div class="track-level">