mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
[PR][Feature] Actor Sizes (#1433)
* Added support for adversary actor sizes * . * . * Finished token implementation * Fixed token-config * Updated SRD adversaries * . * Added size to Beastform tokenData * Fixed sizing for evolved beastforms * Beastform compendium update * .
This commit is contained in:
parent
7926c614e3
commit
8178fa5738
176 changed files with 1198 additions and 203 deletions
|
|
@ -11,7 +11,8 @@ export default class DhpAdversary extends BaseDataActor {
|
|||
label: 'TYPES.Actor.adversary',
|
||||
type: 'adversary',
|
||||
settingSheet: DHAdversarySettings,
|
||||
hasAttribution: true
|
||||
hasAttribution: true,
|
||||
usesSize: true
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -142,7 +143,7 @@ export default class DhpAdversary extends BaseDataActor {
|
|||
}
|
||||
|
||||
isItemValid(source) {
|
||||
return source.type === "feature";
|
||||
return source.type === 'feature';
|
||||
}
|
||||
|
||||
async _preUpdate(changes, options, user) {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ export default class BaseDataActor extends foundry.abstract.TypeDataModel {
|
|||
settingSheet: null,
|
||||
hasResistances: true,
|
||||
hasAttribution: false,
|
||||
hasLimitedView: true
|
||||
hasLimitedView: true,
|
||||
usesSize: false
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -77,6 +78,13 @@ export default class BaseDataActor extends foundry.abstract.TypeDataModel {
|
|||
'DAGGERHEART.GENERAL.DamageResistance.magicalReduction'
|
||||
)
|
||||
});
|
||||
if (this.metadata.usesSize)
|
||||
schema.size = new fields.StringField({
|
||||
required: true,
|
||||
nullable: false,
|
||||
choices: CONFIG.DH.ACTOR.tokenSize,
|
||||
initial: CONFIG.DH.ACTOR.tokenSize.custom.id
|
||||
});
|
||||
return schema;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export default class DhParty extends BaseDataActor {
|
|||
/* -------------------------------------------- */
|
||||
|
||||
isItemValid(source) {
|
||||
return ["weapon", "armor", "consumable", "loot"].includes(source.type);
|
||||
return ['weapon', 'armor', 'consumable', 'loot'].includes(source.type);
|
||||
}
|
||||
|
||||
prepareBaseData() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue