Files
fvtt-celestopol/templates/npc-main.hbs

88 lines
3.4 KiB
Handlebars

<div class="npc-main sheet-part">
<header class="sheet-header">
<div class="portrait" data-action="editImage">
<img src="{{actor.img}}" alt="{{actor.name}}" class="actor-portrait">
</div>
<div class="header-fields">
<div class="charname">
{{#if isEditMode}}
<input type="text" name="name" value="{{actor.name}}">
{{else}}
<h1 class="actor-name">{{actor.name}}</h1>
{{/if}}
</div>
<div class="concept-row">
{{#if isEditMode}}
<input type="text" name="system.concept" value="{{system.concept}}"
placeholder="{{localize 'CELESTOPOL.Actor.concept'}}">
{{else}}
<span class="concept-display">{{system.concept}}</span>
{{/if}}
</div>
{{!-- Type PNJ (standard / antagoniste) --}}
<div class="npc-type-row">
{{#if isEditMode}}
<select name="system.npcType" class="npc-type-select">
{{#each npcTypes as |ntype key|}}
<option value="{{key}}" {{#if (eq key ../system.npcType)}}selected{{/if}}>{{localize ntype.label}}</option>
{{/each}}
</select>
{{else}}
{{#if (eq system.npcType "antagoniste")}}
<span class="npc-type-badge antagoniste">{{localize "CELESTOPOL.NPC.typeAntagoniste"}}</span>
{{/if}}
{{/if}}
</div>
<div class="header-stats-row">
<div class="header-stat">
<label>{{localize "CELESTOPOL.Actor.initiative"}}</label>
<span>{{system.initiative}}</span>
</div>
<div class="header-stat">
<label>{{localize "CELESTOPOL.Actor.anomaly"}}</label>
{{#if isEditMode}}
<select name="system.anomaly.type">
{{#each anomalyTypes as |atype key|}}
<option value="{{key}}" {{#if (eq key ../system.anomaly.type)}}selected{{/if}}>{{localize atype.label}}</option>
{{/each}}
</select>
<input type="number" name="system.anomaly.value" value="{{system.anomaly.value}}" min="0" max="8" class="small-input">
{{else}}
<span class="anomaly-type-display">{{localize (lookup (lookup anomalyTypes system.anomaly.type) 'label')}}</span>
{{/if}}
</div>
{{#with (lookup woundLevels system.blessures.lvl) as |wound|}}
{{#if wound.id}}
<div class="header-stat wound-status-badge wound-level-{{wound.id}}">
<label>{{localize "CELESTOPOL.Wound.status"}}</label>
<span class="wound-value">
<span class="wound-label">{{localize wound.label}}</span>
{{#if wound.duration}}<span class="wound-duration"> — {{localize wound.duration}}</span>{{/if}}
{{#if wound.malus}}<span class="wound-malus"> ({{wound.malus}})</span>{{/if}}
</span>
</div>
{{/if}}
{{/with}}
{{!-- Badge malus armure équipée --}}
{{#if armorMalus}}
<div class="header-stat armor-malus-badge">
<label>{{localize "CELESTOPOL.Armure.malusLabel"}}</label>
<span>{{armorMalus}}</span>
</div>
{{/if}}
</div>
</div>
<div class="header-buttons">
<a class="moon-standalone-btn" data-action="rollMoonDie" title="{{localize 'CELESTOPOL.Moon.standaloneTitle'}}">
🌙
</a>
<a data-action="toggleSheet">
<i class="fas {{#if isEditMode}}fa-eye{{else}}fa-edit{{/if}}"></i>
</a>
</div>
</header>
</div>