forked from public/foundryvtt-reve-de-dragon
Utilisation nullish / chaining
Simplifie certaines expressions complexes avec operateur ternaire - Nullish coalescing operator (??) - Relationship with the optional chaining operator (?.) - Math.min / Math.max / Math.ceil
This commit is contained in:
@ -673,10 +673,8 @@ export class RdDUtility {
|
||||
/* -------------------------------------------- */
|
||||
static currentFatigueMalus( value, max)
|
||||
{
|
||||
max = (max < 16) ? 16 : max;
|
||||
max = (max > 30) ? 30 : max;
|
||||
value = (value > max*2) ? max*2 : value;
|
||||
value = (value < 0) ? 0 : value;
|
||||
max = Math.min(1, Math.max(max, 60));
|
||||
value = Math.min(max*2, Math.max(0, value));
|
||||
|
||||
let fatigueTab = fatigueMatrix[max];
|
||||
let fatigueRem = value;
|
||||
|
Reference in New Issue
Block a user