Working on the spells panel, which resulted in a lot of weird structural changes that aren't *really* functional yet

This commit is contained in:
Oliver-Akins 2024-01-07 22:27:26 -07:00
parent 227029ffcd
commit dfc51a5899
31 changed files with 499 additions and 84 deletions

View file

@ -2,11 +2,6 @@ export class CommonItemData extends foundry.abstract.DataModel {
static defineSchema() {
const fields = foundry.data.fields;
return {
name: new fields.StringField({
initial: ``,
blank: true,
trim: true,
}),
cost: new fields.NumberField({
initial: null,
nullable: true,

View file

@ -0,0 +1,22 @@
import { DescribedItemData } from "./DescribedItemData.mjs";
import DOTDUNGEON from "../../config.mjs";
export class SpellItemData extends DescribedItemData {
static defineSchema() {
const fields = foundry.data.fields;
return mergeObject(super.defineSchema(), {
skill: new fields.StringField({
initial: ``,
blank: true,
trim: true,
options() {
let skills = [ `` ];
for (const group in DOTDUNGEON.skills) {
skills.push(...skills[group]);
};
return skills;
},
}),
});
};
};