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

export class CreatureDataModel extends foundry.abstract.TypeDataModel {

    static defineSchema() {

        return {
            ini: new SchemaField({
                aktuell: new NumberField(),
                wuerfel: new NumberField(),
            }),
            lep: new SchemaField({
                max: new NumberField(),
                aktuell: new NumberField(),
            }),
            mr: new NumberField(),
            rs: new NumberField(),
            attacks: new ArrayField(
                new SchemaField({
                    at: new NumberField(),
                    pa: new NumberField(),
                    tp: new StringField(),
                    name: new StringField(),
                }), {min: 0}),
            description: new HTMLField(),
            visibility: new SchemaField({
                meta: new BooleanField(),
                attacks: new BooleanField(),
                description: new BooleanField(),
                loot: new BooleanField(),
            })
        }
    }

}
