mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 21:21:08 +01:00
Adding max attributes and missing localization for them
This commit is contained in:
parent
51eadc499f
commit
52790fa45d
2 changed files with 5 additions and 4 deletions
|
|
@ -9,6 +9,9 @@ export default class DhActiveEffectConfig extends foundry.applications.sheets.Ac
|
||||||
if (!ignoredActorKeys.includes(key)) {
|
if (!ignoredActorKeys.includes(key)) {
|
||||||
const model = game.system.api.models.actors[key];
|
const model = game.system.api.models.actors[key];
|
||||||
const attributes = CONFIG.Token.documentClass.getTrackedAttributes(model);
|
const attributes = CONFIG.Token.documentClass.getTrackedAttributes(model);
|
||||||
|
// As per DHToken._getTrackedAttributesFromSchema, attributes.bar have a max version as well.
|
||||||
|
const maxAttributes = attributes.bar.map(x => [...x, 'max']);
|
||||||
|
attributes.value.push(...maxAttributes);
|
||||||
const group = game.i18n.localize(model.metadata.label);
|
const group = game.i18n.localize(model.metadata.label);
|
||||||
const choices = CONFIG.Token.documentClass
|
const choices = CONFIG.Token.documentClass
|
||||||
.getTrackedAttributeChoices(attributes, model)
|
.getTrackedAttributeChoices(attributes, model)
|
||||||
|
|
|
||||||
|
|
@ -60,15 +60,13 @@ export default class DhpAdversary extends BaseDataActor {
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
'DAGGERHEART.GENERAL.HitPoints.plural',
|
'DAGGERHEART.GENERAL.HitPoints.plural',
|
||||||
true,
|
true
|
||||||
game.i18n.localize('DAGGERHEART.GENERAL.max')
|
|
||||||
),
|
),
|
||||||
stress: resourceField(
|
stress: resourceField(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
'DAGGERHEART.GENERAL.stress',
|
'DAGGERHEART.GENERAL.stress',
|
||||||
true,
|
true
|
||||||
game.i18n.localize('DAGGERHEART.GENERAL.max')
|
|
||||||
)
|
)
|
||||||
}),
|
}),
|
||||||
rules: new fields.SchemaField({
|
rules: new fields.SchemaField({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue