add resist roll to banish
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { PowerEffect } from './basePowers.js';
|
||||
import { requestRollFromTokens } from '../helpers.js';
|
||||
import { getPowerModifiers } from '../rollHelpers.js';
|
||||
|
||||
export class BanishEffect extends PowerEffect {
|
||||
get name() {
|
||||
@@ -31,6 +33,15 @@ export class BanishEffect extends PowerEffect {
|
||||
|
||||
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',
|
||||
@@ -49,6 +60,17 @@ export class BanishEffect extends PowerEffect {
|
||||
return mods;
|
||||
}
|
||||
|
||||
async sideEffects() {
|
||||
await super.sideEffects();
|
||||
const rollOpts = {
|
||||
title: 'Spirit roll to resist banishment',
|
||||
flavor: 'Roll Spirit to resist banishment!',
|
||||
modCallback: getPowerModifiers,
|
||||
targetNumber: this.data.tn,
|
||||
};
|
||||
await requestRollFromTokens(this.targets, 'ability', 'spirit', rollOpts);
|
||||
}
|
||||
|
||||
get description() {
|
||||
return (
|
||||
super.description +
|
||||
|
||||
Reference in New Issue
Block a user