daggerheart/module/data/action/effectAction.mjs
Dapoulp 52be430eff
Feature/247 auto add yope fear clear stress (#285)
* cleanup

* test

* Step 1

* #2

* Fix Effect Action & Add Hope tumation settings to hook

* remove circular dependency

* Snuck in some localization fixes I noticed

* Remove success condition for duality roll gain

* Changed config.roll.type logic

---------

Co-authored-by: WBHarry <williambjrklund@gmail.com>
2025-07-07 01:38:39 +02:00

18 lines
524 B
JavaScript

import DHBaseAction from './baseAction.mjs';
export default class DHEffectAction extends DHBaseAction {
static 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);
}
}