Add Enemy sheet
All checks were successful
Release Creation / build (release) Successful in 59s

This commit is contained in:
2025-05-25 17:45:30 +02:00
parent 973daae15a
commit 29cb687bbb
4 changed files with 17 additions and 0 deletions

View File

@@ -29,6 +29,9 @@
}, },
"flavorText": { "flavorText": {
"label": "Flavor Text" "label": "Flavor Text"
},
"enemyType" : {
"label": "Enemy Type"
} }
} }
}, },

View File

@@ -99,6 +99,12 @@ export const AMMO_TYPES = {
"tesla": { id: "tesla", label: "Tesla" }, "tesla": { id: "tesla", label: "Tesla" },
} }
export const ENEMY_TYPES = {
"mook": { id: "mook", label: "Mook" },
"elite": { id: "elite", label: "Elite" },
"legendary": { id: "legendary", label: "Legendary" }
}
/** /**
* Include all constant definitions within the SYSTEM global export * Include all constant definitions within the SYSTEM global export
* @type {Object} * @type {Object}
@@ -106,6 +112,7 @@ export const AMMO_TYPES = {
export const SYSTEM = { export const SYSTEM = {
id: SYSTEM_ID, id: SYSTEM_ID,
AILMENTS, AILMENTS,
ENEMY_TYPES,
STATS, STATS,
PERK_ROLES, PERK_ROLES,
PERK_LEVELS, PERK_LEVELS,

View File

@@ -8,6 +8,12 @@ export default class HellbornEnemy extends foundry.abstract.TypeDataModel {
const requiredInteger = { required: true, nullable: false, integer: true } const requiredInteger = { required: true, nullable: false, integer: true }
const schema = {} const schema = {}
schema.enemyType = new fields.StringField({
required: true,
initial: "mook",
choices: SYSTEM.ENEMY_TYPES
})
const statField = (label) => { const statField = (label) => {
const schema = { const schema = {
label: new fields.StringField({ required: true, initial: label }), label: new fields.StringField({ required: true, initial: label }),

View File

@@ -18,6 +18,7 @@
</div> </div>
<fieldset class="enemy-definition"> <fieldset class="enemy-definition">
{{formField systemFields.enemyType value=system.enemyType rootId=partId disabled=isPlayMode}}
{{formField systemFields.flavorText value=system.flavorText rootId=partId disabled=isPlayMode}} {{formField systemFields.flavorText value=system.flavorText rootId=partId disabled=isPlayMode}}
</fieldset> </fieldset>