This commit is contained in:
WBHarry 2026-03-08 19:35:27 +01:00
parent c6bf482b07
commit 8b7a455410
11 changed files with 162 additions and 61 deletions

View file

@ -55,7 +55,20 @@ export const abilities = {
}
};
const baseResources = {
/**
* Full custom typing:
* id
* initial
* max
* reverse
* label
* images {
* full { value, isPath, isNotTransparent }
* empty { value, isPath isNotTransparent }
* }
*/
export const characterBaseResources = {
hitPoints: {
id: 'hitPoints',
initial: 0,
@ -80,20 +93,63 @@ const baseResources = {
}
};
export const characterBaseResources = {
...baseResources
};
export const characterResources = {
...characterBaseResources
};
export const adversaryBaseResources = {
hitPoints: {
id: 'hitPoints',
initial: 0,
max: 0,
reverse: true,
label: 'DAGGERHEART.GENERAL.HitPoints.plural',
maxLabel: 'DAGGERHEART.ACTORS.Character.maxHPBonus'
},
stress: {
id: 'stress',
initial: 0,
max: 0,
reverse: true,
label: 'DAGGERHEART.GENERAL.stress'
}
};
export const adversaryResources = {
...adversaryBaseResources
};
export const companionBaseResources = {
stress: {
id: 'stress',
initial: 0,
max: 0,
reverse: true,
label: 'DAGGERHEART.GENERAL.stress'
},
hope: {
id: 'hope',
initial: 0,
min: 0,
reverse: false,
label: 'DAGGERHEART.GENERAL.hope'
}
};
export const companionResources = {
...companionBaseResources
};
export const getScrollingTextResources = actorType => ({
armor: {
label: 'DAGGERHEART.GENERAL.armor',
reverse: true
},
...(actorType === 'character' ? characterResources : {})
...(actorType === 'character'
? characterResources
: actorType === 'adversary'
? adversaryResources
: companionResources)
});
export const featureProperties = {