Ajout contrôles chance actuelle

This commit is contained in:
Vincent Vandemeulebrouck 2020-12-04 23:46:13 +01:00
parent 424b616891
commit c5c6d6208d
2 changed files with 33 additions and 33 deletions

View File

@ -42,8 +42,8 @@ export class RdDActorHumanoideSheet extends ActorSheet {
data.data.carac.taille.isTaille = true; // To avoid button link;
data.data.carac.chance.isChance = true; // Ajouter chance actuelle et utiliser;
data.data.compteurs.chance.isChance = true;
data.data.blessures.resume = this.actor.computeResumeBlessure(data.data.blessures);
data.data.competencecreature = data.itemsByType["competencecreature"];
data.data.isGM = game.user.isGM;

View File

@ -71,6 +71,10 @@
<span class="tooltiptext">{{{data.fatigue.html}}}</span>
</span>
<span>{{data.blessures.resume}}</span>
<span>{{data.compteurs.etat.label}}: {{data.compteurs.etat.value}}</span>
</div>
<div class="flexrow">
<span>{{data.compteurs.surenc.label}}: {{data.compteurs.surenc.value}}</span>
</div>
</div>
</div>
@ -103,12 +107,12 @@
{{else}}
<span class="carac-label flexrow" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span>
{{/if}}
{{#if carac.derivee}}
<label class="competence-value flexrow">{{carac.value}}</label>
{{else}}
<input class="carac-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.data.editCaracComp}}disabled{{/unless}} />
<input class="competence-xp flexrow" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}} />
{{/if}}
{{#if carac.derivee}}
<label class="competence-value flexrow">{{carac.value}}</label>
{{else}}
<input class="carac-value flexrow" type="text" name="data.carac.{{key}}.value" value="{{carac.value}}" data-dtype="{{carac.type}}" {{#unless @root.data.editCaracComp}}disabled{{/unless}} />
<input class="competence-xp flexrow" type="text" name="data.carac.{{key}}.xp" value="{{carac.xp}}" data-dtype="number" {{#unless @root.data.editCaracComp}}disabled{{/unless}} />
{{/if}}
</li>
{{/each}}
<li class="competence flexrow">
@ -120,14 +124,30 @@
<div class="flex-group-left flexcol" >
<ul class="carac-list">
{{#each data.attributs as |attr key|}}
<li class="competence flexrow" data-attribute="{{key}}">
<span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} : {{attr.value}}</span>
</li>
<li class="competence flexrow list-item" data-attribute="{{key}}">
<span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} : {{attr.value}}</span>
</li>
{{/each}}
{{#each data.sante as |point key|}}
<li class="competence flexrow" data-attribute="{{key}}">
<span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{point.label}} : {{point.value}} / {{point.max}}</span>
</ul>
<ul class="carac-list alterne-list">
<li class="competence flexrow list-item">
<span class="generic-label" id="chance-actuel"><a>Chance actuelle</a></span>
<input class="compteur-edit" id="chance-edit" type="text" name="chance" value="{{data.compteurs.chance.value}}" data-dtype="number"/>
<a class="item-control stress-test" id="chance-appel">Utiliser</a>
</li>
{{#each data.compteurs as |compteur key|}}
{{#if compteur.isChance}}
{{else if compteur.isInput}}
<li class="competence flexrow list-item">
<span class="generic-label">{{compteur.label}}</span>
<input class="compteur-edit" id="{{key}}-edit" type="text" name="{{key}}" value="{{compteur.value}}" data-dtype="number"/>
{{#if compteur.isStress}}
<a class="item-control stress-test" id="stress-test" title="Transformer">Transformer</a>
{{else}}
<label></label>
{{/if}}
</li>
{{/if}}
{{/each}}
</ul>
</div>
@ -321,26 +341,6 @@
{{!-- Compteurs/Blessures Tab --}}
<div class="tab blessurescompteurs" data-group="primary" data-tab="blessurescompteurs">
<div class="flex-group-left">
<ul class="item-list flexrow">
{{#each data.compteurs as |compteur key|}}
<li class="item list-item">
<span class="competence-label">{{compteur.label}}</span>
{{#if compteur.isInput}}
<input class="stress-value stress-style compteur-edit" id="{{key}}-edit" type="text" name="{{key}}" value="{{compteur.value}}" data-dtype="number"/>
{{#if compteur.isStress}}
<a class="item-control stress-test" id="stress-test" title="Faire un jet de Stress">Faire un jet de Stress</a>
{{else}}
<label></label>
{{/if}}
<label></label>
{{else}}
<span class="competence-label">{{compteur.value}}</span>
{{/if}}
</li>
{{/each}}
</ul>
</div>
{{!-- Liste de blessures --}}
<div class="flex-group-left flexcol competence-column">
<h3 class="blessures-title">Blessures Légeres :</h3>