FEAT: new FormulaField class

FEAT: add getRollData on BaseDataItem Class
FEAT: weapon
FIX: remove inventoryWeapon field on Weapon Data Model
This commit is contained in:
Joaquin Pereyra 2025-05-31 12:46:26 -03:00
parent ec7f32cdc7
commit 527a0cd419
6 changed files with 96 additions and 18 deletions

View file

@ -281,17 +281,6 @@ export default class DhpPC extends foundry.abstract.TypeDataModel {
}
}
get inventoryWeapons() {
const inventoryWeaponFirst = this.parent.items.find(x => x.type === 'weapon' && x.system.inventoryWeapon === 1);
const inventoryWeaponSecond = this.parent.items.find(
x => x.type === 'weapon' && x.system.inventoryWeapon === 2
);
return {
first: this.#weaponData(inventoryWeaponFirst),
second: this.#weaponData(inventoryWeaponSecond)
};
}
get totalAttributeMarks() {
return Object.keys(this.levelData.levelups).reduce((nr, level) => {
const nrAttributeMarks = Object.keys(this.levelData.levelups[level]).reduce((nr, tier) => {