mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 18:39:55 +02:00
Cleaned up uses of 'mode' for activeEffects in configs
This commit is contained in:
parent
2c98070836
commit
4ed35a1d69
4 changed files with 315 additions and 260 deletions
|
|
@ -315,15 +315,15 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat
|
|||
|
||||
const beastformEffect = selected.effects.find(x => x.type === 'beastform');
|
||||
for (const traitBonus of app.modifications.traitBonuses) {
|
||||
const existingChange = beastformEffect.changes.find(
|
||||
const existingChange = beastformEffect.system.changes.find(
|
||||
x => x.key === `system.traits.${traitBonus.trait}.value`
|
||||
);
|
||||
if (existingChange) {
|
||||
existingChange.value = Number.parseInt(existingChange.value) + traitBonus.bonus;
|
||||
} else {
|
||||
beastformEffect.changes.push({
|
||||
beastformEffect.system.changes.push({
|
||||
key: `system.traits.${traitBonus.trait}.value`,
|
||||
mode: 2,
|
||||
type: 'add',
|
||||
priority: null,
|
||||
value: traitBonus.bonus
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue