forked from public/foundryvtt-reve-de-dragon
Séparation de l'Actor Entités
This commit is contained in:
@ -55,7 +55,8 @@ function _cumulSegmentsFatigue(matrix) {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export const fatigueMatrix = _buildAllSegmentsFatigue(60);
|
||||
export const MAX_ENDURANCE_FATIGUE = 60;
|
||||
const fatigueMatrix = _buildAllSegmentsFatigue(MAX_ENDURANCE_FATIGUE);
|
||||
const cumulFatigueMatrix = _cumulSegmentsFatigue(fatigueMatrix);
|
||||
|
||||
const fatigueMalus = [0, 0, 0, -1, -1, -1, -2, -3, -4, -5, -6, -7]; // Provides the malus for each segment of fatigue
|
||||
@ -465,11 +466,10 @@ export class RdDUtility {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static calculMalusFatigue(fatigue, maxEnd) {
|
||||
maxEnd = Math.max(maxEnd, 1);
|
||||
maxEnd = Math.min(maxEnd, cumulFatigueMatrix.length);
|
||||
let segments = cumulFatigueMatrix[maxEnd];
|
||||
for (let i = 0; i < 12; i++) {
|
||||
static calculMalusFatigue(fatigue, endurance) {
|
||||
endurance = Math.min(Math.max(endurance, 1), cumulFatigueMatrix.length);
|
||||
let segments = cumulFatigueMatrix[endurance];
|
||||
for (let i = 0; i < segments.length; i++) {
|
||||
if (fatigue <= segments[i]) {
|
||||
return fatigueMalus[i]
|
||||
}
|
||||
|
Reference in New Issue
Block a user