mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
* Initial datamodel * Fixed attack * Temp * Fixed normal levelup * Fixed showing summary of new experiences * Touchups * level sync fixes * Reworked Action storage * Companions now take stress when damaged * Fixed Feature flow * Removed retroactive companion levelup * Restored delevel on partner removal * PR fixes * Added a check for card duplicates on character
25 lines
758 B
JavaScript
25 lines
758 B
JavaScript
import BaseDataItem from './base.mjs';
|
|
import ActionField from '../fields/actionField.mjs';
|
|
|
|
export default class DHConsumable extends BaseDataItem {
|
|
/** @inheritDoc */
|
|
static get metadata() {
|
|
return foundry.utils.mergeObject(super.metadata, {
|
|
label: 'TYPES.Item.consumable',
|
|
type: 'consumable',
|
|
hasDescription: true,
|
|
isQuantifiable: true,
|
|
isInventoryItem: true
|
|
});
|
|
}
|
|
|
|
/** @inheritDoc */
|
|
static defineSchema() {
|
|
const fields = foundry.data.fields;
|
|
return {
|
|
...super.defineSchema(),
|
|
consumeOnUse: new fields.BooleanField({ initial: false }),
|
|
actions: new fields.ArrayField(new ActionField())
|
|
};
|
|
}
|
|
}
|