add lock/unlock, magic jar, shield other
This commit is contained in:
parent
fe0e889c02
commit
c68c55bfc7
71
src/module/powers/lockUnlock.js
Normal file
71
src/module/powers/lockUnlock.js
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
import { PowerEffect } from './basePowers.js';
|
||||||
|
|
||||||
|
export class LockUnlockEffect extends PowerEffect {
|
||||||
|
get name() {
|
||||||
|
return 'Lock/Unlock';
|
||||||
|
}
|
||||||
|
|
||||||
|
get duration() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
get icon() {
|
||||||
|
return 'icons/sundries/misc/lock-open-yellow.webp';
|
||||||
|
}
|
||||||
|
|
||||||
|
get isTargeted() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
get basePowerPoints() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
get usePrimaryEffect() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
get modifiers() {
|
||||||
|
return [
|
||||||
|
...super.modifiers,
|
||||||
|
{
|
||||||
|
sortOrder: -2,
|
||||||
|
name: 'Lock or Unlock?',
|
||||||
|
id: 'direction',
|
||||||
|
type: 'radio',
|
||||||
|
default: 'Lock',
|
||||||
|
epic: false,
|
||||||
|
choices: { Lock: 'Lock', Unlock: 'Unlock' },
|
||||||
|
effects: { Lock: null, Unlock: null },
|
||||||
|
values: { Lock: 0, Unlock: 0 },
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
get effectName() {
|
||||||
|
return this.data.direction;
|
||||||
|
}
|
||||||
|
|
||||||
|
get description() {
|
||||||
|
let text = super.description;
|
||||||
|
if (this.data.direction === 'Lock') {
|
||||||
|
text += `<p>Magically seal a door, window, container, envelope, etc. Any
|
||||||
|
attempt to open it suffers a -4 penalty, with a failure meaning that
|
||||||
|
character can't try again until they update their skill level.</p>`;
|
||||||
|
if (this.data.raise) {
|
||||||
|
text += `<p>With the raise, the item can only be opwned with the <em>unlock</em>
|
||||||
|
version of this power (with the above -4 penalty.</p>`;
|
||||||
|
}
|
||||||
|
text += `<p>The caster may set a passphrase. The portal opens for anyone
|
||||||
|
who speaks the passphrase, until the passphrase is spoken again.</p>`;
|
||||||
|
} else {
|
||||||
|
text += `<p>Unlock in place of Repair or Thievery, ignoring up to 4
|
||||||
|
points of penalties. `;
|
||||||
|
if (this.data.raise) {
|
||||||
|
text += `With a raise, it disarms any traps or alarms as well.`;
|
||||||
|
}
|
||||||
|
text += '</p>';
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
}
|
||||||
38
src/module/powers/magicJar.js
Normal file
38
src/module/powers/magicJar.js
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
import { PowerEffect } from './basePowers.js';
|
||||||
|
|
||||||
|
export class MagicJarEffect extends PowerEffect {
|
||||||
|
get name() {
|
||||||
|
return 'MagicJar';
|
||||||
|
}
|
||||||
|
|
||||||
|
get duration() {
|
||||||
|
return 3000;
|
||||||
|
}
|
||||||
|
|
||||||
|
get icon() {
|
||||||
|
return 'icons/consumables/drinks/clay-jar-glowing-orange-blue.webp';
|
||||||
|
}
|
||||||
|
|
||||||
|
get isTargeted() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
get isDamaging() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
get basePowerPoints() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
get usePrimaryEffect() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
get description() {
|
||||||
|
let text = super.description;
|
||||||
|
text += `<p>Transfer the caster's soul into an enchanted vessel. They may
|
||||||
|
move back and forth from the body to the jar if the body is within range.</p>`;
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -38,6 +38,8 @@ import { IntangibilityEffect } from './intangibility.js';
|
|||||||
import { InvisibliltyEffect } from './invisibility.js';
|
import { InvisibliltyEffect } from './invisibility.js';
|
||||||
import { LightDarknessEffect } from './lightdarkness.js';
|
import { LightDarknessEffect } from './lightdarkness.js';
|
||||||
import { LocateEffect } from './locate.js';
|
import { LocateEffect } from './locate.js';
|
||||||
|
import { LockUnlockEffect } from './lockUnlock.js';
|
||||||
|
import { MagicJarEffect } from './magicJar.js';
|
||||||
import { MindLinkEffect } from './mindLink.js';
|
import { MindLinkEffect } from './mindLink.js';
|
||||||
import { MindReadingEffect } from './mindReading.js';
|
import { MindReadingEffect } from './mindReading.js';
|
||||||
import { MindWipeEffect } from './mindWipe.js';
|
import { MindWipeEffect } from './mindWipe.js';
|
||||||
@ -115,7 +117,11 @@ const PowerClasses = {
|
|||||||
lightdarkness: LightDarknessEffect,
|
lightdarkness: LightDarknessEffect,
|
||||||
light: LightDarknessEffect,
|
light: LightDarknessEffect,
|
||||||
locate: LocateEffect,
|
locate: LocateEffect,
|
||||||
|
lock: LockUnlockEffect,
|
||||||
|
lockunlock: LockUnlockEffect,
|
||||||
|
'lock-unlock': LockUnlockEffect,
|
||||||
'lower-trait': BoostLowerTraitEffect,
|
'lower-trait': BoostLowerTraitEffect,
|
||||||
|
'magic-jar': MagicJarEffect,
|
||||||
'mind-link': MindLinkEffect,
|
'mind-link': MindLinkEffect,
|
||||||
'mind-reading': MindReadingEffect,
|
'mind-reading': MindReadingEffect,
|
||||||
'mind-wipe': MindWipeEffect,
|
'mind-wipe': MindWipeEffect,
|
||||||
@ -146,6 +152,7 @@ const PowerClasses = {
|
|||||||
telekinesis: TelekinesisEffect,
|
telekinesis: TelekinesisEffect,
|
||||||
teleport: TeleportEffect,
|
teleport: TeleportEffect,
|
||||||
'time-stop': TimeStopEffect,
|
'time-stop': TimeStopEffect,
|
||||||
|
unlock: LockUnlockEffect,
|
||||||
'wall-walker': WallWalkerEffect,
|
'wall-walker': WallWalkerEffect,
|
||||||
'warriors-gift': WarriorsGiftEffect,
|
'warriors-gift': WarriorsGiftEffect,
|
||||||
wish: WishEffect,
|
wish: WishEffect,
|
||||||
|
|||||||
@ -37,6 +37,22 @@ export class ProtectionEffect extends PowerEffect {
|
|||||||
this.data.effect = doc;
|
this.data.effect = doc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get modifiers() {
|
||||||
|
return [
|
||||||
|
...super.modifiers,
|
||||||
|
{
|
||||||
|
type: 'checkbox',
|
||||||
|
name: 'Shield Other',
|
||||||
|
id: 'other',
|
||||||
|
value: 1,
|
||||||
|
effect: true,
|
||||||
|
epic: false,
|
||||||
|
icon: 'icons/magic/defensive/shield-barrier-flaming-diamond-blue-yellow.webp',
|
||||||
|
changes: '',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
get basePrimaryEffect() {
|
get basePrimaryEffect() {
|
||||||
this.data.effect.changes = this.getPrimaryEffectChanges();
|
this.data.effect.changes = this.getPrimaryEffectChanges();
|
||||||
return this.data.effect;
|
return this.data.effect;
|
||||||
@ -55,6 +71,11 @@ export class ProtectionEffect extends PowerEffect {
|
|||||||
<p>Grant the recipients 2 points of ${this.data.raise ? 'toughness' : 'armor'}
|
<p>Grant the recipients 2 points of ${this.data.raise ? 'toughness' : 'armor'}
|
||||||
</p>
|
</p>
|
||||||
`;
|
`;
|
||||||
|
if (this.data.other) {
|
||||||
|
text += `<p>If the protected creature is not the caster, and the protected
|
||||||
|
creature suffers wounds, the caster can take those wounds instead. If the
|
||||||
|
caster does this, they get a free reroll on the Soak roll, if one is attempted.</p>`;
|
||||||
|
}
|
||||||
return text;
|
return text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user