diff --git a/src/module/powers/powers.js b/src/module/powers/powers.js index 58f8574..7b0b215 100644 --- a/src/module/powers/powers.js +++ b/src/module/powers/powers.js @@ -58,6 +58,7 @@ import { SpeakLanguageEffect } from './speakLanguage.js'; import { StunEffect } from './stun.js'; import { SummonAllyEffect } from './summon.js'; import { TelekinesisEffect } from './telekinesis.js'; +import { TeleportEffect } from './teleport.js'; const PowerClasses = { 'arcane-protection': ArcaneProtectionEffect, @@ -136,6 +137,7 @@ const PowerClasses = { stun: StunEffect, 'summon-ally': SummonAllyEffect, telekinesis: TelekinesisEffect, + teleport: TeleportEffect, }; /* ---------------------------------------------------------------- */ diff --git a/src/module/powers/teleport.js b/src/module/powers/teleport.js new file mode 100644 index 0000000..c747c37 --- /dev/null +++ b/src/module/powers/teleport.js @@ -0,0 +1,98 @@ +import { PowerEffect } from './basePowers.js'; + +export class TeleportEffect extends PowerEffect { + get name() { + return 'Teleport'; + } + + get icon() { + return 'icons/magic/movement/portal-vortex-orange.webp'; + } + + get duration() { + return this?.data?.gate ? 5 : 0; + } + + get isTargeted() { + return true; + } + + get isRaisable() { + return true; + } + + get hasAdditionalRecipients() { + return true; + } + + get additionalRecipientCost() { + return 1; + } + + get usePrimaryEffect() { + return false; + } + + get basePowerPoints() { + return 2; + } + + get modifiers() { + return [ + { + name: 'Gate', + type: 'checkbox', + value: 5, + id: 'gate', + epic: true, + effect: false, + }, + { + name: 'Greater Teleport', + type: 'checkbox', + value: 5, + id: 'greater', + epic: true, + effect: false, + }, + { + name: 'Teleport Foe', + type: 'checkbox', + value: 2, + id: 'foe', + epic: false, + effect: false, + }, + ]; + } + + get description() { + let desc = super.description; + if (this.data.gate) { + desc += `

The caster opens a gate between locations that stays open for + 5 rounds.

`; + } else { + desc += `

The caster instantly moves the subject(s) to a new location + ${this.data.greater && !this.data.foe ? 'elsewhere on the planet' : `within ${this.data.raise ? 48 : 24} yards`}.

+ `; + if (this.data.foe) { + desc += `

Unwilling foes may be targeted by a Multi-Action sequence of a Touch + attack followed by casting this spell. This is resisted by an opposed Spirit roll.

`; + } + } + if (this.data.greater & !this.data.foe) { + desc += `

A greater teleport may arrive anywhere on the planet with three + rounds of concentration. How close the subjects arrive is dependent on the + caster's knowledge of the destination:

+ `; + } + return desc; + } +}