mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
23 lines
684 B
JavaScript
23 lines
684 B
JavaScript
const fields = foundry.data.fields;
|
|
|
|
export default class EffectsField extends fields.ArrayField {
|
|
static order = 100;
|
|
|
|
constructor(options = {}, context = {}) {
|
|
const element = new fields.SchemaField({
|
|
_id: new fields.DocumentIdField(),
|
|
onSave: new fields.BooleanField({ initial: false })
|
|
});
|
|
super(element, options, context);
|
|
}
|
|
|
|
static async execute(config) {
|
|
if(!this.hasRoll) {
|
|
const roll = new CONFIG.Dice.daggerheart.DHRoll('');
|
|
roll._evaluated = true;
|
|
await CONFIG.Dice.daggerheart.DHRoll.toMessage(roll, config);
|
|
} else {
|
|
return;
|
|
}
|
|
}
|
|
}
|