From ef1eb940d030a9f3b30900e65e8130eaa7d828ac Mon Sep 17 00:00:00 2001 From: Mike Bloy Date: Thu, 23 May 2024 15:25:29 -0500 Subject: [PATCH] add locate --- src/module/powers/locate.js | 61 +++++++++++++++++++++++++++++++++++++ src/module/powers/powers.js | 2 ++ 2 files changed, 63 insertions(+) create mode 100644 src/module/powers/locate.js diff --git a/src/module/powers/locate.js b/src/module/powers/locate.js new file mode 100644 index 0000000..ee7ffcc --- /dev/null +++ b/src/module/powers/locate.js @@ -0,0 +1,61 @@ +import { PowerEffect } from './basePowers.js'; + +export class LocateEffect extends PowerEffect { + get name() { + return 'Locate'; + } + + get icon() { + return 'icons/tools/navigation/compass-plain-blue.webp'; + } + + get duration() { + return 0; + } + + get isTargeted() { + return false; + } + + get isRaisable() { + return true; + } + + get basePowerPoints() { + return 5; + } + + get modifiers() { + return [ + { + name: 'Find the Path', + type: 'checkbox', + value: 1, + id: 'path', + epic: false, + effect: false, + }, + ]; + } + + get description() { + let desc = + super.description + + `

+ If the target has never been seen by the caster, the activation roll is at -2. + Get a sense of general direction and distance to the target, unless blocked by + running water. + `; + if (this.data.raise) { + desc += `The caster also gets an idea of general state of the target (eg + asleep, in a small room, behind a bookshelf). + `; + } + if (this.data.path) { + desc += `The caster gets a supernatural sense of the best way to navigate + to the target's general area.`; + } + desc += '

'; + return desc; + } +} diff --git a/src/module/powers/powers.js b/src/module/powers/powers.js index 603af0d..d64fa82 100644 --- a/src/module/powers/powers.js +++ b/src/module/powers/powers.js @@ -35,6 +35,7 @@ import { IllusionEffect } from './illusion.js'; import { IntangibilityEffect } from './intangibility.js'; import { InvisibliltyEffect } from './invisibility.js'; import { LightDarknessEffect } from './lightdarkness.js'; +import { LocateEffect } from './locate.js'; const PowerClasses = { 'arcane-protection': ArcaneProtectionEffect, @@ -82,6 +83,7 @@ const PowerClasses = { 'light-darkness': LightDarknessEffect, lightdarkness: LightDarknessEffect, light: LightDarknessEffect, + locate: LocateEffect, 'lower-trait': BoostLowerTraitEffect, shrink: GrowthShrinkEffect, };