mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Fixed attribute base for PC
This commit is contained in:
parent
7191421fa8
commit
b9c5c3c753
2 changed files with 3 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
{{/each}}
|
||||
</select>
|
||||
{{else}}
|
||||
<div class="attribute-text {{#if (lt attribute.data.value 0)}}negative{{/if}}">{{attribute.data.value}}</div>
|
||||
<div class="attribute-text {{#if (lt attribute.data.total 0)}}negative{{/if}}">{{attribute.data.total}}</div>
|
||||
{{/if}}
|
||||
<img src="systems/daggerheart/assets/AttributeShield.svg" />
|
||||
<div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue