mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
[Feature] 155 - New Adversary Sheet (#228)
* rework adversary templates, add setting dialog to adversary and fix erratas * fix errata in adversary data model * developing experience setting page * Experience settings update * finish actions setting tab * Fixed Notes enriched path and adversary-settings form id * Fixed UseItem and ToChat * Fixed Firefox progress bar (HP/Stress) (#230) * insert prose-mirror style and inicial implement to damage settings * fix character import relative paths and remove effects from standard adversary attack --------- Co-authored-by: WBHarry <williambjrklund@gmail.com> Co-authored-by: GyroFalc <43814421+GyroFalc@users.noreply.github.com>
This commit is contained in:
parent
8b834036fa
commit
5ffb22fcc5
42 changed files with 2123 additions and 254 deletions
|
|
@ -531,6 +531,29 @@ export class DHBaseAction extends foundry.abstract.DataModel {
|
|||
}
|
||||
}
|
||||
/* SAVE */
|
||||
|
||||
async toChat(origin) {
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
const systemData = {
|
||||
title: game.i18n.localize('DAGGERHEART.ActionType.action'),
|
||||
origin: origin,
|
||||
img: this.img,
|
||||
name: this.name,
|
||||
description: this.description,
|
||||
actions: []
|
||||
};
|
||||
const msg = new cls({
|
||||
type: 'abilityUse',
|
||||
user: game.user.id,
|
||||
system: systemData,
|
||||
content: await foundry.applications.handlebars.renderTemplate(
|
||||
'systems/daggerheart/templates/chat/ability-use.hbs',
|
||||
systemData
|
||||
)
|
||||
});
|
||||
|
||||
cls.create(msg.toObject());
|
||||
}
|
||||
}
|
||||
|
||||
export class DHDamageAction extends DHBaseAction {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue