Fixed attribute base for PC

This commit is contained in:
WBHarry 2025-06-01 15:47:56 +02:00
parent 7191421fa8
commit b9c5c3c753
2 changed files with 3 additions and 10 deletions

View file

@ -7,7 +7,7 @@ const attributeField = () =>
new fields.SchemaField({
data: new fields.SchemaField({
value: new fields.NumberField({ initial: 0, integer: true }),
bonus: new fields.NumberField({ initial: 0, integer: true })
base: new fields.NumberField({ initial: 0, integer: true })
})
});
@ -330,14 +330,7 @@ export default class DhpPC extends foundry.abstract.TypeDataModel {
for (var attributeKey in this.traits) {
const attribute = this.traits[attributeKey];
// attribute.levelMark = attribute.levelMarks.find(x => this.isSameTier(x)) ?? null;
// const actualValue = attribute.data.base + attribute.levelMarks.length + attribute.data.bonus;
// attribute.data.actualValue = actualValue;
// attribute.data.value = attribute.data.overrideValue
// ? attribute.data.overrideValue
// : attribute.data.actualValue;
attribute.data.total = attribute.data.base + attribute.data.value;
}
this.evasion.value = (this.class?.system?.evasion ?? 0) + this.evasion.bonuses;