25 lines
1.3 KiB
JavaScript
25 lines
1.3 KiB
JavaScript
|
import Stat from "./dataModel.mjs"
|
||
|
|
||
|
/* -------------------------------------------- */
|
||
|
/* Actor base Model */
|
||
|
/* -------------------------------------------- */
|
||
|
const fields = foundry.data.fields;
|
||
|
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()}),
|
||
|
}),
|
||
|
}
|
||
|
}
|
||
|
}
|