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
4 changed files with 14 additions and 5 deletions
Showing only changes of commit 0b5ede8af9 - Show all commits

View File

@ -2578,6 +2578,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,7 +2,7 @@
"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",

View File

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

View File

@ -50,10 +50,13 @@
<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="tentatives">Nombre de tentatives</label>
<input class="attribute-value" type="text" name="data.tentatives" value="{{data.tentatives}}" data-dtype="Number"/>
<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>
<hr>
{{>"systems/foundryvtt-reve-de-dragon/templates/partial-item-description.html"}}