import BaseItem from "./baseItem.mjs";

const {
    ArrayField, 
    SchemaField, 
    NumberField, 
    StringField, 
    HTMLField
} = foundry.data.fields;

export class SpeciesDataModel extends BaseItem {

    static defineSchema() {
        return {
            description: new HTMLField(),
            baseSpeed: new NumberField({required: true, initial: 6, integer: true}),
            modAttributes: new SchemaField({
                mu: new NumberField({required: false, initial: 0, integer: true}),
                kl: new NumberField({required: false, initial: 0, integer: true}),
                in: new NumberField({required: false, initial: 0, integer: true}),
                ch: new NumberField({required: false, initial: 0, integer: true}),
                ff: new NumberField({required: false, initial: 0, integer: true}),
                ge: new NumberField({required: false, initial: 0, integer: true}),
                ko: new NumberField({required: false, initial: 0, integer: true}),
                kk: new NumberField({required: false, initial: 0, integer: true}),
            }),
            mod: new SchemaField({
                le: new NumberField({required: true, initial: 10, integer: true}),
                au: new NumberField({required: true, initial: 10, integer: true}),
                mr: new NumberField({required: true, initial: -4, integer: true}),
            }),
            defaultAdvantages: new ArrayField(new StringField()),
            recommendedAdvantages: new ArrayField(new StringField()),
            discouragedAdvantages: new ArrayField(new StringField()),
            availableCultures: new ArrayField(new StringField()),
            talentModifications: new ArrayField(new SchemaField({
                name: new StringField(),
                value: new NumberField(),
            })),
            feminineDemonym: new StringField(),
            masculineDemonym: new StringField(),
        }
    }
}