mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 19:51:08 +01:00
Merged with development
This commit is contained in:
commit
6d3e5302eb
62 changed files with 1776 additions and 660 deletions
|
|
@ -501,6 +501,7 @@ export default class DhpActor extends Actor {
|
|||
/**@inheritdoc */
|
||||
getRollData() {
|
||||
const rollData = super.getRollData();
|
||||
rollData.name = this.name;
|
||||
rollData.system = this.system.getRollData();
|
||||
rollData.prof = this.system.proficiency ?? 1;
|
||||
rollData.cast = this.system.spellcastModifier ?? 1;
|
||||
|
|
@ -598,6 +599,8 @@ export default class DhpActor extends Actor {
|
|||
await this.modifyResource(updates);
|
||||
|
||||
if (Hooks.call(`${CONFIG.DH.id}.postTakeDamage`, this, updates) === false) return null;
|
||||
|
||||
return updates;
|
||||
}
|
||||
|
||||
calculateDamage(baseDamage, type) {
|
||||
|
|
@ -646,6 +649,8 @@ export default class DhpActor extends Actor {
|
|||
await this.modifyResource(updates);
|
||||
|
||||
if (Hooks.call(`${CONFIG.DH.id}.postTakeHealing`, this, updates) === false) return null;
|
||||
|
||||
return updates;
|
||||
}
|
||||
|
||||
async modifyResource(resources) {
|
||||
|
|
|
|||
|
|
@ -143,6 +143,12 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
|||
html.querySelectorAll('.button-target-selection').forEach(element => {
|
||||
element.addEventListener('click', this.onTargetSelection.bind(this));
|
||||
});
|
||||
|
||||
html.querySelectorAll('.token-target-container').forEach(element => {
|
||||
element.addEventListener('pointerover', this.hoverTarget);
|
||||
element.addEventListener('pointerout', this.unhoverTarget);
|
||||
element.addEventListener('click', this.clickTarget);
|
||||
});
|
||||
}
|
||||
|
||||
async onRollDamage(event) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue