Fixed basic beastform

This commit is contained in:
WBHarry 2025-07-03 14:13:49 +02:00
parent 978d45b931
commit 3186468f28
18 changed files with 231 additions and 21 deletions

View file

@ -0,0 +1,18 @@
export default class BeastformEffect extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields;
return {
isBeastform: new fields.BooleanField({ initial: false })
};
}
async _preDelete() {
if (this.parent.parent.type === 'character') {
for (let item of this.parent.parent.items) {
if (item.type === 'beastform') {
await item.delete();
}
}
}
}
}