95 lines
1.9 KiB
JavaScript
95 lines
1.9 KiB
JavaScript
import { PowerEffect } from './basePowers.js';
|
|
|
|
export class BoltEffect extends PowerEffect {
|
|
get name() {
|
|
return 'Bolt';
|
|
}
|
|
|
|
get icon() {
|
|
return 'icons/skills/ranged/tracers-triple-orange.webp';
|
|
}
|
|
|
|
get duration() {
|
|
return 0;
|
|
}
|
|
|
|
get isTargeted() {
|
|
return true;
|
|
}
|
|
|
|
get isDamaging() {
|
|
return true;
|
|
}
|
|
|
|
get basePowerPoints() {
|
|
return 3;
|
|
}
|
|
|
|
get usePrimaryEffect() {
|
|
return false;
|
|
}
|
|
|
|
get modifiers() {
|
|
const mods = super.modifiers;
|
|
mods.push(
|
|
{
|
|
type: 'checkbox',
|
|
name: 'Damage',
|
|
value: 2,
|
|
id: 'damage',
|
|
epic: false,
|
|
effect: false,
|
|
},
|
|
{
|
|
type: 'checkbox',
|
|
name: 'Disintegrate',
|
|
value: 1,
|
|
id: 'disintigrate',
|
|
epic: true,
|
|
effect: false,
|
|
},
|
|
{
|
|
name: 'Greater Bolt',
|
|
type: 'checkbox',
|
|
value: 4,
|
|
id: 'greater',
|
|
epic: true,
|
|
effect: false,
|
|
},
|
|
{
|
|
name: 'Rate of Fire',
|
|
type: 'checkbox',
|
|
value: 2,
|
|
id: 'rof',
|
|
epic: true,
|
|
effect: false,
|
|
},
|
|
);
|
|
return mods;
|
|
}
|
|
|
|
get powerPoints() {
|
|
let total = super.powerPoints;
|
|
total += this.data.aoe === 'l' ? 1 : 0;
|
|
return total;
|
|
}
|
|
|
|
get description() {
|
|
const dmgDie = (this.data.greater ? 4 : this.data.damage ? 3 : 2) + (this.data.raise ? 1 : 0);
|
|
let desc = super.description + '<p>';
|
|
if (this.data.rof) {
|
|
desc += `Up to two bolts (RoF 2) do ${dmgDie}d6 damage each.`;
|
|
} else {
|
|
desc += `The bolt does ${dmgDie}d6 damage.`;
|
|
}
|
|
if (this.data.disintegrate) {
|
|
desc +=
|
|
'The bolt is <em>disintegrating</em>. If being used to break' +
|
|
' something, the damage dice can Ace. A creature Incapacitated by a ' +
|
|
'disintegrating bolt must make a Vigor roll or its body turns to dust';
|
|
}
|
|
desc += '</p>';
|
|
return desc;
|
|
}
|
|
}
|