changing how effect descriptions work
This commit is contained in:
parent
5dfce6cbcc
commit
ca7acd7e9d
@ -19,10 +19,19 @@ class ArcaneProtectionEffect extends PowerEffect {
|
|||||||
})
|
})
|
||||||
return mods
|
return mods
|
||||||
}
|
}
|
||||||
|
get _penaltyAmount () {
|
||||||
|
return (this.data.raise ? -4 : -2) + (this.data.mods.has('greater') ? -2 : 0)
|
||||||
|
}
|
||||||
|
getPrimaryEffectDescription () {
|
||||||
|
let text = super.getPrimaryEffectDescription()
|
||||||
|
text += `<p>Hostile powers are at ${this._penaltyAmount}
|
||||||
|
targeting or damaging this character.</p>`
|
||||||
|
return text
|
||||||
|
}
|
||||||
get effectName () {
|
get effectName () {
|
||||||
const greater = this.data.mods.has('greater')
|
const greater = this.data.mods.has('greater')
|
||||||
const raise = this.data.raise
|
const raise = this.data.raise
|
||||||
const amount = (raise ? -4 : -2) + (greater ? -2 : 0)
|
const amount = this._penaltyAmount
|
||||||
return `${greater ? 'Greater ' : ''}Arcane Protection (${raise ? 'major, ' : ''}${amount})`
|
return `${greater ? 'Greater ' : ''}Arcane Protection (${raise ? 'major, ' : ''}${amount})`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -69,12 +78,10 @@ class BanishEffect extends PowerEffect {
|
|||||||
list.push("If target incapacitated by this, banishment to home plane")
|
list.push("If target incapacitated by this, banishment to home plane")
|
||||||
return list
|
return list
|
||||||
}
|
}
|
||||||
|
|
||||||
async parseValues () {
|
async parseValues () {
|
||||||
await super.parseValues()
|
await super.parseValues()
|
||||||
this.data.aoe = this.data.values.shift()
|
this.data.aoe = this.data.values.shift()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class BarrierEffect extends PowerEffect {
|
class BarrierEffect extends PowerEffect {
|
||||||
@ -96,15 +103,41 @@ class BarrierEffect extends PowerEffect {
|
|||||||
mods.push({ name: 'Size', id: 'size', value: 1, epic: false, effect: false })
|
mods.push({ name: 'Size', id: 'size', value: 1, epic: false, effect: false })
|
||||||
return mods
|
return mods
|
||||||
}
|
}
|
||||||
|
get _length () {
|
||||||
|
let height = 10
|
||||||
|
if (this.data.raise) { height *= 2 }
|
||||||
|
if (this.data.mods.has('size')) { height *= 2}
|
||||||
|
return `${height}" (${height*2} yards)`
|
||||||
|
}
|
||||||
|
get _height () {
|
||||||
|
return `${this.data.mods.has('size') ? '2" (4' : '1" (2'} yards`
|
||||||
|
}
|
||||||
|
get _hardness () {
|
||||||
|
return (this.data.raise ? 12 : 10) + (this.data.mods.has('hardened') ? 2 : 0)
|
||||||
|
}
|
||||||
|
getPrimaryEffectDescription () {
|
||||||
|
let text = super.getPrimaryEffectDescription()
|
||||||
|
text += `<p>A barrier ${this._height} tall and ${this._length} long, of hardness ${this._hardness}.`
|
||||||
|
if (this.data.mods.has('deadly')) {
|
||||||
|
text += 'It does 2d6 damage to anyone who contacts it.'
|
||||||
|
} else if (this.data.mods.has('damage')) {
|
||||||
|
text += 'It does 2d4 damage to anyone who contacts it.'
|
||||||
|
}
|
||||||
|
if (this.data.mods.has('shaped')) {
|
||||||
|
text += 'It was shaped into a circle, square, or rectangle.'
|
||||||
|
}
|
||||||
|
text += '</p>'
|
||||||
|
return text
|
||||||
|
}
|
||||||
get chatMessageEffects () {
|
get chatMessageEffects () {
|
||||||
const list = []
|
const list = []
|
||||||
const hardness = (this.data.raise ? 12 : 10) + (this.data.mods.has('hardened') ? 2 : 0)
|
list.push(
|
||||||
list.push(`The Barrier is hardness ${hardness}`)
|
`The Barrier is ${this._height} tall and ${this._length} long, of hardness ${this._hardness}.`
|
||||||
if (this.data.mods.has('damage')) {
|
)
|
||||||
list.push('Damage: 2d4 to anyone who contacts')
|
|
||||||
}
|
|
||||||
if (this.data.mods.has('deadly')) {
|
if (this.data.mods.has('deadly')) {
|
||||||
list.push('Deadly: 2d6 to anyone who contacts')
|
list.push('Deadly: 2d6 to anyone who contacts')
|
||||||
|
} else if (this.data.mods.has('damage')) {
|
||||||
|
list.push('Damage: 2d4 to anyone who contacts')
|
||||||
}
|
}
|
||||||
if (this.data.mods.has('shaped')) {
|
if (this.data.mods.has('shaped')) {
|
||||||
list.push('Shaped (circle, square, or rectangle)')
|
list.push('Shaped (circle, square, or rectangle)')
|
||||||
@ -133,6 +166,18 @@ class BeastFriendEffect extends PowerEffect {
|
|||||||
)
|
)
|
||||||
return mods
|
return mods
|
||||||
}
|
}
|
||||||
|
getPrimaryEffectDescription () {
|
||||||
|
let text = super.getPrimaryEffectDescription()
|
||||||
|
if (this.data.raise) {
|
||||||
|
text += '<p>Creatures will overcome instincts to follow orders.'
|
||||||
|
} else {
|
||||||
|
text += '<p>Creatures obey simple commands, subject to their insticts.'
|
||||||
|
}
|
||||||
|
if (this.data.mods('bestiarium')) {
|
||||||
|
text += ' The caster may even effect magical beasts.'
|
||||||
|
}
|
||||||
|
return text
|
||||||
|
}
|
||||||
get chatMessageEffects () {
|
get chatMessageEffects () {
|
||||||
const list = []
|
const list = []
|
||||||
if (this.data.mods.has('bestiarium')) {
|
if (this.data.mods.has('bestiarium')) {
|
||||||
@ -299,6 +344,21 @@ class BurrowEffect extends PowerEffect {
|
|||||||
return `${this.name} ${this.data.mods.has('power') ? '[Power] ' : ''}` +
|
return `${this.name} ${this.data.mods.has('power') ? '[Power] ' : ''}` +
|
||||||
`(${this.data.raise ? 'full' : 'half'} pace)`
|
`(${this.data.raise ? 'full' : 'half'} pace)`
|
||||||
}
|
}
|
||||||
|
getPrimaryEffectDescription() {
|
||||||
|
let text = super.getPrimaryEffectDescription() +
|
||||||
|
`<p>Meld into the ground. Move at ${this.data.raise ? 'full' : 'half'} pace. May not run.</p>`
|
||||||
|
if (this.data.mods.has('power')) {
|
||||||
|
text += `<p>Can <em>burrow</em> through solid stone, concrete, etc</p>`
|
||||||
|
}
|
||||||
|
return text
|
||||||
|
}
|
||||||
|
get chatMessageEffects () {
|
||||||
|
const list = super.chatMessageEffects
|
||||||
|
if (this.data.mods.has('Power')) {
|
||||||
|
list.push('Power: Burrow through solid stone, concrete')
|
||||||
|
}
|
||||||
|
return list
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const PowerClasses = {
|
const PowerClasses = {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user