From 78c02c1db2cae6d153b59bff25533625be97c52b Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Tue, 1 Dec 2020 00:05:18 +0100 Subject: [PATCH] =?UTF-8?q?Encaissement=20jusqu'=C3=A0=20+25?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/actor-sheet.js | 2 +- module/rdd-utility.js | 6 ++++++ templates/dialog-roll-encaisser.html | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/module/actor-sheet.js b/module/actor-sheet.js index 1aaa6d3a..57c52b6e 100644 --- a/module/actor-sheet.js +++ b/module/actor-sheet.js @@ -118,7 +118,7 @@ export class RdDActorSheet extends ActorSheet { /* -------------------------------------------- */ async displayDialogEncaisser( ) { - let data = { ajustementsConditions: CONFIG.RDD.ajustementsConditions /* techniquement on peut encaisser à +20 */ }; + let data = { ajustementsEncaissement: RdDUtility.getAjustementsEncaissement() }; let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-roll-encaisser.html', data ); new RdDEncaisser(html, this.actor ).render(true); } diff --git a/module/rdd-utility.js b/module/rdd-utility.js index ef3cbd9d..e2601fd8 100644 --- a/module/rdd-utility.js +++ b/module/rdd-utility.js @@ -28,6 +28,8 @@ const competence_xp_par_niveau = [ 5, 5, 5, 10, 10, 10, 10, 15, 15, 15, 15, 20, const carac_array = [ "taille", "apparence", "constitution", "force", "agilite", "dexterite", "vue", "ouie", "odoratgout", "volonte", "intellect", "empathie", "reve", "chance", "melee", "tir", "lancer", "derobee"]; const difficultesLibres = [0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10]; const ajustementsConditions = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, +1, +2, +3, +4, +5, +6, +7, +8, +9, +10]; +const ajustementsEncaissement = [-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, +1, +2, +3, +4, +5, +6, +7, +8, +9, +10, +11, +12, +13, +14, +15, +16, +17, +18, +19, +20, +21, +22, +23, +24, +25]; + function _buildAllSegmentsFatigue(max) { const cycle = [5, 2, 4, 1, 3, 0]; @@ -298,6 +300,10 @@ export class RdDUtility { { return ajustementsConditions; } + static getAjustementsEncaissement() + { + return ajustementsEncaissement; + } static getDefinitionsBlessures() { return definitionsBlessures; diff --git a/templates/dialog-roll-encaisser.html b/templates/dialog-roll-encaisser.html index f3aacd8a..bfb388e1 100644 --- a/templates/dialog-roll-encaisser.html +++ b/templates/dialog-roll-encaisser.html @@ -4,7 +4,7 @@