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": {
"label": "Flavor Text"
},
"enemyType" : {
"label": "Enemy Type"
}
}
},

View File

@@ -99,6 +99,12 @@ export const AMMO_TYPES = {
"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
* @type {Object}
@@ -106,6 +112,7 @@ export const AMMO_TYPES = {
export const SYSTEM = {
id: SYSTEM_ID,
AILMENTS,
ENEMY_TYPES,
STATS,
PERK_ROLES,
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 schema = {}
schema.enemyType = new fields.StringField({
required: true,
initial: "mook",
choices: SYSTEM.ENEMY_TYPES
})
const statField = (label) => {
const schema = {
label: new fields.StringField({ required: true, initial: label }),

View File

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