71 lines
1.4 KiB
JavaScript
71 lines
1.4 KiB
JavaScript
import { moduleName } from '../globals.js';
|
|
import { PowerEffect } from './basePowers.js';
|
|
|
|
export class FlyEffect extends PowerEffect {
|
|
get name() {
|
|
return 'Fly';
|
|
}
|
|
|
|
get duration() {
|
|
return 5;
|
|
}
|
|
|
|
get basePowerPoints() {
|
|
return 3;
|
|
}
|
|
|
|
get icon() {
|
|
return 'icons/creatures/birds/songbird-yellow-flying.webp';
|
|
}
|
|
|
|
get hasAdditionalRecipients() {
|
|
return true;
|
|
}
|
|
|
|
get additionalRecipientCost() {
|
|
return 2;
|
|
}
|
|
|
|
get isTargeted() {
|
|
return true;
|
|
}
|
|
|
|
get modifiers() {
|
|
const mods = super.modifiers;
|
|
mods.push({
|
|
name: 'Swift Flight',
|
|
id: 'swift',
|
|
value: 2,
|
|
type: 'checkbox',
|
|
default: false,
|
|
epic: false,
|
|
effect: false,
|
|
});
|
|
return mods;
|
|
}
|
|
|
|
async parseValues() {
|
|
await super.parseValues();
|
|
const docLabel = 'SWADE.Flying';
|
|
const docName = 'Flying';
|
|
const doc = await PowerEffect.getStatus(docLabel, docName, false);
|
|
doc.description = `<p>From <strong>${this.source.name}</strong> casting <em>${this.name}</em></p>`;
|
|
doc.flags = foundry.utils.mergeObject(doc.flags ?? {}, { [moduleName]: { powerEffect: true } });
|
|
this.baseEffectDoc = doc;
|
|
}
|
|
|
|
get basePrimaryEffect() {
|
|
return this.baseEffectDoc;
|
|
}
|
|
|
|
get _pace() {
|
|
return (this.data.raise ? 24 : 12) + (this.data.swift ? 24 : 12);
|
|
}
|
|
|
|
get description() {
|
|
let text = super.description;
|
|
text += `<p>Target may fly at pace ${this._pace}.</p>`;
|
|
return text;
|
|
}
|
|
}
|