Second round de corrections et améliorations
This commit is contained in:
267
templates/actors/creature-sheet.html
Normal file
267
templates/actors/creature-sheet.html
Normal file
@@ -0,0 +1,267 @@
|
||||
<div class="{{cssClass}} flexcol creature-sheet">
|
||||
|
||||
{{!-- ── HEADER ── --}}
|
||||
<header class="creature-header">
|
||||
<div class="creature-header-img">
|
||||
<img class="profile" src="{{img}}" data-edit="img" title="{{name}}" />
|
||||
</div>
|
||||
|
||||
<div class="creature-header-body">
|
||||
<input class="creature-name" name="name" type="text" value="{{name}}" placeholder="{{ localize 'MGT2.Creature.Name' }}" />
|
||||
|
||||
<div class="creature-stats-row">
|
||||
{{!-- PdV --}}
|
||||
<div class="creature-stat">
|
||||
<label class="upcase">{{ localize 'MGT2.Creature.Life' }}</label>
|
||||
<div class="creature-stat-value">
|
||||
<input type="number" name="system.life.value" value="{{system.life.value}}" min="0" class="stat-current" />
|
||||
<span>/</span>
|
||||
<input type="number" name="system.life.max" value="{{system.life.max}}" min="0" class="stat-max" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{!-- Vitesse --}}
|
||||
<div class="creature-stat">
|
||||
<label class="upcase">{{ localize 'MGT2.Creature.Speed' }}</label>
|
||||
<div class="creature-stat-value">
|
||||
<input type="number" name="system.speed" value="{{system.speed}}" min="0" class="stat-current" />
|
||||
<span class="stat-unit">m</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{!-- Armure --}}
|
||||
<div class="creature-stat">
|
||||
<label class="upcase">{{ localize 'MGT2.Creature.Armor' }}</label>
|
||||
<div class="creature-stat-value">
|
||||
<input type="number" name="system.armor" value="{{system.armor}}" min="0" class="stat-current" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{!-- Initiative (calculated) --}}
|
||||
<div class="creature-stat">
|
||||
<label class="upcase">{{ localize 'MGT2.Creature.Initiative' }}</label>
|
||||
<div class="creature-stat-value">
|
||||
<span class="stat-readonly">{{showDM system.initiativeBonus}}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{!-- PSI (shown only if > 0) --}}
|
||||
{{#if system.psi}}
|
||||
<div class="creature-stat">
|
||||
<label class="upcase">{{ localize 'MGT2.Creature.Psi' }}</label>
|
||||
<div class="creature-stat-value">
|
||||
<input type="number" name="system.psi" value="{{system.psi}}" min="0" class="stat-current" />
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
{{!-- Comportement --}}
|
||||
<div class="creature-behavior-row">
|
||||
<label class="upcase">{{ localize 'MGT2.Creature.Behavior' }}</label>
|
||||
<select name="system.behavior.type" class="behavior-select">
|
||||
<option value="">—</option>
|
||||
{{selectOptions config.CreatureBehaviorType selected=system.behavior.type localize=true}}
|
||||
</select>
|
||||
<span class="behavior-sep">,</span>
|
||||
<select name="system.behavior.subtype" class="behavior-select">
|
||||
<option value="">—</option>
|
||||
{{selectOptions config.CreatureBehaviorSubType selected=system.behavior.subtype localize=true}}
|
||||
</select>
|
||||
|
||||
{{!-- Taille indicative --}}
|
||||
<span class="creature-size-badge" title="{{ localize 'MGT2.Creature.SizeHint' }}">
|
||||
{{sizeTraitLabel}} — {{sizeLabel}}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{!-- ── TAB CONTENT ── --}}
|
||||
<div class="creature-body">
|
||||
|
||||
|
||||
{{!-- ── TAB : COMPÉTENCES ── --}}
|
||||
<div class="tab" data-group="primary" data-tab="skills">
|
||||
<div class="table-container">
|
||||
<div class="table-row heading color-1">
|
||||
<div class="row-item row-item-left upcase" style="flex: 3">{{ localize 'MGT2.Creature.SkillName' }}</div>
|
||||
<div class="row-item row-item-center upcase" style="flex: 1">{{ localize 'MGT2.Creature.SkillLevel' }}</div>
|
||||
<div class="row-item row-item-left upcase" style="flex: 3">{{ localize 'MGT2.Creature.SkillNote' }}</div>
|
||||
<div class="row-item row-item-right" style="flex: 0 0 3rem">
|
||||
<a data-action="addSkill" data-prop="skills" title="{{ localize 'MGT2.Creature.AddSkill' }}"><i class="fas fa-plus"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#each system.skills as |skill i|}}
|
||||
<div class="table-row">
|
||||
<div class="row-item row-item-left" style="flex: 3">
|
||||
{{#if ../isEditable}}
|
||||
<input type="text" name="system.skills.{{i}}.name" value="{{skill.name}}" placeholder="{{ localize 'MGT2.Creature.SkillName' }}" />
|
||||
{{else}}
|
||||
<span>{{skill.name}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="row-item row-item-center" style="flex: 1">
|
||||
{{#if ../isEditable}}
|
||||
<input type="number" name="system.skills.{{i}}.level" value="{{skill.level}}" min="-3" max="6" class="text-center" />
|
||||
{{else}}
|
||||
<span>{{showDM skill.level}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="row-item row-item-left" style="flex: 3">
|
||||
{{#if ../isEditable}}
|
||||
<input type="text" name="system.skills.{{i}}.note" value="{{skill.note}}" placeholder="{{ localize 'MGT2.Creature.SkillNote' }}" />
|
||||
{{else}}
|
||||
<span class="text-muted">{{skill.note}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="row-item row-item-right item-controls" style="flex: 0 0 3rem">
|
||||
<a data-action="rollSkill" data-index="{{i}}" title="{{ localize 'MGT2.Creature.RollSkill' }}"><i class="fas fa-dice-d6"></i></a>
|
||||
{{#if ../isEditable}}
|
||||
<a data-action="deleteSkill" data-prop="skills" data-index="{{i}}" title="{{ localize 'MGT2.Creature.Delete' }}"><i class="fas fa-trash"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
{{#unless system.skills.length}}
|
||||
<div class="table-row">
|
||||
<div class="row-item row-item-center text-muted" style="flex:1">{{ localize 'MGT2.Creature.NoSkills' }}</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{!-- ── TAB : ATTAQUES ── --}}
|
||||
<div class="tab" data-group="primary" data-tab="attacks">
|
||||
<div class="table-container">
|
||||
<div class="table-row heading color-1">
|
||||
<div class="row-item row-item-left upcase" style="flex: 3">{{ localize 'MGT2.Creature.AttackName' }}</div>
|
||||
<div class="row-item row-item-center upcase" style="flex: 2">{{ localize 'MGT2.Creature.AttackDamage' }}</div>
|
||||
<div class="row-item row-item-left upcase" style="flex: 3">{{ localize 'MGT2.Items.Description' }}</div>
|
||||
<div class="row-item row-item-right" style="flex: 0 0 4rem">
|
||||
{{#if isEditable}}
|
||||
<a data-action="addAttack" data-prop="attacks" title="{{ localize 'MGT2.Creature.AddAttack' }}"><i class="fas fa-plus"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#each system.attacks as |atk i|}}
|
||||
<div class="table-row">
|
||||
<div class="row-item row-item-left" style="flex: 3">
|
||||
{{#if ../isEditable}}
|
||||
<input type="text" name="system.attacks.{{i}}.name" value="{{atk.name}}" placeholder="{{ localize 'MGT2.Creature.AttackName' }}" />
|
||||
{{else}}
|
||||
<span>{{atk.name}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="row-item row-item-center creature-damage" style="flex: 2">
|
||||
{{#if ../isEditable}}
|
||||
<input type="text" name="system.attacks.{{i}}.damage" value="{{atk.damage}}" class="text-center" />
|
||||
{{else}}
|
||||
<span class="damage-formula">{{atk.damage}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="row-item row-item-left" style="flex: 3">
|
||||
{{#if ../isEditable}}
|
||||
<input type="text" name="system.attacks.{{i}}.description" value="{{atk.description}}" />
|
||||
{{else}}
|
||||
<span class="text-muted">{{atk.description}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="row-item row-item-right item-controls" style="flex: 0 0 4rem">
|
||||
<a data-action="rollAttack" data-index="{{i}}" title="{{ localize 'MGT2.Creature.RollAttack' }}"><i class="fas fa-dice-d6 color-primary"></i></a>
|
||||
{{#if ../isEditable}}
|
||||
<a data-action="deleteAttack" data-prop="attacks" data-index="{{i}}" title="{{ localize 'MGT2.Creature.Delete' }}"><i class="fas fa-trash"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
{{#unless system.attacks.length}}
|
||||
<div class="table-row">
|
||||
<div class="row-item row-item-center text-muted" style="flex:1">{{ localize 'MGT2.Creature.NoAttacks' }}</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{!-- ── TAB : TRAITS ── --}}
|
||||
<div class="tab" data-group="primary" data-tab="traits">
|
||||
<div class="table-container">
|
||||
<div class="table-row heading color-1">
|
||||
<div class="row-item row-item-left upcase" style="flex: 3">{{ localize 'MGT2.Creature.TraitName' }}</div>
|
||||
<div class="row-item row-item-center upcase" style="flex: 1">{{ localize 'MGT2.Creature.TraitValue' }}</div>
|
||||
<div class="row-item row-item-left upcase" style="flex: 4">{{ localize 'MGT2.Items.Description' }}</div>
|
||||
<div class="row-item row-item-right" style="flex: 0 0 3rem">
|
||||
{{#if isEditable}}
|
||||
<a data-action="addTrait" data-prop="traits" title="{{ localize 'MGT2.Creature.AddTrait' }}"><i class="fas fa-plus"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#each system.traits as |trait i|}}
|
||||
<div class="table-row">
|
||||
<div class="row-item row-item-left" style="flex: 3">
|
||||
{{#if ../isEditable}}
|
||||
<input type="text" name="system.traits.{{i}}.name" value="{{trait.name}}" placeholder="{{ localize 'MGT2.Creature.TraitName' }}" />
|
||||
{{else}}
|
||||
<span class="trait-name">{{trait.name}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="row-item row-item-center" style="flex: 1">
|
||||
{{#if ../isEditable}}
|
||||
<input type="text" name="system.traits.{{i}}.value" value="{{trait.value}}" class="text-center" />
|
||||
{{else}}
|
||||
<span class="trait-value">{{trait.value}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="row-item row-item-left" style="flex: 4">
|
||||
{{#if ../isEditable}}
|
||||
<input type="text" name="system.traits.{{i}}.description" value="{{trait.description}}" />
|
||||
{{else}}
|
||||
<span class="text-muted">{{trait.description}}</span>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="row-item row-item-right item-controls" style="flex: 0 0 3rem">
|
||||
{{#if ../isEditable}}
|
||||
<a data-action="deleteTrait" data-prop="traits" data-index="{{i}}" title="{{ localize 'MGT2.Creature.Delete' }}"><i class="fas fa-trash"></i></a>
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
{{#unless system.traits.length}}
|
||||
<div class="table-row">
|
||||
<div class="row-item row-item-center text-muted" style="flex:1">{{ localize 'MGT2.Creature.NoTraits' }}</div>
|
||||
</div>
|
||||
{{/unless}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{!-- ── TAB : INFORMATIONS ── --}}
|
||||
<div class="tab" data-group="primary" data-tab="info">
|
||||
<div class="creature-info-tab">
|
||||
<div class="field-group mt-1">
|
||||
<label class="upcase">{{ localize 'MGT2.Items.Description' }}</label>
|
||||
<textarea name="system.biography" rows="8" class="creature-description">{{system.biography}}</textarea>
|
||||
</div>
|
||||
<div class="field-group mt-1">
|
||||
<label class="upcase">{{ localize 'MGT2.Items.Notes' }}</label>
|
||||
<textarea name="system.notes" rows="4" class="creature-description">{{system.notes}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{!-- ── VERTICAL SIDEBAR TABS (outside window, right side) ── --}}
|
||||
<nav class="sheet-sidebar tabs" data-group="primary">
|
||||
<a class="item tab-select" data-tab="skills" title="{{ localize 'MGT2.Creature.TabSkills' }}"><i class="fa-solid fa-head-side"></i><span class="tab-label">COMP.</span></a>
|
||||
<a class="item tab-select" data-tab="attacks" title="{{ localize 'MGT2.Creature.TabAttacks' }}"><i class="fa-solid fa-bolt"></i><span class="tab-label">ATT.</span></a>
|
||||
<a class="item tab-select" data-tab="traits" title="{{ localize 'MGT2.Creature.TabTraits' }}"><i class="fa-solid fa-star"></i><span class="tab-label">TRAITS</span></a>
|
||||
<a class="item tab-select" data-tab="info" title="{{ localize 'MGT2.Creature.TabInfo' }}"><i class="fa-solid fa-circle-info"></i><span class="tab-label">INFO</span></a>
|
||||
</nav>
|
||||
|
||||
</div>{{!-- .creature-body --}}
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user