maintained powers use power icon if no primary effect
This commit is contained in:
parent
ba7f3302c1
commit
6100f425ed
@ -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 = `<p>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 += '</p>'
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user