Ajouter compteurs success/echec pour les points de tache #215

This commit is contained in:
sladecraven 2021-10-30 09:16:28 +02:00
parent a97944ff89
commit 00d3f7ff31
4 changed files with 17 additions and 2 deletions

View File

@ -2577,6 +2577,11 @@ export class RdDActor extends Actor {
if (rollData.rolled.isETotal) {
rollData.tache.data.difficulte--;
}
if (rollData.rolled.isSuccess) {
rollData.tache.data.nb_jet_succes = rollData.tache.data.nb_jet_succes + 1;
} else {
rollData.tache.data.nb_jet_echec = rollData.tache.data.nb_jet_echec + 1;
}
this.updateEmbeddedDocuments('Item', [rollData.tache]);
this.santeIncDec("fatigue", rollData.tache.data.fatigue);

View File

@ -2,11 +2,11 @@
"name": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon",
"description": "Rêve de Dragon RPG for FoundryVTT",
"version": "1.5.21",
"version": "1.5.22",
"manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.8.0",
"compatibleCoreVersion": "0.8.9",
"templateVersion": 124,
"templateVersion": 125,
"author": "LeRatierBretonnien",
"authors": [
{

View File

@ -719,6 +719,8 @@
"difficulte": 0,
"points_de_tache": 0,
"points_de_tache_courant": 0,
"nb_jet_echec": 0,
"nb_jet_succes": 0,
"description": "",
"descriptionmj": ""
},

View File

@ -48,6 +48,14 @@
<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"/>
</div>
<div class="form-group">
<label for="xp">Nombre de Succès</label>
<input class="attribute-value" type="text" name="data.nb_jet_succes" value="{{data.nb_jet_succes}}" data-dtype="Number" {{#if isGM}}{{else}}disabled{{/if}}/>
</div>
<div class="form-group">
<label for="xp">Nombre d'Echecs</label>
<input class="attribute-value" type="text" name="data.nb_jet_echec" value="{{data.nb_jet_echec}}" data-dtype="Number" {{#if isGM}}{{else}}disabled{{/if}}/>
</div>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}