mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
18 lines
531 B
JavaScript
18 lines
531 B
JavaScript
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();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|