[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:
WBHarry 2025-10-29 18:56:37 +01:00 committed by GitHub
parent 906c7ac853
commit ff79dd19bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 450 additions and 12 deletions

View file

@ -14,7 +14,8 @@ export default class RegisterHandlebarsHelpers {
getProperty: foundry.utils.getProperty,
setVar: this.setVar,
empty: this.empty,
pluralize: this.pluralize
pluralize: this.pluralize,
positive: this.positive
});
}
static add(a, b) {
@ -89,4 +90,8 @@ export default class RegisterHandlebarsHelpers {
const key = isSingular ? `${baseKey}.single` : `${baseKey}.plural`;
return game.i18n.localize(key);
}
static positive(a) {
return Math.abs(Number(a));
}
}