mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 13:11:08 +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({
|
new fields.SchemaField({
|
||||||
data: new fields.SchemaField({
|
data: new fields.SchemaField({
|
||||||
value: new fields.NumberField({ initial: 0, integer: true }),
|
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) {
|
for (var attributeKey in this.traits) {
|
||||||
const attribute = this.traits[attributeKey];
|
const attribute = this.traits[attributeKey];
|
||||||
|
attribute.data.total = attribute.data.base + attribute.data.value;
|
||||||
// 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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.evasion.value = (this.class?.system?.evasion ?? 0) + this.evasion.bonuses;
|
this.evasion.value = (this.class?.system?.evasion ?? 0) + this.evasion.bonuses;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
{{/each}}
|
{{/each}}
|
||||||
</select>
|
</select>
|
||||||
{{else}}
|
{{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}}
|
{{/if}}
|
||||||
<img src="systems/daggerheart/assets/AttributeShield.svg" />
|
<img src="systems/daggerheart/assets/AttributeShield.svg" />
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue