mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
* 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
21 lines
765 B
JavaScript
21 lines
765 B
JavaScript
const fields = foundry.data.fields;
|
|
|
|
export default class SaveField extends fields.SchemaField {
|
|
constructor(options = {}, context = {}) {
|
|
const saveFields = {
|
|
trait: new fields.StringField({
|
|
nullable: true,
|
|
initial: null,
|
|
choices: CONFIG.DH.ACTOR.abilities
|
|
}),
|
|
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,
|
|
nullable: false,
|
|
required: true
|
|
})
|
|
};
|
|
super(saveFields, options, context);
|
|
}
|
|
}
|