add deflection
This commit is contained in:
parent
57caeccad2
commit
8c373fcc8b
58
src/module/powers/deflection.js
Normal file
58
src/module/powers/deflection.js
Normal file
@ -0,0 +1,58 @@
|
||||
import { PowerEffect } from './basePowers.js';
|
||||
|
||||
export class DeflectionEffect extends PowerEffect {
|
||||
get name() {
|
||||
return 'Deflection';
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/magic/defensive/shield-barrier-deflect-teal.webp';
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get hasAdditionalRecipients() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get additionalRecipientCost() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
get menuButtons() {
|
||||
const data = [
|
||||
{ label: 'Melee', value: 'melee' },
|
||||
{ label: 'Ranged', value: 'ranged' },
|
||||
{ label: 'Raise (both)', value: 'raise' },
|
||||
{ label: 'Cancel', value: 'cancel' },
|
||||
];
|
||||
return data;
|
||||
}
|
||||
|
||||
async parseValues() {
|
||||
await super.parseValues();
|
||||
this.data.affects = this.data.button === 'raise' ? 'all' : this.data.button;
|
||||
}
|
||||
|
||||
get effectName() {
|
||||
return `Deflection (${this.data.affects})`;
|
||||
}
|
||||
|
||||
get description() {
|
||||
return (
|
||||
super.description +
|
||||
`<p>Attackers subtract -2 from ${this.data.affects}
|
||||
attacks when targeting this creature.</p>`
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -15,63 +15,7 @@ import { ConfusionEffect } from './confusion.js';
|
||||
import { CurseEffect } from './curse.js';
|
||||
import { DamageFieldEffect } from './damageField.js';
|
||||
import { DarksightEffect } from './darksight.js';
|
||||
|
||||
class DeflectionEffect extends PowerEffect {
|
||||
get name() {
|
||||
return 'Deflection';
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/magic/defensive/shield-barrier-deflect-teal.webp';
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return 5;
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get hasAdditionalRecipients() {
|
||||
return true;
|
||||
}
|
||||
|
||||
get additionalRecipientCost() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
get menuButtons() {
|
||||
const data = [
|
||||
{ label: 'Melee', value: 'melee' },
|
||||
{ label: 'Ranged', value: 'vulnerable' },
|
||||
{ label: 'Raise (both)', value: 'raise' },
|
||||
{ label: 'Cancel', value: 'cancel' },
|
||||
];
|
||||
return data;
|
||||
}
|
||||
|
||||
async parseValues() {
|
||||
await super.parseValues();
|
||||
this.data.affects = this.data.button === 'raise' ? 'all' : this.data.button;
|
||||
}
|
||||
|
||||
get effectName() {
|
||||
return `Deflection (${this.data.affects})`;
|
||||
}
|
||||
|
||||
get description() {
|
||||
return (
|
||||
super.description +
|
||||
`<p>Attackers subtract -2 from ${this.data.affects}
|
||||
attacks when targeting this creature.</p>`
|
||||
);
|
||||
}
|
||||
}
|
||||
import { DeflectionEffect } from './deflection.js';
|
||||
|
||||
class DetectConcealArcanaEffect extends PowerEffect {
|
||||
get name() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user