Fixed effect stacking

This commit is contained in:
WBHarry 2026-02-17 21:15:36 +01:00
parent 79057b0718
commit 617f1d64c1
7 changed files with 37 additions and 28 deletions

View file

@ -95,7 +95,10 @@ export default class DhEffectsDisplay extends HandlebarsApplicationMixin(Applica
if (!effect.system.stacking?.enabled) return;
const newValue = Math.min(effect.system.stacking.value + 1, effect.system.stacking.max);
const incrementedValue = effect.system.stacking.value + 1;
const newValue = effect.system.stacking.max
? Math.min(incrementedValue, effect.system.stacking.max)
: incrementedValue;
await effect.update({ 'system.stacking.value': newValue });
this.render();
}