Custom health bar colors. Also works for setting mid and low health colors

This commit is contained in:
Stefan Zermatten
2022-04-08 17:58:45 +02:00
parent b876c2801d
commit cb80f3a6da
7 changed files with 207 additions and 93 deletions

View File

@@ -47,6 +47,18 @@ let AttributeSchema = createPropertySchema({
spellSlotLevel: {
type: 'fieldToCompute',
optional: true,
},
// For type healthBar midColor, and lowColor can be set separately from the
// property's color, which is used as the undamaged color
'healthBarColorMid': {
type: String,
regEx: /^#([a-f0-9]{3}){1,2}\b$/i,
optional: true,
},
'healthBarColorLow': {
type: String,
regEx: /^#([a-f0-9]{3}){1,2}\b$/i,
optional: true,
},
// The starting value, before effects
baseValue: {