mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 14:36:13 +01:00
[Fix] 1633 - ActiveEffect Autocomplete (#1636)
* Improved the autocomplete typing experience
* Made it work. But I hate it.
* Revert "Made it work. But I hate it."
This reverts commit d2fc9fd648.
* Actually nice solution instead O_O
This commit is contained in:
parent
0d2495c143
commit
c1f7866594
12 changed files with 139 additions and 102 deletions
|
|
@ -242,6 +242,38 @@ Hooks.on('setup', () => {
|
|||
systemEffect: true
|
||||
}))
|
||||
];
|
||||
|
||||
const actorCommon = {
|
||||
bar: ['resources.stress'],
|
||||
value: []
|
||||
};
|
||||
const damageThresholds = ['damageThresholds.major', 'damageThresholds.severe'];
|
||||
const traits = Object.keys(game.system.api.data.actors.DhCharacter.schema.fields.traits.fields).map(
|
||||
trait => `traits.${trait}.value`
|
||||
);
|
||||
CONFIG.Actor.trackableAttributes = {
|
||||
character: {
|
||||
bar: [...actorCommon.bar, 'resources.hitPoints', 'resources.hope'],
|
||||
value: [
|
||||
...actorCommon.value,
|
||||
...traits,
|
||||
...damageThresholds,
|
||||
'proficiency',
|
||||
'evasion',
|
||||
'armorScore',
|
||||
'scars',
|
||||
'levelData.level.current'
|
||||
]
|
||||
},
|
||||
adversary: {
|
||||
bar: [...actorCommon.bar, 'resources.hitPoints'],
|
||||
value: [...actorCommon.value, ...damageThresholds, 'criticalThreshold']
|
||||
},
|
||||
companion: {
|
||||
bar: [...actorCommon.bar],
|
||||
value: [...actorCommon.value, 'evasion', 'levelData.level.current']
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
Hooks.on('ready', async () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue