[Feature] ActiveEffect Autocomplete (#338)

* Fixed translation of TrackedAttributeChoices

* Styling improvements

* Added hints

* fix autocomplete style, fix tagify style, fix magical and physical tag style and fix lang in details adversary settings

* Removed commented out code

* Some companion fixes

---------

Co-authored-by: moliloo <dev.murilobrito@gmail.com>
This commit is contained in:
WBHarry 2025-07-15 15:55:45 +02:00 committed by GitHub
parent 37c1d7ad88
commit 0dd5b53313
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 501 additions and 171 deletions

View file

@ -4,7 +4,7 @@ export default class DHRoll extends Roll {
baseTerms = [];
constructor(formula, data, options) {
super(formula, data, options);
if(!this.data || !Object.keys(this.data).length) this.data = options.data;
if (!this.data || !Object.keys(this.data).length) this.data = options.data;
}
static messageType = 'adversaryRoll';
@ -100,7 +100,7 @@ export default class DHRoll extends Roll {
}
formatModifier(modifier) {
if(Array.isArray(modifier)) {
if (Array.isArray(modifier)) {
return [
new foundry.dice.terms.OperatorTerm({ operator: '+' }),
...this.constructor.parse(modifier.join(' + '), this.options.data)
@ -127,12 +127,12 @@ export default class DHRoll extends Roll {
getBonus(path, label) {
const bonus = foundry.utils.getProperty(this.data.bonuses, path),
modifiers = [];
if(bonus?.bonus)
if (bonus?.bonus)
modifiers.push({
label: label,
value: bonus?.bonus
});
if(bonus?.dice?.length)
if (bonus?.dice?.length)
modifiers.push({
label: label,
value: bonus?.dice