forked from public/foundryvtt-reve-de-dragon
Preparation du passage en v12
This commit is contained in:
@ -31,7 +31,7 @@ function _buildAllSegmentsFatigue(max) {
|
||||
const cycle = [5, 2, 4, 1, 3, 0];
|
||||
const fatigue = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
|
||||
for (let i = 0; i <= max; i++) {
|
||||
const ligneFatigue = duplicate(fatigue[i]);
|
||||
const ligneFatigue = foundry.utils.duplicate(fatigue[i]);
|
||||
const caseIncrementee = cycle[i % 6];
|
||||
ligneFatigue[caseIncrementee]++;
|
||||
ligneFatigue[caseIncrementee + 6]++;
|
||||
@ -45,7 +45,7 @@ function _buildAllSegmentsFatigue(max) {
|
||||
function _cumulSegmentsFatigue(matrix) {
|
||||
let cumulMatrix = [];
|
||||
for (let line of matrix) {
|
||||
let cumul = duplicate(line);
|
||||
let cumul = foundry.utils.duplicate(line);
|
||||
|
||||
for (let i = 1; i < 12; i++) {
|
||||
cumul[i] += cumul[i - 1];
|
||||
@ -607,10 +607,10 @@ export class RdDUtility {
|
||||
for (let encaissement of table) {
|
||||
if ((encaissement.minimum === undefined || encaissement.minimum <= degats)
|
||||
&& (encaissement.maximum === undefined || degats <= encaissement.maximum)) {
|
||||
return duplicate(encaissement);
|
||||
return foundry.utils.duplicate(encaissement);
|
||||
}
|
||||
}
|
||||
return duplicate(table[0]);
|
||||
return foundry.utils.duplicate(table[0]);
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user