add relief
This commit is contained in:
parent
e0cd1c640c
commit
7c28c43bd9
@ -22,7 +22,7 @@ export class HealingEffect extends PowerEffect {
|
||||
}
|
||||
|
||||
get isDamaging() {
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
|
||||
@ -44,6 +44,7 @@ import { PlanarBindingEffect } from './planarBinding.js';
|
||||
import { PlaneShiftEffect } from './planeShift.js';
|
||||
import { ProtectionEffect } from './protection.js';
|
||||
import { PuppetEffect } from './puppet.js';
|
||||
import { ReliefEffect } from './relief.js';
|
||||
|
||||
const PowerClasses = {
|
||||
'arcane-protection': ArcaneProtectionEffect,
|
||||
@ -101,6 +102,7 @@ const PowerClasses = {
|
||||
'plane-shift': PlaneShiftEffect,
|
||||
protection: ProtectionEffect,
|
||||
puppet: PuppetEffect,
|
||||
relief: ReliefEffect,
|
||||
shrink: GrowthShrinkEffect,
|
||||
};
|
||||
|
||||
|
||||
104
src/module/powers/relief.js
Normal file
104
src/module/powers/relief.js
Normal file
@ -0,0 +1,104 @@
|
||||
import { PowerEffect } from './basePowers.js';
|
||||
|
||||
export class ReliefEffect extends PowerEffect {
|
||||
get name() {
|
||||
return 'Relief';
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/magic/nature/root-vine-caduceus-healing.webp';
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return this.data.effect === 'numb' ? 600 : 0;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get usePrimaryEffect() {
|
||||
return this.data.effect === 'numb';
|
||||
}
|
||||
|
||||
get isDamaging() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
get hasAdditionalRecipients() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get additionalRecipientCost() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
get modifiers() {
|
||||
return [
|
||||
...super.modifiers,
|
||||
{
|
||||
name: 'Restoration',
|
||||
id: 'restoration',
|
||||
value: 3,
|
||||
type: 'checkbox',
|
||||
epic: false,
|
||||
effect: false,
|
||||
},
|
||||
{
|
||||
name: 'Stunned',
|
||||
id: 'stunned',
|
||||
value: 1,
|
||||
type: 'checkbox',
|
||||
epic: false,
|
||||
effect: false,
|
||||
},
|
||||
{
|
||||
name: 'Recover or Numb?',
|
||||
id: 'effect',
|
||||
type: 'radio',
|
||||
epic: false,
|
||||
default: 'recover',
|
||||
choices: { recover: 'Recover', numb: 'Numb' },
|
||||
effects: { recover: null, numb: null },
|
||||
values: { recover: 0, numb: 0 },
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
get effectName() {
|
||||
return 'Numb';
|
||||
}
|
||||
|
||||
getPrimaryEffectChanges() {
|
||||
if (this.data.effect === 'recover') {
|
||||
return super.getPrimaryEffectChanges();
|
||||
}
|
||||
return [
|
||||
...super.getPrimaryEffectChanges(),
|
||||
{
|
||||
key: 'system.woundsOrFatigue.ignored',
|
||||
value: this.data.raise ? 2 : 1,
|
||||
mode: CONST.ACTIVE_EFFECT_MODES.ADD,
|
||||
priority: 0,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
get description() {
|
||||
let text = super.description;
|
||||
if (this.data.effect === 'recover') {
|
||||
text += `<p><strong>Recover</strong>: Remove ${this.data.raise ? 'two' : 'one'}
|
||||
of Shaken, ${this.data.stunned ? 'Stunned, ' : ''}Distracted, or Vulnerable
|
||||
from each target (not caused by circumstance like Bound, Entangled, etc).
|
||||
</p>`;
|
||||
} else {
|
||||
text += `<p><strong>Numb</strong>: Reduce the penalty from Wounds or
|
||||
Fatigue by ${this.data.raise ? 2 : 1}.</p>`;
|
||||
}
|
||||
return text;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user