export class Creature extends Actor {

    /**
     * Augment the basic Item data model with additional dynamic data.
     */
    prepareData() {
        super.prepareData();
        this.prepareEmbeddedDocuments();
    }

    getRollData() {
        const data = super.getRollData();

        if (this.type !== 'character' && this.type !== 'creature') return;

        // Copy the ability scores to the top level, so that rolls can use
        // formulas like `@str.mod + 4`.
        if (data.attribute) {
            for (let [k, v] of Object.entries(data.attribute)) {
                data[k] = foundry.utils.deepClone(v);
            }
        }
        return data;
    }

}
