mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 07:36:26 +01:00
character.getRollData cleanup
This commit is contained in:
parent
7ac15ebd94
commit
a1801a78f0
2 changed files with 16 additions and 9 deletions
|
|
@ -523,14 +523,7 @@ export default class DhCharacter extends BaseDataActor {
|
||||||
return {
|
return {
|
||||||
...data,
|
...data,
|
||||||
tier: this.tier,
|
tier: this.tier,
|
||||||
level: this.levelData.level.current,
|
level: this.levelData.level.current
|
||||||
system: {
|
|
||||||
token: this.resources.tokens,
|
|
||||||
dice: this.resources.dice,
|
|
||||||
bonuses: this.bonuses,
|
|
||||||
rules: this.rules,
|
|
||||||
levelData: this.levelData
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,21 @@ export default class DHToken extends TokenDocument {
|
||||||
});
|
});
|
||||||
bars.sort((a, b) => a.label.compare(b.label));
|
bars.sort((a, b) => a.label.compare(b.label));
|
||||||
|
|
||||||
const invalidAttributes = ['gold', 'levelData', 'actions'];
|
const invalidAttributes = [
|
||||||
|
'gold',
|
||||||
|
'levelData',
|
||||||
|
'actions',
|
||||||
|
'biography',
|
||||||
|
'class',
|
||||||
|
'multiclass',
|
||||||
|
'companion',
|
||||||
|
'notes',
|
||||||
|
'partner',
|
||||||
|
'description',
|
||||||
|
'impulses',
|
||||||
|
'tier',
|
||||||
|
'type'
|
||||||
|
];
|
||||||
const values = attributes.value.reduce((acc, v) => {
|
const values = attributes.value.reduce((acc, v) => {
|
||||||
const a = v.join('.');
|
const a = v.join('.');
|
||||||
if (invalidAttributes.some(x => a.startsWith(x))) return acc;
|
if (invalidAttributes.some(x => a.startsWith(x))) return acc;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue