Add Arcane Protection

This commit is contained in:
Mike Bloy 2023-09-18 20:44:53 -05:00 committed by Mike Bloy
parent 57b58b4201
commit 3927291234

View File

@ -141,6 +141,31 @@ class TargetedPowerEffect extends PowerEffect {
}
}
class ArcaneProtectionEffect extends TargetedPowerEffect {
get name () {
return 'Arcane Protection'
}
get baseDurationRounds () {
return 5
}
async prepMenu () {
this.menuData.inputs.push(
{ type: 'checkbox', label: 'Greater', options: false })
}
async prepResult () {
const greater = !!this.inputs[this.inputIndex]
const raise = this.buttons === 'raise'
const amount = (raise ? -4 : -2) + (greater ? -2 : 0)
const icon = 'icons/magic/defensive/shield-barrier-flaming-pentagon-blue.webp'
const name = `${greater ? 'Greater ' : ''}Arcane Protection (${raise ? 'major, ' : ''}${amount})`
this.effectDocs.push(
shim.createEffectDocument(icon, name, this.durationRounds, []))
}
}
class BlindEffect extends TargetedPowerEffect {
async prepMenu (token, targets) {
this.menuData.inputs.push({
@ -997,6 +1022,7 @@ class SummonUndeadEffect extends SummonEffect {
}
const PowerClasses = {
'arcane protection': ArcaneProtectionEffect,
blind: BlindEffect,
'boost/lower trait': BoostLowerTraitEffect,
'boost trait': BoostLowerTraitEffect,