System development, WIP

This commit is contained in:
2026-05-05 13:55:42 +02:00
commit c0223977d2
250 changed files with 10362 additions and 0 deletions
+31
View File
@@ -0,0 +1,31 @@
import { SYSTEM } from "../config/system.mjs"
import { booleanField, htmlField, numberField, stringField } from "./shared.mjs"
export default class MGNEWeapon extends foundry.abstract.TypeDataModel {
static defineSchema() {
return {
description: htmlField(""),
category: new foundry.data.fields.StringField({
required: true,
nullable: false,
initial: "melee",
choices: SYSTEM.weaponCategories,
}),
damage: stringField("1d4"),
range: stringField("Touch"),
properties: stringField(""),
usageDie: new foundry.data.fields.StringField({
required: true,
nullable: false,
initial: "d6",
choices: SYSTEM.usageDieChoices,
}),
quantity: numberField(1, 0),
equipped: booleanField(false),
broken: booleanField(false),
}
}
/** @override */
static LOCALIZATION_PREFIXES = ["MGNE.Weapon"]
}