add farsight
This commit is contained in:
parent
b6a42818c8
commit
53563af7d0
61
src/module/powers/farsight.js
Normal file
61
src/module/powers/farsight.js
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
import { PowerEffect } from './basePowers.js';
|
||||||
|
|
||||||
|
export class FarsightEffect extends PowerEffect {
|
||||||
|
get name() {
|
||||||
|
return 'Farsight';
|
||||||
|
}
|
||||||
|
|
||||||
|
get duration() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
get icon() {
|
||||||
|
return 'icons/magic/perception/eye-ringed-green.webp';
|
||||||
|
}
|
||||||
|
|
||||||
|
get hasAdditionalRecipients() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
get additionalRecipientCost() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
get isTargeted() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
get modifiers() {
|
||||||
|
const mods = super.modifiers;
|
||||||
|
mods.push({
|
||||||
|
name: 'Greater Farsight',
|
||||||
|
id: 'greater',
|
||||||
|
value: 2,
|
||||||
|
type: 'checkbox',
|
||||||
|
default: false,
|
||||||
|
epic: true,
|
||||||
|
effect: false,
|
||||||
|
});
|
||||||
|
return mods;
|
||||||
|
}
|
||||||
|
|
||||||
|
get description() {
|
||||||
|
let text = super.description;
|
||||||
|
text += `<p>See in detail up to
|
||||||
|
${this.data.raise && this.data.greater ? 'two miles' : 'a mile'}.
|
||||||
|
`;
|
||||||
|
if (this.data.greater) {
|
||||||
|
text += 'Ignore all Range penalties.';
|
||||||
|
} else if (this.data.raise) {
|
||||||
|
text += 'Halve all Range penalties.';
|
||||||
|
}
|
||||||
|
text += '</p>';
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
get effectName() {
|
||||||
|
const greater = this.data.greater;
|
||||||
|
const raise = this.data.raise;
|
||||||
|
return `${greater ? 'Greater ' : ''}Faright ${raise ? '(major)' : ''}`;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -25,6 +25,7 @@ import { ElementalManipulationEffect } from './elementalManipulation.js';
|
|||||||
import { EmpathyEffect } from './empathy.js';
|
import { EmpathyEffect } from './empathy.js';
|
||||||
import { EntangleEffect } from './entangle.js';
|
import { EntangleEffect } from './entangle.js';
|
||||||
import { EnvironmentalProtectionEffect } from './environmentalProtection.js';
|
import { EnvironmentalProtectionEffect } from './environmentalProtection.js';
|
||||||
|
import { FarsightEffect } from './farsight.js';
|
||||||
|
|
||||||
const PowerClasses = {
|
const PowerClasses = {
|
||||||
'arcane-protection': ArcaneProtectionEffect,
|
'arcane-protection': ArcaneProtectionEffect,
|
||||||
@ -57,6 +58,7 @@ const PowerClasses = {
|
|||||||
empathy: EmpathyEffect,
|
empathy: EmpathyEffect,
|
||||||
entangle: EntangleEffect,
|
entangle: EntangleEffect,
|
||||||
'environmental-protection': EnvironmentalProtectionEffect,
|
'environmental-protection': EnvironmentalProtectionEffect,
|
||||||
|
farsight: FarsightEffect,
|
||||||
'lower-trait': BoostLowerTraitEffect,
|
'lower-trait': BoostLowerTraitEffect,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user