Ajout items et fiches

This commit is contained in:
2024-06-04 21:05:54 +02:00
parent 6b47cd3f40
commit 949baa8359
59 changed files with 4585 additions and 2180 deletions

View File

@ -42,6 +42,7 @@
<ul class="item-list alternate-list">
{{#each caracList as |char key|}}
<li class="item flexrow list-item carac-box">
<img class="sheet-competence-img" src="/systems/fvtt-te-deum/images/icons/{{key}}.webp" />
<label class="item-left-pad item-field item-field-label-medium">{{char.name}}</label>
<select type="text" class="input-numeric-short" name="system.caracteristiques.{{key}}.value"data-dtype="Number" />
{{selectOptions @root.config.descriptionValeur selected=char.value labelAttr="valeur"}}
@ -52,23 +53,46 @@
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item carac-box">
<label class="item-left-pad item-field item-field-label-medium">Providence</label>
<select type="text" class="input-numeric-short" name="system.providence.value" data-dtype="Number" />
{{selectOptions @root.config.providence selected=providence.value nameAttr="value" valueAttr="value" labelAttr="value"}}
</select>
<label class="item-field item-field-label-long">{{providence.qualite}}</label>
<label class="item-field item-field-label-short">{{providence.dice}}</label>
</li>
<li class="item flexrow list-item carac-box">
<label class="item-left-pad item-field item-field-label-medium">Bienveillance</label>
<input class="input-numeric-short" type="text" name="system.bienveillance.value" data-dtype="Number" />
<label class="item-field item-field-label-long"></label>
<label class="item-field item-field -label-short"></label>
</li>
</ul>
<div>
<ul class="item-list alternate-list">
<li class="item flexrow list-item carac-box">
<label class="item-left-pad item-field item-field-label-medium">Providence</label>
<select type="text" class="input-numeric-short" name="system.providence.value" data-dtype="Number" />
{{selectOptions @root.config.providence selected=providence.value nameAttr="value" valueAttr="value" labelAttr="value"}}
</select>
<label class="item-field item-field-label-long">{{providence.qualite}}</label>
<label class="item-field item-field-label-short">{{providence.dice}}</label>
</li>
<li class="item flexrow list-item carac-box">
<label class="item-left-pad item-field item-field-label-medium">Bienveillance</label>
<input class="input-numeric-short" type="text" name="system.bienveillance.value" data-dtype="Number" />
<label class="item-field item-field-label-long"></label>
<label class="item-field item-field -label-short"></label>
</li>
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-field-title-long">
<h3><label class="item-field-label-long">Graces</label></h3>
</span>
</li>
{{#each graces as |grace key|}}
<li class="item flexrow list-item list-item-shadow item-id" data-item-id="{{arme._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{grace.img}}" /></a>
<span class="item-field-label-long">
{{grace.name}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Supprimer l'arme"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
</div>
</div>
@ -79,6 +103,7 @@
{{#each arbreCompetences as |carac key|}}
<ul>
<li class="flexrow">
<img class="sheet-competence-img" src="/systems/fvtt-te-deum/images/icons/{{key}}.webp" />
<h3 class="item-field-label-long14" data-tooltip="Caracteristique">{{carac.name}} : {{carac.qualite}}</h3>
<label class="item-field item-field-label-short">{{carac.value}}</label>
<label class="item-field item-field-label-medium">{{carac.dice}} (xp : {{carac.experience}})</label>
@ -100,36 +125,6 @@
</div>
<div class="tab traits" data-group="primary" data-tab="traits">
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long2">
<h3><label class="item-name-label-header-long2">Traits</label></h3>
</span>
<span class="item-field-label-short">
<label class="item-field-label-short">Niveau</label>
</span>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="trait" title="Create Trait"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each traits as |trait key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{trait._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{trait.img}}" /></a>
<span class="item-name-label-long2">{{trait.name}}</span>
<span class="item-field-label-short"><label>{{trait.system.level}}</label></span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete trait"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
</div>
<div class="tab combat" data-group="primary" data-tab="combat">
@ -138,32 +133,36 @@
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header-long2">
<h3><label class="item-name-label-header-long2">{{localize "ECRY.ui.weapons"}}</label></h3>
<span class="item-field-title-long">
<h3><label class="item-field-label-long">Armes</label></h3>
</span>
<span class="item-field-label-medium">
<label class="item-field-label-medium">{{localize "ECRY.ui.type"}}</label>
<label class="item-field-label-medium">Type</label>
</span>
<span class="item-field-label-medium">
<label class="item-field-label-medium">{{localize "ECRY.ui.effect"}}</label>
<label class="item-field-label-medium">Compétence</label>
</span>
<span class="item-field-label-medium">
<label class="item-field-label-medium">Degats</label>
</span>
</li>
{{#each weapons as |weapon key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}">
{{#each armes as |arme key|}}
<li class="item flexrow list-item list-item-shadow item-id" data-item-id="{{arme._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{weapon.img}}" /></a>
<span class="item-name-label-long2">
<a class="roll-weapon-confront" data-category-key="{{categkey}}" data-skill-key="{{skillkey}}">
<i class="fa-regular fa-swords"></i>
{{weapon.name}}
src="{{arme.img}}" /></a>
<span class="item-field-label-long">
<a class="roll-arme">
{{arme.name}}
</a>
</span>
<span class="item-field-label-medium">{{localize (concat "ECRY.ui." weapon.system.weapontype)}}</span>
<span class="item-field-label-medium">{{weapon.system.effect}}</span>
<span class="item-field-label-medium">{{upperFirst arme.system.typeArme}}</span>
<span class="item-field-label-medium">{{upperFirst arme.system.competence}}</span>
<span class="item-field-label-medium">{{arme.system.degats}}</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete weapon"><i class="fas fa-trash"></i></a>
<a class="item-control item-edit" title="Editer"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="Supprimer l'arme"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}

View File

@ -22,18 +22,60 @@
<li class="flexrow">
<label class="item-name-label-long">Type d'arme</label>
<select name="system.typeArme">
{{selectOptions config.armeTypes selected=system.typeArme labelAttr="label" blank=""}}
{{selectOptions config.armeTypes selected=system.typeArme labelAttr="label"}}
</select>
</li>
<li class="flexrow">
<label class="item-name-label-long">Compétence</label>
<select name="system.competence">
{{selectOptions config.armeCompetences selected=system.competence labelAttr="label"}}
</select>
</li>
<li class="flexrow">
<label class="item-name-label-long">Compétence secondaire</label>
<select name="system.competence2">
{{selectOptions config.armeCompetences selected=system.competence2 blank="" labelAttr="label"}}
</select>
</li>
<h3>Spécificités</h3>
<li class="flexrow">
<label class="item-name-label-long">Dégâts</label>
<input type="text" class="padd-right numeric-input item-field-label-short"
name="system.degats" value="{{system.degats}}" data-dtype="String" />
</li>
{{#if (eq system.typeArme "melee")}}
<li class="flexrow">
<label class="item-name-label-long">Allonge</label>
<select name="system.allonge">
{{selectOptions config.armeAllonges selected=system.allonge labelAttr="label"}}
</select>
</li>
{{/if}}
{{#each system.specificites as |spec specId|}}
<li class="flexrow">
{{#if (isSpecArmeType specId @root.system.typeArme)}}
<label class="item-name-label-long">{{getConfigLabel "ARME_SPECIFICITE" specId}}</label>
<input type="checkbox" name="system.specificites.{{specId}}.hasSpec" {{checked
spec.hasSpec}} />
{{/if}}
</li>
{{/each}}
{{#if (eq system.typeArme "tir")}}
<h3>Portées</h3>
{{#each system.portees as |portee porteeId|}}
<li class="flexrow">
<label class="item-name-label-long">{{getConfigLabel "ARME_PORTEES" porteeId}}</label>
<input type="text" class="padd-right numeric-input item-field-label-short"
name="system.portees.{{porteeId}}.value" value="{{portee.value}}" data-dtype="Number" />
</li>
{{/each}}
{{/if}}
<h3>Degats sur armures</h3>
{{#each system.degatsArmure as |degat degtId|}}
<li class="flexrow">
<label class="item-name-label-long">{{getConfigLabel "degatsArmure" degtId}}</label>
@ -42,6 +84,7 @@
</li>
{{/each}}
<h3>Autres</h3>
<li class="flexrow">
<label class="item-name-label-long">Bonus d'Initiative</label>
<input type="text" class="padd-right numeric-input item-field-label-short"

View File

@ -36,17 +36,6 @@
name="system.score" value="{{system.score}}" data-dtype="Number" />
</li>
<li class="flexrow">
<label class="item-name-label-long">Score de base</label>
{{#if isGM}}
<input type="text" class="padd-right numeric-input item-field-label-short"
name="system.scoreBase" value="{{system.scoreBase}}" data-dtype="Number" />
{{else}}
<input type="text" class="padd-right numeric-input item-field-label-short"
name="system.scoreBase" value="{{system.scoreBase}}" data-dtype="Number" disabled />
{{/if}}
</li>
</ul>
</div>
</div>

View File

@ -0,0 +1,34 @@
<form class="{{cssClass}}" autocomplete="off">
<header class="sheet-header">
<img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}" />
<div class="header-fields">
<h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name" /></h1>
</div>
</header>
{{> systems/fvtt-te-deum/templates/items/partial-item-nav.hbs}}
{{!-- Sheet Body --}}
<section class="sheet-body">
{{> systems/fvtt-te-deum/templates/items/partial-item-description.hbs}}
<div class="tab details" data-group="primary" data-tab="details">
<div class="tab" data-group="primary">
<h4 class="item-name-label-long">Prérequis</h4>
<textarea name="system.prerequis" data-dtype="String">
{{{system.prerequis}}}
</textarea>
<h4 class="item-name-label-long">Effet</h4>
<textarea name="system.effet" data-dtype="String">
{{{system.effet}}}
</textarea>
</div>
</div>
</section>
</form>