Gestion des jets en points de reve actuels

This commit is contained in:
sladecraven 2020-11-15 12:26:19 +01:00
parent 4f09c278e9
commit 25742d811f
4 changed files with 29 additions and 7 deletions

View File

@ -274,8 +274,12 @@ export class RdDActorSheet extends ActorSheet {
let compName = event.currentTarget.text;
this.actor.rollCompetence( compName);
});
// Roll Weapon
// Points de reve actuel
html.find('.ptreve-actuel a').click((event) => {
this.actor.rollCarac( 'reveActuel' );
});
// Roll Weapon1
html.find('.arme-label a').click((event) => {
let armeName = event.currentTarget.text;
this.actor.rollArme( armeName);

View File

@ -764,8 +764,17 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */
async rollCarac( caracName )
{
let carac;
if ( caracName == "reveActuel") { // Fake carac for Reve Actuel
carac = {type: "number",
value: this.data.data.reve.reve.value,
label: "Rêve Actuel"
}
} else {
carac = this.data.data.carac[caracName];// Per default
}
let rollData = {
selectedCarac: this.data.data.carac[caracName],
selectedCarac: carac,
ajustementsConditions: CONFIG.RDD.ajustementsConditions,
difficultesLibres: CONFIG.RDD.difficultesLibres,
etat: this.data.data.compteurs.etat.value,

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": "0.9.45",
"version": "0.9.46",
"minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.6",
"templateVersion": 46,

View File

@ -396,10 +396,19 @@
</div>
<div>
<ol class="item-list">
<li class="item flexrow" >Points de Rêve actuels : <input class="pointsreve-value flexrow" type="text" name="data.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number"/></li>
<li class="item flexrow">
<span class="ptreve-actuel"><a>Points de Rêve actuels</a> :</span>
<span><input class="pointsreve-value competence-value" type="text" name="data.reve.reve.value" value="{{data.reve.reve.value}}" data-dtype="Number"/></span>
</li>
{{#if data.isGM}}
<li class="item flexrow" >Position en TMR : <input class="description-value flexrow" type="text" name="data.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/></li>
<li class="item flexrow" >Refoulement : <input class="description-value flexrow" type="text" name="data.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/></li>
<li class="item flexrow">
<span class="competence-label">Position en TMR : </span>
<span><input class="competence-value" type="text" name="data.reve.tmrpos.coord" value="{{data.reve.tmrpos.coord}}" data-dtype="String"/></span>
</li>
<li class="item flexrow" >
<span class="competence-label">Refoulement : </span>
<span><input class="competence-value" type="text" name="data.reve.refoulement.value" value="{{data.reve.refoulement.value}}" data-dtype="Number"/></span>
</li>
{{else}}
<li class="item flexrow" >Position en TMR : {{data.reve.tmrpos.coord}} </li>
<li class="item flexrow" >Refoulement : {{data.reve.refoulement.value}} </li>