add teleport

This commit is contained in:
Mike Bloy 2024-06-04 23:59:19 -05:00
parent e016437b73
commit f4bfa13cab
2 changed files with 100 additions and 0 deletions

View File

@ -58,6 +58,7 @@ import { SpeakLanguageEffect } from './speakLanguage.js';
import { StunEffect } from './stun.js'; import { StunEffect } from './stun.js';
import { SummonAllyEffect } from './summon.js'; import { SummonAllyEffect } from './summon.js';
import { TelekinesisEffect } from './telekinesis.js'; import { TelekinesisEffect } from './telekinesis.js';
import { TeleportEffect } from './teleport.js';
const PowerClasses = { const PowerClasses = {
'arcane-protection': ArcaneProtectionEffect, 'arcane-protection': ArcaneProtectionEffect,
@ -136,6 +137,7 @@ const PowerClasses = {
stun: StunEffect, stun: StunEffect,
'summon-ally': SummonAllyEffect, 'summon-ally': SummonAllyEffect,
telekinesis: TelekinesisEffect, telekinesis: TelekinesisEffect,
teleport: TeleportEffect,
}; };
/* ---------------------------------------------------------------- */ /* ---------------------------------------------------------------- */

View File

@ -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 += `<p>The caster opens a gate between locations that stays open for
5 rounds.</p>`;
} else {
desc += `<p>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`}.</p>
`;
if (this.data.foe) {
desc += `<p>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.</p>`;
}
}
if (this.data.greater & !this.data.foe) {
desc += `<p>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:</p>
<ul>
<li>Physically experienced the place: ${this.data.raise ? 'on target' : '[[/r 2d6*10]] feet away'}
and no penalty to the roll.</li>
<li>Detailed map or seen through remote viewing means: -2 penalty and
${this.data.raise ? 'on target' : '[[/r 2d6*100]] feet away'}.</li>
<li>Crude map or general idea of the location: -4 penalty and
${this.data.raise ? '[[/r 2d10]] miles' : '[[/r 2d6*100]] feet'} away.</li>
</ul>`;
}
return desc;
}
}