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.taille.isTaille = true; // To avoid button link;
data.data.carac.chance.isChance = true; // Ajouter chance actuelle et utiliser; 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.blessures.resume = this.actor.computeResumeBlessure(data.data.blessures);
data.data.competencecreature = data.itemsByType["competencecreature"]; data.data.competencecreature = data.itemsByType["competencecreature"];
data.data.isGM = game.user.isGM; data.data.isGM = game.user.isGM;

View File

@ -71,6 +71,10 @@
<span class="tooltiptext">{{{data.fatigue.html}}}</span> <span class="tooltiptext">{{{data.fatigue.html}}}</span>
</span> </span>
<span>{{data.blessures.resume}}</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> </div>
</div> </div>
@ -103,12 +107,12 @@
{{else}} {{else}}
<span class="carac-label flexrow" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span> <span class="carac-label flexrow" name="data.carac.{{key}}.label"><a name={{key}}>{{carac.label}}</a></span>
{{/if}} {{/if}}
{{#if carac.derivee}} {{#if carac.derivee}}
<label class="competence-value flexrow">{{carac.value}}</label> <label class="competence-value flexrow">{{carac.value}}</label>
{{else}} {{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="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}} /> <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}}
</li> </li>
{{/each}} {{/each}}
<li class="competence flexrow"> <li class="competence flexrow">
@ -120,14 +124,30 @@
<div class="flex-group-left flexcol" > <div class="flex-group-left flexcol" >
<ul class="carac-list"> <ul class="carac-list">
{{#each data.attributs as |attr key|}} {{#each data.attributs as |attr key|}}
<li class="competence flexrow" data-attribute="{{key}}"> <li class="competence flexrow list-item" data-attribute="{{key}}">
<span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} : {{attr.value}}</span> <span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{attr.label}} : {{attr.value}}</span>
</li> </li>
{{/each}} {{/each}}
{{#each data.sante as |point key|}} </ul>
<li class="competence flexrow" data-attribute="{{key}}"> <ul class="carac-list alterne-list">
<span class="competence-label flexrow" name="data.attributs.{{key}}.label">{{point.label}} : {{point.value}} / {{point.max}}</span> <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> </li>
{{/if}}
{{/each}} {{/each}}
</ul> </ul>
</div> </div>
@ -321,26 +341,6 @@
{{!-- Compteurs/Blessures Tab --}} {{!-- Compteurs/Blessures Tab --}}
<div class="tab blessurescompteurs" data-group="primary" data-tab="blessurescompteurs"> <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 --}} {{!-- Liste de blessures --}}
<div class="flex-group-left flexcol competence-column"> <div class="flex-group-left flexcol competence-column">
<h3 class="blessures-title">Blessures Légeres :</h3> <h3 class="blessures-title">Blessures Légeres :</h3>