mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
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:
parent
ef4d37d725
commit
31238113c9
5 changed files with 26 additions and 8 deletions
|
|
@ -22,10 +22,18 @@ export class DHActionDiceData extends foundry.abstract.DataModel {
|
|||
multiplier: new fields.StringField({
|
||||
choices: CONFIG.DH.GENERAL.multiplierTypes,
|
||||
initial: 'prof',
|
||||
label: 'Multiplier'
|
||||
label: 'Multiplier',
|
||||
nullable: false,
|
||||
required: true
|
||||
}),
|
||||
flatMultiplier: new fields.NumberField({ nullable: true, initial: 1, label: 'Flat Multiplier' }),
|
||||
dice: new fields.StringField({ choices: CONFIG.DH.GENERAL.diceTypes, initial: 'd6', label: 'Dice' }),
|
||||
dice: new fields.StringField({
|
||||
choices: CONFIG.DH.GENERAL.diceTypes,
|
||||
initial: 'd6',
|
||||
label: 'Dice',
|
||||
nullable: false,
|
||||
required: true
|
||||
}),
|
||||
bonus: new fields.NumberField({ nullable: true, initial: null, label: 'Bonus' }),
|
||||
custom: new fields.SchemaField({
|
||||
enabled: new fields.BooleanField({ label: 'Custom Formula' }),
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ export default class SaveField extends fields.SchemaField {
|
|||
difficulty: new fields.NumberField({ nullable: true, initial: null, integer: true, min: 0 }),
|
||||
damageMod: new fields.StringField({
|
||||
initial: CONFIG.DH.ACTIONS.damageOnSave.none.id,
|
||||
choices: CONFIG.DH.ACTIONS.damageOnSave
|
||||
choices: CONFIG.DH.ACTIONS.damageOnSave,
|
||||
nullable: false,
|
||||
required: true
|
||||
})
|
||||
};
|
||||
super(saveFields, options, context);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ export default class TargetField extends fields.SchemaField {
|
|||
type: new fields.StringField({
|
||||
choices: CONFIG.DH.GENERAL.targetTypes,
|
||||
initial: CONFIG.DH.GENERAL.targetTypes.any.id,
|
||||
nullable: true
|
||||
nullable: true,
|
||||
blank: true
|
||||
}),
|
||||
amount: new fields.NumberField({ nullable: true, initial: null, integer: true, min: 0 })
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue