mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-07-22 02:19:54 +02:00
Fix adversary damage
This commit is contained in:
parent
6ae07bd3a7
commit
23ebe6f6b5
6 changed files with 114 additions and 99 deletions
|
|
@ -232,7 +232,7 @@ export default class DHWeapon extends AttachableItem {
|
|||
const parts = value.custom.enabled ? [game.i18n.localize('DAGGERHEART.GENERAL.custom')] : [value.dice];
|
||||
if (!value.custom.enabled && value.bonus) parts.push(value.bonus.signedString());
|
||||
|
||||
if (type.size > 0) {
|
||||
if (type?.size) {
|
||||
const typeTags = Array.from(type)
|
||||
.map(t => game.i18n.localize(`DAGGERHEART.CONFIG.DamageType.${t}.abbreviation`))
|
||||
.join(' | ');
|
||||
|
|
@ -259,7 +259,7 @@ export default class DHWeapon extends AttachableItem {
|
|||
for (const { value, type } of [damage.main, ...damage.resources].filter(d => !!d)) {
|
||||
const str = Roll.replaceFormulaData(value.getFormula(), this.actor?.getRollData() ?? {});
|
||||
|
||||
const icons = Array.from(type)
|
||||
const icons = Array.from(type ?? [])
|
||||
.map(t => CONFIG.DH.GENERAL.damageTypes[t]?.icon)
|
||||
.filter(Boolean);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue