mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
[Feature] 946 - Damage/Effect ChatMessages (#1089)
* Initial damage message * Added hover functionality to adversary damage cards * Added effect message * enhance chat messages styles * . * Fixed promise lockup * . * Fixed token path for message --------- Co-authored-by: moliloo <dev.murilobrito@gmail.com>
This commit is contained in:
parent
906c7ac853
commit
ff79dd19bf
17 changed files with 450 additions and 12 deletions
|
|
@ -599,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) {
|
||||
|
|
@ -647,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