Gestions des tentatives #510

Merged
vincent.vandeme merged 8 commits from v1.5-tentatives into v1.5 2021-10-30 09:46:54 +02:00
5 changed files with 14 additions and 3 deletions
Showing only changes of commit 0df7f97513 - Show all commits

View File

@ -2574,6 +2574,7 @@ export class RdDActor extends Actor {
rollData.appliquerFatigue = ReglesOptionelles.isUsing("appliquer-fatigue"); rollData.appliquerFatigue = ReglesOptionelles.isUsing("appliquer-fatigue");
rollData.tache = duplicate(rollData.tache); rollData.tache = duplicate(rollData.tache);
rollData.tache.data.points_de_tache_courant += rollData.rolled.ptTache; rollData.tache.data.points_de_tache_courant += rollData.rolled.ptTache;
rollData.tache.data.tentatives++;
if (rollData.rolled.isETotal) { if (rollData.rolled.isETotal) {
rollData.tache.data.difficulte--; rollData.tache.data.difficulte--;
} }

View File

@ -6,7 +6,7 @@
"manifestPlusVersion": "1.0.0", "manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.8.0", "minimumCoreVersion": "0.8.0",
"compatibleCoreVersion": "0.8.9", "compatibleCoreVersion": "0.8.9",
"templateVersion": 124, "templateVersion": 125,
"author": "LeRatierBretonnien", "author": "LeRatierBretonnien",
"authors": [ "authors": [
{ {

View File

@ -719,6 +719,7 @@
"difficulte": 0, "difficulte": 0,
"points_de_tache": 0, "points_de_tache": 0,
"points_de_tache_courant": 0, "points_de_tache_courant": 0,
"tentatives": 0,
"description": "", "description": "",
"descriptionmj": "" "descriptionmj": ""
}, },

View File

@ -6,8 +6,11 @@
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/chat-infojet.html"}}
<hr> <hr>
<div> <div>
Après {{tache.data.periodicite}} {{alias}} a obtenu {{rolled.ptTache}} point{{~#if (gt rolled.ptTache 1)}}s{{/if}} de tâche, {{alias}} a obtenu {{rolled.ptTache}} point{{~#unless (eq rolled.ptTache 1)}}s{{/unless}} de tâche,
son avancement est de <span class="rdd-roll-{{#if (gt tache.data.points_de_tache_courant 0)}}norm{{else}}etotal{{/if}}">{{tache.data.points_de_tache_courant}} sur {{tache.data.points_de_tache}}</span> point{{~#if (gt tache.data.points_de_tache_courant 1)}}s{{/if}} de tâche. son avancement est de
<span class="rdd-roll-{{#if (gt tache.data.points_de_tache_courant 0)}}norm{{else}}etotal{{/if}}">{{tache.data.points_de_tache_courant}} sur {{tache.data.points_de_tache}}</span>
point{{~#unless (eq tache.data.points_de_tache_courant 1)}}s{{/unless}} de tâche
({{~#unless (eq tache.data.tentatives 1)}}{{tache.data.tentatives}} tentatives{{else}}première tentative{{/unless~}}).
{{#if (and tache.data.fatigue appliquerFatigue)}}<br><span>Il s'est fatigué de {{tache.data.fatigue}} case{{~#if (gt tache.data.fatigue 1)}}s{{/if}}.</span>{{/if}} {{#if (and tache.data.fatigue appliquerFatigue)}}<br><span>Il s'est fatigué de {{tache.data.fatigue}} case{{~#if (gt tache.data.fatigue 1)}}s{{/if}}.</span>{{/if}}
{{#if rolled.isETotal}}<br><span>Son échec total augmente de 1 la difficulté de la tâche!</span>{{/if~}} {{#if rolled.isETotal}}<br><span>Son échec total augmente de 1 la difficulté de la tâche!</span>{{/if~}}
{{> "systems/foundryvtt-reve-de-dragon/templates/chat-info-appel-au-moral.html"}} {{> "systems/foundryvtt-reve-de-dragon/templates/chat-info-appel-au-moral.html"}}

View File

@ -44,10 +44,16 @@
<label for="xp">Points de tâches nécessaires</label> <label for="xp">Points de tâches nécessaires</label>
<input class="attribute-value" type="text" name="data.points_de_tache" value="{{data.points_de_tache}}" data-dtype="Number"/> <input class="attribute-value" type="text" name="data.points_de_tache" value="{{data.points_de_tache}}" data-dtype="Number"/>
</div> </div>
<hr>
<div class="form-group"> <div class="form-group">
<label for="xp">Points de tâches obtenus</label> <label for="xp">Points de tâches obtenus</label>
<input class="attribute-value" type="text" name="data.points_de_tache_courant" value="{{data.points_de_tache_courant}}" data-dtype="Number"/> <input class="attribute-value" type="text" name="data.points_de_tache_courant" value="{{data.points_de_tache_courant}}" data-dtype="Number"/>
</div> </div>
<div class="form-group">
<label for="tentatives">Nombre de tentatives</label>
<input class="attribute-value" type="text" name="data.tentatives" value="{{data.tentatives}}" data-dtype="Number"/>
</div>
<hr>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}} {{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}