Refonte complète du système Anomalies
- DataModel : renommage value→level (1-4), ajout usesRemaining (0-4), suppression scores/notes - Config : ajout ANOMALY_DEFINITIONS avec compétences applicables par type (8 anomalies) - Fiche item anomalie : header avec level/uses visuels (dots), barre de compétences applicables, 2 onglets Description + Technique/Narratif (suppression onglet Scores) - Fiche PJ onglet Domaines : bloc anomalie proéminent unique avec: - Nom + sous-type + icône - Dots niveau (●●○○) - Dots usages + bouton Utiliser + bouton Réinitialiser - Chips des domaines applicables - Actions : useAnomaly (décrémente usesRemaining), resetAnomalyUses (reset au niveau) - Contrainte : max 1 anomalie par personnage (drop + createAnomaly) - Helpers HBS : lte, gte, lt ajoutés - i18n : nouvelles clés Anomaly.* (level, usesRemaining, use, resetUses, etc.) - CSS : .anomaly-block sur fiche PJ, dots animés, .anomaly-uses-row sur fiche item Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -11,19 +11,51 @@
|
||||
<option value="{{key}}" {{#if (eq key ../system.subtype)}}selected{{/if}}>{{localize atype.label}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<div class="item-value-field">
|
||||
<label>{{localize "CELESTOPOL.Item.value"}}</label>
|
||||
<input type="number" name="system.value" value="{{system.value}}" min="0" max="8"
|
||||
{{#unless isEditable}}disabled{{/unless}}>
|
||||
<div class="anomaly-level-field">
|
||||
<label>{{localize "CELESTOPOL.Anomaly.level"}}</label>
|
||||
{{#if isEditable}}
|
||||
<input type="number" name="system.level" value="{{system.level}}" min="1" max="4" class="level-input">
|
||||
{{else}}
|
||||
<span class="anomaly-level-value">{{system.level}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{!-- Usages restants : dots visuels --}}
|
||||
<div class="anomaly-uses-row">
|
||||
<span class="anomaly-uses-label">{{localize "CELESTOPOL.Anomaly.usesRemaining"}} :</span>
|
||||
<div class="anomaly-uses-dots">
|
||||
{{#each (array 1 2 3 4) as |n|}}
|
||||
{{#if (lte n ../system.usesRemaining)}}
|
||||
<span class="anomaly-dot available"></span>
|
||||
{{else}}
|
||||
{{#if (lte n ../system.level)}}
|
||||
<span class="anomaly-dot spent"></span>
|
||||
{{else}}
|
||||
<span class="anomaly-dot inactive"></span>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</div>
|
||||
{{#if isEditable}}
|
||||
<input type="number" name="system.usesRemaining" value="{{system.usesRemaining}}" min="0" max="4" class="uses-number-input">
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- Domaines applicables --}}
|
||||
{{#if applicableSkillLabels.length}}
|
||||
<div class="anomaly-skills-bar">
|
||||
<span class="anomaly-skills-label">{{localize "CELESTOPOL.Anomaly.applicableSkills"}} :</span>
|
||||
{{#each applicableSkillLabels as |label|}}
|
||||
<span class="anomaly-skill-chip">{{label}}</span>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<nav class="item-tabs sheet-tabs tabs" data-group="item-tabs">
|
||||
<a class="item active" data-group="item-tabs" data-tab="description">{{localize "CELESTOPOL.Tab.description"}}</a>
|
||||
<a class="item" data-group="item-tabs" data-tab="technique">{{localize "CELESTOPOL.Tab.technique"}}</a>
|
||||
<a class="item" data-group="item-tabs" data-tab="scores">{{localize "CELESTOPOL.Item.scores"}}</a>
|
||||
</nav>
|
||||
|
||||
<section class="tab active" data-group="item-tabs" data-tab="description">
|
||||
@@ -47,8 +79,4 @@
|
||||
{{editor system.narratif target="system.narratif" button=true editable=isEditable}}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="tab" data-group="item-tabs" data-tab="scores">
|
||||
{{> "systems/fvtt-celestopol/templates/partials/item-scores.hbs" skills=skills stats=stats system=system}}
|
||||
</section>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user