mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
* Small random fixes * Added use of ItemLinkFields * Multiclass levelup fixes * Fixed our onCreate methods unintentionally being run on all clients * Remade apps handling * Added for all class items and subclass * Restored foreignDocumentUuidField * Improved * PR fxies * Fixed tooltip enrichment * . * Reverted silly change
18 lines
548 B
JavaScript
18 lines
548 B
JavaScript
import DHBaseAction from './baseAction.mjs';
|
|
|
|
export default class DHEffectAction extends DHBaseAction {
|
|
static extraSchemas = [...super.extraSchemas, 'effects', 'target'];
|
|
|
|
async trigger(event, data) {
|
|
if (this.effects.length) {
|
|
const cls = getDocumentClass('ChatMessage'),
|
|
msg = {
|
|
type: 'applyEffect',
|
|
user: game.user.id,
|
|
system: data
|
|
};
|
|
|
|
return await cls.create(msg);
|
|
} else this.toChat(this.id);
|
|
}
|
|
}
|