diff --git a/scripts/basePowers.js b/scripts/basePowers.js index 35df242..a4505b4 100644 --- a/scripts/basePowers.js +++ b/scripts/basePowers.js @@ -248,8 +248,11 @@ export class PowerEffect { } async createMaintainEffect (maintId) { - const doc = this.createEffectDocument( - MAINTAIN_ICON, `Maintaining ${this.name}`, []) + let icon = MAINTAIN_ICON + if (!this.usePrimaryEffect) { + icon = this.icon + } + const doc = this.createEffectDocument(icon, `Maintaining ${this.name}`, []) doc.duration.rounds = this.duration doc.flags.swade.expiration = CONFIG.SWADE.CONST.STATUS_EFFECT_EXPIRATION.StartOfTurnPrompt doc.flags.swade.loseTurnOnHold = true @@ -320,7 +323,7 @@ export class PowerEffect { } total += this.data.range if (this.isDamaging) { - total += this.data.ap + total += this.data.armorPiercing } return total } @@ -356,7 +359,7 @@ export class PowerEffect { get chatMessageText () { let text = `

Cast ${this.name}` - if (this.targets.length > 0) { + if (this.isTargeted && this.targets.length > 0) { text += ` on ${this.targets.map(t => t.name).join(', ')}` } text += '

' diff --git a/scripts/powers.js b/scripts/powers.js index 8d28267..15d745b 100644 --- a/scripts/powers.js +++ b/scripts/powers.js @@ -82,6 +82,7 @@ class BarrierEffect extends PowerEffect { get duration () { return 5 } get icon () { return 'icons/environment/settlement/fence-stone-brick.webp' } get isTargeted () { return false } + get isDamaging () { return true } get basePowerPoints () { return 2 } get usePrimaryEffect () { return false } get modifiers () { @@ -113,11 +114,6 @@ class BarrierEffect extends PowerEffect { } return list } - async createMaintainEffect (maintId) { - const doc = await super.createMaintainEffect(maintId) - doc.icon = this.icon - return doc - } } class BurrowEffect extends PowerEffect {