diff --git a/src/module/powers/powers.js b/src/module/powers/powers.js index 54e7cb5..9fcf4a1 100644 --- a/src/module/powers/powers.js +++ b/src/module/powers/powers.js @@ -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, }; diff --git a/src/module/powers/resurrection.js b/src/module/powers/resurrection.js new file mode 100644 index 0000000..d126eb3 --- /dev/null +++ b/src/module/powers/resurrection.js @@ -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 += `
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 += '
'; + return desc; + } +} diff --git a/src/module/powers/sanctuary.js b/src/module/powers/sanctuary.js new file mode 100644 index 0000000..d8ea82f --- /dev/null +++ b/src/module/powers/sanctuary.js @@ -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 + + `+ 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.
+Anyone under the affects of sanctuary who attempts to harm + another creature immediately loses the benefit. +
` + ); + } + + 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)`}`; + } +}