From 486a7d41676a5eb5a93c207094973da37f5cd9f1 Mon Sep 17 00:00:00 2001 From: Mike Bloy Date: Wed, 15 May 2024 22:03:35 -0500 Subject: [PATCH] add disguise --- src/module/powers/disguise.js | 56 +++++++++++++++++++++++++++++++++++ src/module/powers/powers.js | 47 +---------------------------- 2 files changed, 57 insertions(+), 46 deletions(-) create mode 100644 src/module/powers/disguise.js diff --git a/src/module/powers/disguise.js b/src/module/powers/disguise.js new file mode 100644 index 0000000..6e5caee --- /dev/null +++ b/src/module/powers/disguise.js @@ -0,0 +1,56 @@ +import { PowerEffect } from './basePowers.js'; + +export class DisguiseEffect extends PowerEffect { + get name() { + return 'Disguise'; + } + + get icon() { + return 'icons/equipment/head/mask-carved-wood-white.webp'; + } + + get duration() { + return 100; + } + + get basePowerPoints() { + return 2; + } + + get isTargeted() { + return true; + } + + get hasAdditionalRecipients() { + return true; + } + + get additionalRecipientCost() { + return 1; + } + + get modifiers() { + return [ + ...super.modifiers, + { + name: 'Size', + type: 'checkbox', + value: 1, + id: 'size', + epic: false, + effect: false, + }, + ]; + } + + get description() { + const size = this.data.size ? 'within two sizes of' : 'of the same size as'; + return ( + super.description + + ` +

Assume the appearance of another person ${size} the recipient. Anyone + who has cause to doubt the disguise may make a Notice roll at ${this.data.raise ? -4 : -2} + as a free action to see through the disguise.

` + ); + } +} diff --git a/src/module/powers/powers.js b/src/module/powers/powers.js index 3d9a59d..82ab067 100644 --- a/src/module/powers/powers.js +++ b/src/module/powers/powers.js @@ -1,6 +1,5 @@ /* globals warpgate */ import { moduleName } from '../globals.js'; -import { PowerEffect } from './basePowers.js'; import { ArcaneProtectionEffect } from './arcaneProtection.js'; import { BanishEffect } from './banish.js'; import { BarrierEffect } from './barrier.js'; @@ -17,51 +16,7 @@ import { DamageFieldEffect } from './damageField.js'; import { DarksightEffect } from './darksight.js'; import { DeflectionEffect } from './deflection.js'; import { DetectConcealArcanaEffect } from './detectConcealArcana.js'; - -class DisguiseEffect extends PowerEffect { - get name() { - return 'Disguise'; - } - - get icon() { - return 'icons/equipment/head/mask-carved-wood-white.webp'; - } - - get duration() { - return 100; - } - - get basePowerPoints() { - return 2; - } - - get isTargeted() { - return true; - } - - get hasAdditionalRecipients() { - return true; - } - - get additionalRecipientCost() { - return 1; - } - - get modifiers() { - return [...super.modifiers, { name: 'Size', value: 1, id: 'size', epic: false, effect: false }]; - } - - get description() { - const size = this.data.mods.has('size') ? 'of the same size as' : 'within two sizes of'; - return ( - super.description + - ` -

Assume the appearance of another person ${size} the recipient. Anyone - who has cause to doubt the disguise may make a Notice roll at ${this.data.raise ? -4 : -4} - as a free action to see through the disguise.

` - ); - } -} +import { DisguiseEffect } from './disguise.js'; const PowerClasses = { 'arcane-protection': ArcaneProtectionEffect,