RC-21 | Hero | Guts Data

This commit is contained in:
Oliver-Akins 2024-12-24 21:19:52 -07:00
parent 9f0fea1467
commit 4406531713
2 changed files with 22 additions and 0 deletions

20
module/data/helpers.mjs Normal file
View file

@ -0,0 +1,20 @@
const { fields } = foundry.data;
export function barAttribute(min, initial, max = undefined) {
return new fields.SchemaField({
value: new fields.NumberField({
min,
initial,
max,
integer: true,
nullable: false,
}),
max: new fields.NumberField({
min,
initial,
max,
integer: true,
nullable: false,
}),
});
};