Item ehnance, fixes on actor sheet

This commit is contained in:
2026-03-08 11:35:00 +01:00
parent e9abefd90d
commit aaf965c78a
13 changed files with 849 additions and 208 deletions

View File

@@ -20,9 +20,15 @@ export default class OathHammerCharacter extends foundry.abstract.TypeDataModel
fate: attributeField()
})
// Skills: 26 skills each with a rank (04). Grit.max = resilience.rank + toughness.rank.
// Skills: 26 skills each with a rank (04), a bonus/penalty modifier, and color dice.
// Total dice = attr rank + skill rank. Modifier = bonus (+) or penalty (-) dice.
// Color dice: type (white 4+, red 3+, black 2+) + count of colored dice in the pool.
const skillField = () => new fields.SchemaField({
rank: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0, max: 4 })
rank: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0, max: 4 }),
modifier: new fields.NumberField({ required: true, nullable: false, integer: true, initial: 0 }),
colorDiceType: new fields.StringField({ required: true, nullable: false, initial: "white",
choices: { white: "OATHHAMMER.ColorDice.White", red: "OATHHAMMER.ColorDice.Red", black: "OATHHAMMER.ColorDice.Black" } }),
colorDice: new fields.NumberField({ ...requiredInteger, initial: 4, min: 0 }),
})
schema.skills = new fields.SchemaField({
academics: skillField(),