Reworked beastform to hold it's data entirely in the beastformEffect

This commit is contained in:
WBHarry 2025-07-03 16:18:54 +02:00
parent 3186468f28
commit 51bd7c18af
7 changed files with 76 additions and 60 deletions

View file

@ -786,14 +786,12 @@ export class DhBeastformAction extends DHBaseAction {
}
async handleActiveTransformations() {
const activeBeastforms = this.actor.items.filter(x => x.type === 'beastform');
if (activeBeastforms.length > 0) {
for (let form of activeBeastforms) {
await form.delete();
const beastformEffects = this.actor.effects.filter(x => x.type === 'beastform');
if (beastformEffects.length > 0) {
for (let effect of beastformEffects) {
await effect.delete();
}
this.actor.effects.filter(x => x.type === 'beastform').forEach(x => x.delete());
return true;
}