import { PowerEffect } from './basePowers.js'; import { requestRollFromTokens } from '../helpers.js'; export class BanishEffect extends PowerEffect { get name() { return 'Banish'; } get duration() { return 0; } get basePowerPoints() { return 3; } get usePrimaryEffect() { return false; } get isTargeted() { return true; } get isRaisable() { return false; } get hasAoe() { return true; } get modifiers() { const mods = super.modifiers; mods.push({ type: 'number', default: 4, name: 'Opposed Target Number', id: 'tn', epic: false, effect: false, value: 0, }); mods.push({ type: 'select', default: 'none', name: 'Area of Effect', id: 'aoe', epic: true, choices: { none: 'None', sbt: 'Small Blast Template', mbt: 'Medium Blast Template', lbt: 'Large Blast Template', }, effects: { none: null, sbt: null, mbt: null, lbt: null }, values: { none: 0, sbt: 1, mbt: 2, lbt: 3 }, }); return mods; } async sideEffects() { await super.sideEffects(); const rollOpts = { title: 'Spirit roll to resist banishment', flavor: 'Roll Spirit to resist banishment!', targetNumber: this.data.tn, }; await requestRollFromTokens(this.targets, 'ability', 'spirit', rollOpts); } get description() { return ( super.description + `

An opposed roll of the caster's skill vs the target's Spirit. Success: Shaken, each Raise: 1 Wound Incapacitation results in banishment to home plane.

` ); } get chatMessageEffects() { const list = super.chatMessageEffects; if (this.data.aoe !== 'none') { list.push(this.data.aoe.toUpperCase()); } return list; } }