Add rituals and tomes
This commit is contained in:
@ -9,5 +9,7 @@ export { default as CthulhuEternalBond } from "./bond.mjs"
|
||||
export { default as CthulhuEternalGear } from "./gear.mjs"
|
||||
export { default as CthulhuEternalMotivation } from "./motivation.mjs"
|
||||
export { default as CthulhuEternalArchetype } from "./archetype.mjs"
|
||||
export { default as CthulhuEternalRitual } from "./ritual.mjs"
|
||||
export { default as CthulhuEternalVehicle } from "./vehicle.mjs"
|
||||
export { default as CthulhuEternalTome } from "./tome.mjs"
|
||||
|
||||
|
24
module/models/ritual.mjs
Normal file
24
module/models/ritual.mjs
Normal file
@ -0,0 +1,24 @@
|
||||
import { SYSTEM } from "../config/system.mjs"
|
||||
|
||||
export default class CthulhuEternalRitual extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields
|
||||
const requiredInteger = { required: true, nullable: false, integer: true }
|
||||
const schema = {}
|
||||
|
||||
schema.ritualType = new fields.StringField({ required: true, initial: "simple", choices: SYSTEM.RITUAL_TYPES })
|
||||
schema.studyTime = new fields.StringField({ required: true, initial: "X days", textSearch: true })
|
||||
schema.studySAN = new fields.StringField({ required: true, initial: "1d4", textSearch: true })
|
||||
schema.activationTime = new fields.StringField({ required: true, initial: "X turns", textSearch: true })
|
||||
schema.activationWP = new fields.StringField({ required: true, initial: "1d4", textSearch: true })
|
||||
schema.activationSAN = new fields.StringField({ required: true, initial: "1d6", textSearch: true })
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static LOCALIZATION_PREFIXES = ["CTHULHUETERNAL.Ritual"]
|
||||
|
||||
}
|
64
module/models/tome.mjs
Normal file
64
module/models/tome.mjs
Normal file
@ -0,0 +1,64 @@
|
||||
import { SYSTEM } from "../config/system.mjs";
|
||||
|
||||
export default class CthulhuEternalTome extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
const schema = {};
|
||||
|
||||
let setting = game.settings.get("fvtt-cthulhu-eternal", "settings-era") || "modern"
|
||||
schema.minimumEra = new fields.StringField({ required: true, initial: setting, choices: SYSTEM.AVAILABLE_SETTINGS })
|
||||
|
||||
schema.creationDate = new fields.StringField({
|
||||
required: true,
|
||||
initial: "",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
// Language field
|
||||
schema.language = new fields.StringField({
|
||||
required: true,
|
||||
initial: "Latin",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
// studyTime field
|
||||
schema.studyTime = new fields.StringField({
|
||||
required: true,
|
||||
initial: "X days",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
// SAN loss field
|
||||
schema.sanLoss = new fields.StringField({
|
||||
required: true,
|
||||
initial: "1d4",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
// Unnatural skill field
|
||||
schema.unnaturalSkill = new fields.StringField({
|
||||
required: true,
|
||||
initial: "1d4",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
schema.rituals = new fields.StringField({
|
||||
required: true,
|
||||
initial: "",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
schema.otherBenefits = new fields.StringField({
|
||||
required: true,
|
||||
initial: "",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
return schema;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static LOCALIZATION_PREFIXES = ["CTHULHUETERNAL.Tome"];
|
||||
}
|
Reference in New Issue
Block a user