diff --git a/scripts/powers.js b/scripts/powers.js index 0ba1417..59a1850 100644 --- a/scripts/powers.js +++ b/scripts/powers.js @@ -1,6 +1,32 @@ import { moduleName } from './globals.js' import { PowerEffect } from './basePowers.js' +class ArcaneProtectionEffect extends PowerEffect { + get name () { return 'Arcane Protection' } + get duration () { return 5 } + get icon () { return 'icons/magic/defensive/shield-barrier-flaming-pentagon-blue.webp' } + get hasAdditionalRecipients () { return true } + get additionalRecipientCost () { return 1 } + get isTargeted () { return true } + get modifiers () { + const mods = super.modifiers + mods.push({ + name: 'Greater Arcane Protection', + id: 'greater', + value: 2, + epic: true, + effect: false + }) + return mods + } + get effectName () { + const greater = this.data.mods.has('greater') + const raise = this.data.raise + const amount = (raise ? -4 : -2) + (greater ? -2 : 0) + return `${greater ? 'Greater ' : ''}Arcane Protection (${raise ? 'major, ' : ''}${amount})` + } +} + class BurrowEffect extends PowerEffect { get name () { return 'Burrow' } get duration () { return 5 } @@ -27,6 +53,7 @@ class BurrowEffect extends PowerEffect { } const PowerClasses = { + "arcane-protection": ArcaneProtectionEffect, burrow: BurrowEffect }