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 usePrimaryEffect() { return false; } 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 createSecondaryEffects(maintId) { const docs = await super.createSecondaryEffects(maintId); const docLabel = 'SWADE.Flying'; const docName = 'Flying'; const doc = await PowerEffect.getStatus(docLabel, docName, false); doc.description = this.description; doc.flags = mergeObject(doc.flags ?? {}, { [moduleName]: { powerEffect: true, maintId, }, }); docs.push(doc); return docs; } get _pace() { return (this.data.raise ? 24 : 12) + (this.data.swift ? 24 : 12); } get description() { let text = super.description; text += `

Target may fly at pace ${this._pace}.

`; return text; } }