add resurrection and sanctuary
This commit is contained in:
parent
1207b9c1bd
commit
267e892f27
@ -45,6 +45,8 @@ import { PlaneShiftEffect } from './planeShift.js';
|
||||
import { ProtectionEffect } from './protection.js';
|
||||
import { PuppetEffect } from './puppet.js';
|
||||
import { ReliefEffect } from './relief.js';
|
||||
import { ResurrectionEffect } from './resurrection.js';
|
||||
import { SanctuaryEffect } from './sanctuary.js';
|
||||
|
||||
const PowerClasses = {
|
||||
'arcane-protection': ArcaneProtectionEffect,
|
||||
@ -103,6 +105,8 @@ const PowerClasses = {
|
||||
protection: ProtectionEffect,
|
||||
puppet: PuppetEffect,
|
||||
relief: ReliefEffect,
|
||||
resurrection: ResurrectionEffect,
|
||||
sanctuary: SanctuaryEffect,
|
||||
shrink: GrowthShrinkEffect,
|
||||
};
|
||||
|
||||
|
||||
69
src/module/powers/resurrection.js
Normal file
69
src/module/powers/resurrection.js
Normal file
@ -0,0 +1,69 @@
|
||||
import { PowerEffect } from './basePowers.js';
|
||||
|
||||
export class ResurrectionEffect extends PowerEffect {
|
||||
get name() {
|
||||
return 'Resurrection';
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/magic/holy/barrier-shield-winged-cross.webp';
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get isRaisable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
get modifiers() {
|
||||
return [
|
||||
{
|
||||
name: 'Greater Resurrection',
|
||||
type: 'checkbox',
|
||||
value: 10,
|
||||
id: 'greater',
|
||||
epic: true,
|
||||
effect: false,
|
||||
},
|
||||
{
|
||||
name: 'Power',
|
||||
type: 'checkbox',
|
||||
value: 5,
|
||||
id: 'power',
|
||||
epic: false,
|
||||
effect: false,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
get description() {
|
||||
let desc = super.description;
|
||||
let time = 'a body no more than a year old';
|
||||
if (this.data.power) {
|
||||
time = 'a body no more than 10 years old';
|
||||
}
|
||||
if (this.data.greater) {
|
||||
('a dead spirit of any age willing to return');
|
||||
}
|
||||
desc += `<p>This power requires ${time}.
|
||||
After a ${this.data.greater ? 'twelve' : 'four'}-hour ritual,
|
||||
the caster makes an arcane skill roll at -4. If successful the subject
|
||||
returns to life ${this.data.raise ? '' : 'with three wounds and '}Exhausted.
|
||||
`;
|
||||
if (this.data.greater) {
|
||||
desc += `The caster ends the ritual Exhausted.`;
|
||||
}
|
||||
desc += '</p>';
|
||||
return desc;
|
||||
}
|
||||
}
|
||||
74
src/module/powers/sanctuary.js
Normal file
74
src/module/powers/sanctuary.js
Normal file
@ -0,0 +1,74 @@
|
||||
import { PowerEffect } from './basePowers.js';
|
||||
|
||||
export class SanctuaryEffect extends PowerEffect {
|
||||
get name() {
|
||||
return 'Sanctuary';
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/magic/defensive/shield-barrier-flaming-diamond-blue-yellow.webp';
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get hasAoe() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
get description() {
|
||||
const penalty =
|
||||
this.data.raise || this.data.strong ? '' : ` at ${(this.data.raise ? -2 : 0) + (this.data.strong ? -2 : 0)}`;
|
||||
return (
|
||||
super.description +
|
||||
`<p>
|
||||
Any evil creature attempting a damaging attack that targets or affects
|
||||
the recipient must make a Spirit roll${penalty} or lose the action to
|
||||
no effect.</p>
|
||||
<p>Anyone under the affects of <em>sanctuary</em> who attempts to harm
|
||||
another creature immediately loses the benefit.
|
||||
</p>`
|
||||
);
|
||||
}
|
||||
|
||||
get modifiers() {
|
||||
const mods = super.modifiers;
|
||||
mods.push({
|
||||
name: 'Strong',
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
id: 'strong',
|
||||
epic: true,
|
||||
effect: false,
|
||||
});
|
||||
mods.push({
|
||||
type: 'select',
|
||||
default: 'none',
|
||||
name: 'Area of Effect',
|
||||
id: 'aoe',
|
||||
epic: true,
|
||||
choices: {
|
||||
none: 'None',
|
||||
mbt: 'Medium Blast Template',
|
||||
lbt: 'Large Blast Template',
|
||||
},
|
||||
effects: { none: null, mbt: null, lbt: null },
|
||||
values: { none: 0, mbt: 2, lbt: 3 },
|
||||
});
|
||||
return mods;
|
||||
}
|
||||
|
||||
get effectName() {
|
||||
const penalty = (this.data.raise ? -2 : 0) + (this.data.strong ? -2 : 0);
|
||||
return `Sanctuary${penalty === 0 ? '' : ` (${penalty} penalty)`}`;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user