add martial flexibility
This commit is contained in:
parent
557cb6e546
commit
5111bd830c
@ -71,7 +71,7 @@ import { TelekinesisEffect } from './telekinesis.js';
|
||||
import { TeleportEffect } from './teleport.js';
|
||||
import { TimeStopEffect } from './timeStop.js';
|
||||
import { WallWalkerEffect } from './wallWalker.js';
|
||||
import { WarriorsGiftEffect } from './warriorsGift.js';
|
||||
import { MartialFlexibilityEffect, WarriorsGiftEffect } from './warriorsGift.js';
|
||||
import { WishEffect } from './wish.js';
|
||||
import { ZombieEffect } from './zombie.js';
|
||||
|
||||
@ -129,6 +129,7 @@ const PowerClasses = {
|
||||
'lock-unlock': LockUnlockEffect,
|
||||
'lower-trait': BoostLowerTraitEffect,
|
||||
'magic-jar': MagicJarEffect,
|
||||
'martial-flexibility': MartialFlexibilityEffect,
|
||||
'mind-link': MindLinkEffect,
|
||||
'mind-reading': MindReadingEffect,
|
||||
'mind-wipe': MindWipeEffect,
|
||||
|
||||
@ -113,7 +113,7 @@ export class WarriorsGiftEffect extends PowerEffect {
|
||||
async sideEffects() {
|
||||
await super.sideEffects();
|
||||
const candidateEdges = [this.data.appliedEdge];
|
||||
if (this.data.powerEdge) {
|
||||
if (this.data.powerEdge !== 'none') {
|
||||
candidateEdges.push(this.data.powerEdge);
|
||||
}
|
||||
for (const target of this.targets) {
|
||||
@ -135,3 +135,75 @@ export class WarriorsGiftEffect extends PowerEffect {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class MartialFlexibilityEffect extends WarriorsGiftEffect {
|
||||
constructor(...args) {
|
||||
super(...args);
|
||||
this.targets = [this.source];
|
||||
}
|
||||
|
||||
get name() {
|
||||
return 'Martial Flexibility';
|
||||
}
|
||||
|
||||
get hasAdditionalRecipients() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get isRaisable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get usePrimaryEffect() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get modifiers() {
|
||||
const mods = [];
|
||||
const choices = {};
|
||||
const powerChoices = {};
|
||||
const effects = {};
|
||||
const powerValues = {};
|
||||
const values = {};
|
||||
for (const edge of this.edges) {
|
||||
powerChoices[edge.id] = edge.name;
|
||||
choices[edge.id] = edge.name;
|
||||
powerValues[edge.id] = 4;
|
||||
values[edge.id] = 0;
|
||||
effects[edge.id] = null;
|
||||
}
|
||||
powerChoices.none = 'None';
|
||||
powerValues.none = 0;
|
||||
effects.none = null;
|
||||
mods.push({
|
||||
sortOrder: -1,
|
||||
name: 'Edge',
|
||||
type: 'select',
|
||||
id: 'edge',
|
||||
epic: false,
|
||||
choices,
|
||||
values,
|
||||
effects,
|
||||
});
|
||||
return mods;
|
||||
}
|
||||
|
||||
async parseValues() {
|
||||
await super.parseValues();
|
||||
this.data.powerEdge = 'none';
|
||||
}
|
||||
|
||||
async createMaintainEffect(maintId) {
|
||||
const doc = await super.createMaintainEffect(maintId);
|
||||
doc.flags[moduleName].attachedItems = true;
|
||||
return doc;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user