mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Fixed sizing for evolved beastforms
This commit is contained in:
parent
989a6e3a2a
commit
ce7020d8d5
6 changed files with 48 additions and 29 deletions
|
|
@ -92,6 +92,18 @@ export default class BeastformField extends fields.SchemaField {
|
|||
|
||||
beastformEffect.changes = [...beastformEffect.changes, ...evolvedForm.changes];
|
||||
formData.system.features = [...formData.system.features, ...selectedForm.system.features.map(x => x.uuid)];
|
||||
|
||||
const baseSize = evolvedData.form.system.tokenSize.size;
|
||||
const evolvedSize =
|
||||
baseSize === 'custom'
|
||||
? 'custom'
|
||||
: (Object.keys(CONFIG.DH.ACTOR.tokenSize).find(
|
||||
x => CONFIG.DH.ACTOR.tokenSize[x].value === CONFIG.DH.ACTOR.tokenSize[baseSize].value + 1
|
||||
) ?? baseSize);
|
||||
formData.system.tokenSize = {
|
||||
...evolvedData.form.system.tokenSize,
|
||||
size: evolvedSize
|
||||
};
|
||||
}
|
||||
|
||||
if (selectedForm.system.beastformType === CONFIG.DH.ITEM.beastformTypes.hybrid.id) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue