mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 06:26:13 +01:00
Fixed ArmorEffect max being a string
This commit is contained in:
parent
b0f8442aaa
commit
49e834062b
37 changed files with 144 additions and 107 deletions
|
|
@ -173,7 +173,7 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap
|
|||
? Object.values(this.availableStressReductions).filter(red => red.selected)
|
||||
: [];
|
||||
const currentMarks =
|
||||
this.actor.system.armor.system.marks.value + selectedArmorMarks.length + selectedStressMarks.length;
|
||||
this.actor.system.armorScore.value + selectedArmorMarks.length + selectedStressMarks.length;
|
||||
|
||||
const armorMarkReduction =
|
||||
selectedArmorMarks.length * this.actor.system.rules.damageReduction.increasePerArmorMark;
|
||||
|
|
|
|||
|
|
@ -42,11 +42,12 @@ export default class ArmorEffect extends foundry.data.ActiveEffectTypeDataModel
|
|||
{
|
||||
initial: [
|
||||
{
|
||||
key: 'system.armorScore',
|
||||
type: CONFIG.DH.GENERAL.activeEffectModes.armor.id,
|
||||
phase: 'initial',
|
||||
priority: 20,
|
||||
value: 0,
|
||||
max: 1
|
||||
max: '1'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -161,6 +162,7 @@ export default class ArmorEffect extends foundry.data.ActiveEffectTypeDataModel
|
|||
|
||||
static getDefaultObject() {
|
||||
return {
|
||||
key: 'system.armorScore',
|
||||
type: 'armor',
|
||||
name: game.i18n.localize('DAGGERHEART.EFFECTS.Armor.newArmorEffect'),
|
||||
img: 'icons/equipment/chest/breastplate-helmet-metal.webp'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue