fvtt-never-stop-blowing-up/modules/dataModel/baseActorModel.mjs
2024-10-07 14:12:05 +02:00

29 lines
1.4 KiB
JavaScript

import Stat from "./dataModel.mjs"
/* -------------------------------------------- */
/* Actor base Model */
/* -------------------------------------------- */
const fields = foundry.data.fields;
export default class ActorGeneral extends foundry.abstract.TypeDataModel
{
static defineSchema(){
return {
age: new fields.StringField({required: false}),
pronouns: new fields.StringField({required: false}),
fear: new fields.StringField({required: false}),
grade: new fields.StringField({required: false}),
stats: new fields.SchemaField({
fight: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
brains: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
charm: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
flight: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
brawn: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
grit: new fields.EmbeddedDataField(Stat, {required: true, nullable: false, default: new Stat()}),
}),
}
}
prepareDerivedData() {
super.prepareDerivedData();
}
}