Verification FORCE vs TAILLE+4
This commit is contained in:
parent
4f236adbec
commit
bf66db92c3
@ -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);
|
||||
@ -1474,7 +1481,7 @@ export class RdDActor extends Actor {
|
||||
let newCompetence = duplicate(competence);
|
||||
newCompetence.data.niveau += 1;
|
||||
newCompetence.data.xp = newXP;
|
||||
|
||||
|
||||
let xpData = {
|
||||
alias: this.name,
|
||||
competence: newCompetence.name,
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user