Verification FORCE vs TAILLE+4

This commit is contained in:
sladecraven 2021-01-14 20:51:32 +01:00
parent 4f236adbec
commit bf66db92c3
2 changed files with 9 additions and 2 deletions

View File

@ -557,6 +557,13 @@ export class RdDActor extends Actor {
/* -------------------------------------------- */
async updateCarac(caracName, caracValue) {
let caracpath = "data.carac." + caracName + ".value"
if (caracName == "force") {
let caracTaille = this.data.data.carac.taille;
if ( Number(caracValue) > Number(caracTaille.value)+4) {
ui.notifications.warn("Votre FORCE doit être au maximum de TAILLE+4");
return;
}
}
if (caracName == "reve") {
if (caracValue > Misc.toInt(this.data.data.reve.seuil.value)) {
this.setPointsDeSeuil(caracValue);

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.2.20",
"version": "1.2.21",
"manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.7.5",
"compatibleCoreVersion": "0.7.8",