This commit is contained in:
Mike Bloy 2024-05-19 23:49:01 -05:00
parent c76ce1ff7c
commit 0d74ae787d
3 changed files with 82 additions and 0 deletions

View File

@ -5,6 +5,10 @@ export class ArcaneProtectionEffect extends PowerEffect {
return 'Arcane Protection'; return 'Arcane Protection';
} }
get basePowerPoints() {
return 1;
}
get duration() { get duration() {
return 5; return 5;
} }

76
src/module/powers/fly.js Normal file
View File

@ -0,0 +1,76 @@
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 += `<p>Target may fly at pace ${this._pace}.</p>`;
return text;
}
}

View File

@ -27,6 +27,7 @@ import { EntangleEffect } from './entangle.js';
import { EnvironmentalProtectionEffect } from './environmentalProtection.js'; import { EnvironmentalProtectionEffect } from './environmentalProtection.js';
import { FarsightEffect } from './farsight.js'; import { FarsightEffect } from './farsight.js';
import { FearEffect } from './fear.js'; import { FearEffect } from './fear.js';
import { FlyEffect } from './fly.js';
const PowerClasses = { const PowerClasses = {
'arcane-protection': ArcaneProtectionEffect, 'arcane-protection': ArcaneProtectionEffect,
@ -61,6 +62,7 @@ const PowerClasses = {
'environmental-protection': EnvironmentalProtectionEffect, 'environmental-protection': EnvironmentalProtectionEffect,
farsight: FarsightEffect, farsight: FarsightEffect,
fear: FearEffect, fear: FearEffect,
fly: FlyEffect,
'lower-trait': BoostLowerTraitEffect, 'lower-trait': BoostLowerTraitEffect,
}; };