Fixed base resources getting their values capped to max at prepareDerivedData. Fixed effect autocomplete not having labels for baseResources.

This commit is contained in:
WBHarry 2026-03-25 17:07:20 +01:00
parent d258478218
commit a4fff56461
3 changed files with 16 additions and 7 deletions

View file

@ -60,4 +60,14 @@ export default class DhCreature extends BaseDataActor {
}
}
}
prepareDerivedData() {
const minLimitResource = resource => {
if (resource) resource.value = Math.min(resource.value, resource.max);
};
minLimitResource(this.resources.stress);
minLimitResource(this.resources.hitPoints);
minLimitResource(this.resources.hope);
}
}