add summon effects
This commit is contained in:
parent
d520f8e137
commit
cc14b28d40
@ -59,7 +59,14 @@ import { SmiteEffect } from './smite.js';
|
|||||||
import { SoundSilenceEffect } from './soundSilence.js';
|
import { SoundSilenceEffect } from './soundSilence.js';
|
||||||
import { SpeakLanguageEffect } from './speakLanguage.js';
|
import { SpeakLanguageEffect } from './speakLanguage.js';
|
||||||
import { StunEffect } from './stun.js';
|
import { StunEffect } from './stun.js';
|
||||||
import { SummonAllyEffect } from './summon.js';
|
import {
|
||||||
|
SummonAllyEffect,
|
||||||
|
SummonMonsterEffect,
|
||||||
|
SummonNaturesAllyEffect,
|
||||||
|
SummonPlanarAllyEffect,
|
||||||
|
SummonAnimalEffect,
|
||||||
|
SummonUndeadEffect,
|
||||||
|
} from './summon.js';
|
||||||
import { TelekinesisEffect } from './telekinesis.js';
|
import { TelekinesisEffect } from './telekinesis.js';
|
||||||
import { TeleportEffect } from './teleport.js';
|
import { TeleportEffect } from './teleport.js';
|
||||||
import { TimeStopEffect } from './timeStop.js';
|
import { TimeStopEffect } from './timeStop.js';
|
||||||
@ -149,6 +156,11 @@ const PowerClasses = {
|
|||||||
'speak-language': SpeakLanguageEffect,
|
'speak-language': SpeakLanguageEffect,
|
||||||
stun: StunEffect,
|
stun: StunEffect,
|
||||||
'summon-ally': SummonAllyEffect,
|
'summon-ally': SummonAllyEffect,
|
||||||
|
'summon-animal': SummonAnimalEffect,
|
||||||
|
'summon-monster': SummonMonsterEffect,
|
||||||
|
'summon-natures-ally': SummonNaturesAllyEffect,
|
||||||
|
'summon-planar-ally': SummonPlanarAllyEffect,
|
||||||
|
'summon-undead': SummonUndeadEffect,
|
||||||
telekinesis: TelekinesisEffect,
|
telekinesis: TelekinesisEffect,
|
||||||
teleport: TeleportEffect,
|
teleport: TeleportEffect,
|
||||||
'time-stop': TimeStopEffect,
|
'time-stop': TimeStopEffect,
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
import { moduleName } from '../globals.js';
|
||||||
import { BaseSummonEffect } from './summonSupport.js';
|
import { BaseSummonEffect } from './summonSupport.js';
|
||||||
|
|
||||||
class BaseAllyEffect extends BaseSummonEffect {
|
class BaseAllyEffect extends BaseSummonEffect {
|
||||||
@ -17,6 +18,10 @@ class BaseAllyEffect extends BaseSummonEffect {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isRaisable() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
get summonCount() {
|
get summonCount() {
|
||||||
return 1 + (this?.data?.additionalAllies ?? 0);
|
return 1 + (this?.data?.additionalAllies ?? 0);
|
||||||
}
|
}
|
||||||
@ -33,6 +38,10 @@ class BaseAllyEffect extends BaseSummonEffect {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get commonActorPool() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
get modifiers() {
|
get modifiers() {
|
||||||
const mods = super.modifiers;
|
const mods = super.modifiers;
|
||||||
mods.push({
|
mods.push({
|
||||||
@ -68,12 +77,25 @@ class BaseAllyEffect extends BaseSummonEffect {
|
|||||||
return mods;
|
return mods;
|
||||||
}
|
}
|
||||||
|
|
||||||
actorValue(actor) {
|
prepActors() {
|
||||||
const values = this.values;
|
const actors = super.prepActors();
|
||||||
if (actor.name.toLowerCase() in values) {
|
if (!this.commonActorPool) {
|
||||||
return values[actor.name.toLowerCase()];
|
return actors;
|
||||||
}
|
}
|
||||||
return 0;
|
const newActors = {};
|
||||||
|
for (const key of Object.keys(actors)) {
|
||||||
|
const actor = actors[key];
|
||||||
|
const summon = actor.getFlag(moduleName, 'summonData');
|
||||||
|
if (summon?.powers?.[this.name]) {
|
||||||
|
newActors[key] = actor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return newActors;
|
||||||
|
}
|
||||||
|
|
||||||
|
actorValue(actor) {
|
||||||
|
const summon = actor.getFlag(moduleName, 'summonData');
|
||||||
|
return summon?.cost ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
get powerPoints() {
|
get powerPoints() {
|
||||||
@ -225,10 +247,18 @@ export class SummonAllyEffect extends BaseAllyEffect {
|
|||||||
return `${this.actorFolderBase}/${this.name}`;
|
return `${this.actorFolderBase}/${this.name}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get commonActorPool() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
get icon() {
|
get icon() {
|
||||||
return 'icons/magic/control/silhouette-hold-beam-blue.webp';
|
return 'icons/magic/control/silhouette-hold-beam-blue.webp';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isRaisable() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
actorValue(actor) {
|
actorValue(actor) {
|
||||||
const values = {
|
const values = {
|
||||||
attendant: 1,
|
attendant: 1,
|
||||||
@ -405,3 +435,53 @@ export class SummonAllyEffect extends BaseAllyEffect {
|
|||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class SummonMonsterEffect extends BaseAllyEffect {
|
||||||
|
get name() {
|
||||||
|
return 'Summon Monster';
|
||||||
|
}
|
||||||
|
|
||||||
|
get icon() {
|
||||||
|
return 'icons/magic/symbols/mask-metal-silver-white.webp';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SummonNaturesAllyEffect extends BaseAllyEffect {
|
||||||
|
get name() {
|
||||||
|
return "Summon Nature's Ally";
|
||||||
|
}
|
||||||
|
|
||||||
|
get icon() {
|
||||||
|
return 'icons/magic/symbols/mask-yellow-orange.webp';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SummonAnimalEffect extends BaseAllyEffect {
|
||||||
|
get name() {
|
||||||
|
return 'Summon Animal';
|
||||||
|
}
|
||||||
|
|
||||||
|
get icon() {
|
||||||
|
return 'icons/magic/symbols/mask-yellow-orange.webp';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SummonPlanarAllyEffect extends BaseAllyEffect {
|
||||||
|
get name() {
|
||||||
|
return 'Summon Planar Ally';
|
||||||
|
}
|
||||||
|
|
||||||
|
get icon() {
|
||||||
|
return 'icons/magic/symbols/rune-sigil-horned-blue.webp';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SummonUndeadEffect extends BaseAllyEffect {
|
||||||
|
get name() {
|
||||||
|
return 'Summon Undead';
|
||||||
|
}
|
||||||
|
|
||||||
|
get icon() {
|
||||||
|
return 'icons/magic/death/skeleton-glow-yellow-black.webp';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user