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 = `

From ${this.source.name} casting ${this.name}

`; 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 += `

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

`; return text; } }