#149 Gestion des ombres pour Thanatos

This commit is contained in:
sladecraven 2021-02-07 20:36:34 +01:00
parent c9ae8580ce
commit 43218dd282
3 changed files with 12 additions and 9 deletions

View File

@ -1101,12 +1101,12 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */
async ajouterQueue(options = { chat: false }) {
// TODO: Déterminer si Thanatos a été utilisé? => laisser le joueur ne pas choisir Thanatos => choisir sa voie?
let utiliseThanatos = false;
let queue;
if (utiliseThanatos) {
if (this.data.data.reve.reve.thanatosused) {
queue = await RdDRollTables.getOmbre();
// mettre à jour: plus d'ombre en vue
let myReve = duplicate(this.data.data.reve.reve);
myReve.thanatosused = false;
await this.update({ "data.reve.reve": myReve } );
}
else {
queue = await RdDRollTables.getQueue();
@ -1929,7 +1929,9 @@ export class RdDActor extends Actor {
if (rollData.isSortReserve) {
rollData.depenseReve++;
}
if ( rollData.competence.name.includes('Thanatos')) { // Si Thanatos
myReve.thanatosused = true;
}
if (myReve.value > rollData.depenseReve) {
// Incrémenter/gére le bonus de case
RdDItemSort.incrementBonusCase(this, selectedSort, rollData.coord);

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.3.16",
"version": "1.3.17",
"manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.9",
"templateVersion": 92,
"templateVersion": 93,
"author": "LeRatierBretonnien",
"authors": [
{

View File

@ -435,7 +435,8 @@
"reve": {
"max": 0,
"value": 10,
"label": "Points de Rêve actuels"
"label": "Points de Rêve actuels",
"thanatosused": false
},
"seuil": {
"max": 0,
@ -467,7 +468,7 @@
},
"ombres": {
"list": []
}
}
},
"compteurs": {
"sust": {