Files
fvtt-mournblade-cyd-2-0/templates/post-item.hbs
T
uberwald 2e14c70a02 Feat: Add 'Coût en Pouvoir' field to Rune items
Ajoute un champ numérique 'coutAme' (entier, défaut=0) pour les runes :
- DataModel: Ajout du champ dans modules/models/rune.mjs
- Template fiche: Ajout du champ 'Coût en Pouvoir' dans templates/item-rune-sheet.hbs
- Template post: Ajout de l'affichage dans templates/post-item.hbs

Ce champ permet de spécifier le coût en Pouvoir pour chaque rune,
et s'affiche à la fois dans la fiche et dans le chat.

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-05-24 16:44:45 +02:00

77 lines
3.7 KiB
Handlebars

<div class="mournblade-post-item" data-jsondata="{{jsondata}}">
{{!-- Header --}}
<div class="post-item-header">
{{#if img}}
<img class="post-item-img" src="{{img}}" title="{{name}}" />
{{/if}}
<div class="post-item-title">
<h3 class="post-item-name">{{name}}</h3>
<span class="post-item-type">{{type}}</span>
</div>
</div>
{{!-- Statistiques selon le type --}}
{{#if (eq type "arme")}}
<div class="post-item-stats">
{{#if system.typearme}}<div class="post-stat"><span class="stat-label">Type</span><span class="stat-value">{{system.typearme}}</span></div>{{/if}}
{{#if system.degats}}<div class="post-stat"><span class="stat-label">Dégâts</span><span class="stat-value">{{system.degats}}</span></div>{{/if}}
{{#if system.bonusmaniementoff}}<div class="post-stat"><span class="stat-label">Bonus off.</span><span class="stat-value">+{{system.bonusmaniementoff}}</span></div>{{/if}}
{{#if system.seuildefense}}<div class="post-stat"><span class="stat-label">Seuil def.</span><span class="stat-value">{{system.seuildefense}}</span></div>{{/if}}
</div>
{{/if}}
{{#if (eq type "protection")}}
<div class="post-item-stats">
{{#if system.protection}}<div class="post-stat"><span class="stat-label">Protection</span><span class="stat-value">{{system.protection}}</span></div>{{/if}}
{{#if system.adversitepoids}}<div class="post-stat"><span class="stat-label">Adv. poids</span><span class="stat-value">{{system.adversitepoids}}</span></div>{{/if}}
</div>
{{/if}}
{{#if (eq type "competence")}}
<div class="post-item-stats">
{{#if system.niveau}}<div class="post-stat"><span class="stat-label">Niveau</span><span class="stat-value">{{system.niveau}}</span></div>{{/if}}
{{#if (ne system.attribut1 "none")}}<div class="post-stat"><span class="stat-label">Attribut 1</span><span class="stat-value">{{upper system.attribut1}}</span></div>{{/if}}
{{#if (ne system.attribut2 "none")}}<div class="post-stat"><span class="stat-label">Attribut 2</span><span class="stat-value">{{upper system.attribut2}}</span></div>{{/if}}
</div>
{{!-- Prédilections pour les compétences --}}
{{#if system.predilections}}
<div class="post-item-predilections">
<h4>Prédilections</h4>
<ul>
{{#each system.predilections as |pred|}}
{{#if pred.name}}
<li>
<strong>{{pred.name}}</strong>
{{#if pred.description}}<span>: {{pred.description}}</span>{{/if}}
{{#if pred.maitrise}}<em> (Maîtrisée)</em>{{/if}}
{{#if pred.acquise}}<em> [Acquise]</em>{{/if}}
{{#if pred.used}}<em> [Utilisée]</em>{{/if}}
</li>
{{/if}}
{{/each}}
</ul>
</div>
{{/if}}
{{/if}}
{{#if (eq type "rune")}}
<div class="post-item-stats">
{{#if system.formule}}<div class="post-stat"><span class="stat-label">Formule</span><span class="stat-value">{{system.formule}}</span></div>{{/if}}
{{#if system.seuil}}<div class="post-stat"><span class="stat-label">Seuil</span><span class="stat-value">{{system.seuil}}</span></div>{{/if}}
{{#if system.prononcee}}<div class="post-stat post-stat-full"><span class="stat-label">{{localize "MNBL.pronounced"}}</span><span class="stat-value">{{system.prononcee}}</span></div>{{/if}}
{{#if system.tracee}}<div class="post-stat post-stat-full"><span class="stat-label">{{localize "MNBL.traced"}}</span><span class="stat-value">{{system.tracee}}</span></div>{{/if}}
{{#if system.coutAme}}<div class="post-stat"><span class="stat-label">Coût en Pouvoir</span><span class="stat-value">{{system.coutAme}}</span></div>{{/if}}
</div>
{{/if}}
{{!-- Description --}}
{{#if system.description}}
<div class="post-item-description">
{{{system.description}}}
</div>
{{/if}}
</div>