fvtt-never-stop-blowing-up/modules/dataModel/baseActorModel.mjs
2024-10-19 23:02:28 +02:00

31 lines
1.5 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()}),
}),
}
}
static LOCALISATION_PREFIXES = ["BaseActor"];
prepareDerivedData() {
super.prepareDerivedData();
}
}