62 lines
1.2 KiB
JavaScript
62 lines
1.2 KiB
JavaScript
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)' : ''}`;
|
|
}
|
|
}
|