add fear
This commit is contained in:
parent
53563af7d0
commit
c76ce1ff7c
@ -10,6 +10,10 @@ export class BanishEffect extends PowerEffect {
|
||||
return 0;
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/magic/control/sihouette-hold-beam-green.webp';
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
97
src/module/powers/fear.js
Normal file
97
src/module/powers/fear.js
Normal file
@ -0,0 +1,97 @@
|
||||
import { PowerEffect } from './basePowers.js';
|
||||
import { requestFearRollFromTokens } from '../helpers.js';
|
||||
|
||||
export class FearEffect extends PowerEffect {
|
||||
get name() {
|
||||
return 'Fear';
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/magic/control/fear-fright-monster-grin-green.webp';
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
get usePrimaryEffect() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get isRaisable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get hasAoe() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get modifiers() {
|
||||
const mods = super.modifiers;
|
||||
mods.push({
|
||||
type: 'checkbox',
|
||||
default: false,
|
||||
name: 'Greater Fear',
|
||||
id: 'greater',
|
||||
epic: true,
|
||||
effect: false,
|
||||
value: 2,
|
||||
});
|
||||
mods.push({
|
||||
type: 'select',
|
||||
default: 'none',
|
||||
name: 'Area of Effect',
|
||||
id: 'aoe',
|
||||
epic: false,
|
||||
choices: {
|
||||
none: 'None',
|
||||
sbt: 'Small Blast Template',
|
||||
mbt: 'Medium Blast Template',
|
||||
lbt: 'Large Blast Template',
|
||||
},
|
||||
effects: { none: null, sbt: null, mbt: null, lbt: null },
|
||||
values: { none: 0, sbt: 2, mbt: 2, lbt: 3 },
|
||||
});
|
||||
return mods;
|
||||
}
|
||||
|
||||
async sideEffects() {
|
||||
await super.sideEffects();
|
||||
const penalty = (this.data.raise ? -2 : 0) + (this.data.greater ? -2 : 0);
|
||||
const rollOpts = {
|
||||
title: 'Fear Check',
|
||||
flavor: 'Roll Spirit for a Fear Check',
|
||||
};
|
||||
if (penalty !== 0) {
|
||||
rollOpts.fear = penalty;
|
||||
}
|
||||
await requestFearRollFromTokens(this.targets, rollOpts);
|
||||
}
|
||||
|
||||
get description() {
|
||||
const penalty = (this.data.raise ? -2 : 0) + (this.data.greater ? -2 : 0);
|
||||
return (
|
||||
super.description +
|
||||
`<p>Target makes a Fear Check${penalty !== 0 ? ` at ${penalty}` : ''}.
|
||||
Extras who fail are Panicked. Wild Cards who fail roll on the
|
||||
Fear Table${penalty !== 0 ? ` adding ${penalty * -1} to the result` : ''}.
|
||||
</p>`
|
||||
);
|
||||
}
|
||||
|
||||
get chatMessageEffects() {
|
||||
const list = super.chatMessageEffects;
|
||||
if (this.data.aoe !== 'none') {
|
||||
list.push(this.data.aoe.toUpperCase());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
||||
@ -26,6 +26,7 @@ import { EmpathyEffect } from './empathy.js';
|
||||
import { EntangleEffect } from './entangle.js';
|
||||
import { EnvironmentalProtectionEffect } from './environmentalProtection.js';
|
||||
import { FarsightEffect } from './farsight.js';
|
||||
import { FearEffect } from './fear.js';
|
||||
|
||||
const PowerClasses = {
|
||||
'arcane-protection': ArcaneProtectionEffect,
|
||||
@ -59,6 +60,7 @@ const PowerClasses = {
|
||||
entangle: EntangleEffect,
|
||||
'environmental-protection': EnvironmentalProtectionEffect,
|
||||
farsight: FarsightEffect,
|
||||
fear: FearEffect,
|
||||
'lower-trait': BoostLowerTraitEffect,
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user