RC-123 | Skill | Advances

This commit is contained in:
Oliver-Akins 2025-01-27 20:57:39 -07:00
parent 8cfb6e5238
commit fd3803698a
3 changed files with 29 additions and 7 deletions

View file

@ -64,6 +64,12 @@
"protection": "Protection",
"quantity": "Quantity",
"rank": "Rank",
"rankNames": {
"novice": "Novice",
"adept": "Adept",
"expert": "Expert",
"master": "Master"
},
"range": "Range",
"run": "Run",
"shield": "Shield",

View file

@ -1,7 +1,23 @@
import { gameTerms } from "../../gameTerms.mjs";
const { fields } = foundry.data;
export class SkillData extends foundry.abstract.TypeDataModel {
// MARK: Schema
static defineSchema() {
return {};
const schema = {};
const advances = {};
for (const rank of Object.values(gameTerms.Rank)) {
advances[rank] = new fields.StringField({
blank: false,
nullable: true,
initial: null,
});
};
schema.advances = new fields.SchemaField(advances);
return schema;
};
// MARK: Base Data

View file

@ -11,12 +11,12 @@ export const gameTerms = Object.preventExtensions({
`Rare`,
`Scarce`,
],
Rank: {
NOVICE: `Novice`,
ADEPT: `Adept`,
EXPERT: `Expert`,
MASTER: `Master`,
},
Rank: Object.freeze({
NOVICE: `novice`,
ADEPT: `adept`,
EXPERT: `expert`,
MASTER: `master`,
}),
Anatomy: Object.freeze({
HEAD: `head`,
BODY: `body`,