Fix in creature+actor sheet
This commit is contained in:
@@ -51,6 +51,13 @@ export default class AwECharacter extends foundry.abstract.TypeDataModel {
|
||||
}, {})
|
||||
)
|
||||
|
||||
schema.keyAttribute = new fields.StringField({
|
||||
required: true,
|
||||
nullable: false,
|
||||
initial: "agility",
|
||||
choices: Object.fromEntries(Object.values(SYSTEM.ATTRIBUTES).map(a => [a.id, a.label]))
|
||||
})
|
||||
|
||||
// Condition penalty magnitudes (used when the respective condition is active)
|
||||
schema.inhibitedPenalty = new fields.NumberField({ required: true, nullable: false, integer: true, initial: 2, min: 0 })
|
||||
schema.vulnerablePenalty = new fields.NumberField({ required: true, nullable: false, integer: true, initial: 2, min: 0 })
|
||||
@@ -70,5 +77,8 @@ export default class AwECharacter extends foundry.abstract.TypeDataModel {
|
||||
const bonusPart = attr.bonus !== 0 ? ` + Bonus ${attr.bonus >= 0 ? '+' : ''}${attr.bonus}` : ''
|
||||
attr.modBreakdown = `Level ${level} + Boosts ${attr.boostLevel}${bonusPart} = ${attr.mod >= 0 ? '+' : ''}${attr.mod}`
|
||||
}
|
||||
|
||||
this.hp.max = (10 * level) + this.attributes.fitness.mod
|
||||
this.hp.value = Math.min(this.hp.value, this.hp.max)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user