Fix/1116 fix action nullable fields (#1117)

* Temp ActionField attack type missing

* Move missing attack type to getModel

* Damage/Healing fields nullable fix

* Fix TargetField null value

* Other fixes

* Fix Action type to be not nullable
This commit is contained in:
Dapoulp 2025-08-30 17:44:16 +02:00 committed by GitHub
parent ef4d37d725
commit 31238113c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 26 additions and 8 deletions

View file

@ -10,13 +10,17 @@ export class DHActionRollData extends foundry.abstract.DataModel {
bonus: new fields.NumberField({ nullable: true, initial: null, integer: true }),
advState: new fields.StringField({
choices: CONFIG.DH.ACTIONS.advantageState,
initial: 'neutral'
initial: 'neutral',
nullable: false,
required: true
}),
diceRolling: new fields.SchemaField({
multiplier: new fields.StringField({
choices: CONFIG.DH.GENERAL.diceSetNumbers,
initial: 'prof',
label: 'DAGGERHEART.ACTIONS.RollField.diceRolling.multiplier'
label: 'DAGGERHEART.ACTIONS.RollField.diceRolling.multiplier',
nullable: false,
required: true
}),
flatMultiplier: new fields.NumberField({
nullable: true,
@ -26,7 +30,9 @@ export class DHActionRollData extends foundry.abstract.DataModel {
dice: new fields.StringField({
choices: CONFIG.DH.GENERAL.diceTypes,
initial: CONFIG.DH.GENERAL.diceTypes.d6,
label: 'DAGGERHEART.ACTIONS.RollField.diceRolling.dice'
label: 'DAGGERHEART.ACTIONS.RollField.diceRolling.dice',
nullable: false,
required: true
}),
compare: new fields.StringField({
choices: CONFIG.DH.ACTIONS.diceCompare,