add create pit
This commit is contained in:
parent
20871bcdef
commit
fe0e889c02
109
src/module/powers/createPit.js
Normal file
109
src/module/powers/createPit.js
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
import { PowerEffect } from './basePowers.js';
|
||||||
|
|
||||||
|
export class CreatePitEffect extends PowerEffect {
|
||||||
|
get name() {
|
||||||
|
return 'Create Pit';
|
||||||
|
}
|
||||||
|
|
||||||
|
get duration() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
get icon() {
|
||||||
|
return 'icons/environment/traps/spike-skull-white-brown.webp';
|
||||||
|
}
|
||||||
|
|
||||||
|
get isTargeted() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
get basePowerPoints() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
get usePrimaryEffect() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
get modifiers() {
|
||||||
|
return [
|
||||||
|
...super.modifiers,
|
||||||
|
{
|
||||||
|
name: 'Soft Ground',
|
||||||
|
id: 'soft',
|
||||||
|
type: 'checkbox',
|
||||||
|
default: false,
|
||||||
|
value: 1,
|
||||||
|
epic: false,
|
||||||
|
effect: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Spiked',
|
||||||
|
id: 'spiked',
|
||||||
|
type: 'checkbox',
|
||||||
|
default: false,
|
||||||
|
value: 1,
|
||||||
|
epic: false,
|
||||||
|
effect: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Deep',
|
||||||
|
id: 'deep',
|
||||||
|
type: 'checkbox',
|
||||||
|
default: false,
|
||||||
|
value: 2,
|
||||||
|
epic: false,
|
||||||
|
effect: false,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
get damage() {
|
||||||
|
let dice = 2;
|
||||||
|
let mod = 2;
|
||||||
|
if (this.data.deep) {
|
||||||
|
dice += 2;
|
||||||
|
mod = 4;
|
||||||
|
}
|
||||||
|
if (this.data.spiked) {
|
||||||
|
dice += 1;
|
||||||
|
}
|
||||||
|
return { dice, mod };
|
||||||
|
}
|
||||||
|
|
||||||
|
get description() {
|
||||||
|
let text = super.description;
|
||||||
|
const deep = this.data.deep ? '8" (16 yards)' : '4" (8 yards)';
|
||||||
|
const damage = this.damage;
|
||||||
|
text += `<p>An extradimension pit appears as a hole the size of an MBT,
|
||||||
|
${deep} deep.
|
||||||
|
`;
|
||||||
|
if (this.data.spiked) {
|
||||||
|
text += 'The bottom is covered in spikes.';
|
||||||
|
}
|
||||||
|
text += `</p>
|
||||||
|
<p>Anyone in or adjacent to the area must make an Evasion roll
|
||||||
|
${this.data.raise ? '(at -2 from the raise)' : ''} or fall in.
|
||||||
|
`;
|
||||||
|
if (this.data.soft) {
|
||||||
|
text += 'The bottom is soft and does no damage.';
|
||||||
|
} else {
|
||||||
|
text += `Those who fall in take ${damage.dice}d6+${damage.mod} damage.`;
|
||||||
|
}
|
||||||
|
return text;
|
||||||
|
}
|
||||||
|
|
||||||
|
get maintEffectButtons() {
|
||||||
|
const damage = this.damage;
|
||||||
|
const buttons = super.maintEffectButtons;
|
||||||
|
if (!this.data.soft) {
|
||||||
|
buttons.push({
|
||||||
|
label: `Falling Damage (${damage.dice}d6+${damage.mod})`,
|
||||||
|
type: 'damage',
|
||||||
|
flavor: `Falling Damage${this.data.spiked ? ' with spikes!' : ''}`,
|
||||||
|
formula: `${damage.dice}d6x+${damage.mod}`,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return buttons;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -13,6 +13,7 @@ import { BoostLowerTraitEffect } from './boostLowerTrait.js';
|
|||||||
import { BurstEffect } from './burst.js';
|
import { BurstEffect } from './burst.js';
|
||||||
import { ConfusionEffect } from './confusion.js';
|
import { ConfusionEffect } from './confusion.js';
|
||||||
import { ConjureItemEffect } from './conjureItem.js';
|
import { ConjureItemEffect } from './conjureItem.js';
|
||||||
|
import { CreatePitEffect } from './createPit';
|
||||||
import { CurseEffect } from './curse.js';
|
import { CurseEffect } from './curse.js';
|
||||||
import { DamageFieldEffect } from './damageField.js';
|
import { DamageFieldEffect } from './damageField.js';
|
||||||
import { DarksightEffect } from './darksight.js';
|
import { DarksightEffect } from './darksight.js';
|
||||||
@ -82,6 +83,7 @@ const PowerClasses = {
|
|||||||
'conceal-arcana': DetectConcealArcanaEffect,
|
'conceal-arcana': DetectConcealArcanaEffect,
|
||||||
confusion: ConfusionEffect,
|
confusion: ConfusionEffect,
|
||||||
'conjure-item': ConjureItemEffect,
|
'conjure-item': ConjureItemEffect,
|
||||||
|
'create-pit': CreatePitEffect,
|
||||||
curse: CurseEffect,
|
curse: CurseEffect,
|
||||||
'damage-field': DamageFieldEffect,
|
'damage-field': DamageFieldEffect,
|
||||||
darkness: LightDarknessEffect,
|
darkness: LightDarknessEffect,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user