RC-123 | Skill | Advances
This commit is contained in:
parent
8cfb6e5238
commit
fd3803698a
3 changed files with 29 additions and 7 deletions
|
|
@ -64,6 +64,12 @@
|
||||||
"protection": "Protection",
|
"protection": "Protection",
|
||||||
"quantity": "Quantity",
|
"quantity": "Quantity",
|
||||||
"rank": "Rank",
|
"rank": "Rank",
|
||||||
|
"rankNames": {
|
||||||
|
"novice": "Novice",
|
||||||
|
"adept": "Adept",
|
||||||
|
"expert": "Expert",
|
||||||
|
"master": "Master"
|
||||||
|
},
|
||||||
"range": "Range",
|
"range": "Range",
|
||||||
"run": "Run",
|
"run": "Run",
|
||||||
"shield": "Shield",
|
"shield": "Shield",
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,23 @@
|
||||||
|
import { gameTerms } from "../../gameTerms.mjs";
|
||||||
|
|
||||||
|
const { fields } = foundry.data;
|
||||||
|
|
||||||
export class SkillData extends foundry.abstract.TypeDataModel {
|
export class SkillData extends foundry.abstract.TypeDataModel {
|
||||||
// MARK: Schema
|
// MARK: Schema
|
||||||
static defineSchema() {
|
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
|
// MARK: Base Data
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,12 @@ export const gameTerms = Object.preventExtensions({
|
||||||
`Rare`,
|
`Rare`,
|
||||||
`Scarce`,
|
`Scarce`,
|
||||||
],
|
],
|
||||||
Rank: {
|
Rank: Object.freeze({
|
||||||
NOVICE: `Novice`,
|
NOVICE: `novice`,
|
||||||
ADEPT: `Adept`,
|
ADEPT: `adept`,
|
||||||
EXPERT: `Expert`,
|
EXPERT: `expert`,
|
||||||
MASTER: `Master`,
|
MASTER: `master`,
|
||||||
},
|
}),
|
||||||
Anatomy: Object.freeze({
|
Anatomy: Object.freeze({
|
||||||
HEAD: `head`,
|
HEAD: `head`,
|
||||||
BODY: `body`,
|
BODY: `body`,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue