Add shape change ability power effect
This commit is contained in:
@@ -52,7 +52,7 @@ import { ReliefEffect } from './relief.js';
|
||||
import { ResurrectionEffect } from './resurrection.js';
|
||||
import { SanctuaryEffect } from './sanctuary.js';
|
||||
import { ScryingEffect } from './scrying.js';
|
||||
import { ShapeChangeEffect } from './shapeChange.js';
|
||||
import { ShapeChangeEffect, ShapeChangeAbilityEffect } from './shapeChange.js';
|
||||
import { SlothSpeedEffect } from './slothSpeed.js';
|
||||
import { SlumberEffect } from './slumber.js';
|
||||
import { SmiteEffect } from './smite.js';
|
||||
@@ -150,6 +150,8 @@ const PowerClasses = {
|
||||
sanctuary: SanctuaryEffect,
|
||||
scrying: ScryingEffect,
|
||||
'shape-change': ShapeChangeEffect,
|
||||
'shape-change-ability': ShapeChangeAbilityEffect,
|
||||
'shape-change-action': ShapeChangeAbilityEffect,
|
||||
shrink: GrowthShrinkEffect,
|
||||
silence: SoundSilenceEffect,
|
||||
slothspeed: SlothSpeedEffect,
|
||||
|
||||
@@ -216,6 +216,37 @@ export class ShapeChangeEffect extends ActorFolderEffect {
|
||||
}
|
||||
}
|
||||
|
||||
export class ShapeChangeAbilityEffect extends ShapeChangeEffect {
|
||||
get name() {
|
||||
return 'Shape Change Ability';
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return 500;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get isRaisable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
actorValue(actor) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
get modifiers() {
|
||||
return super.modifiers.filter((m) => m.id === 'actorId');
|
||||
}
|
||||
|
||||
async parseValues() {
|
||||
this.targets = [this.source];
|
||||
await super.parseValues();
|
||||
}
|
||||
}
|
||||
|
||||
export async function shapeChangeTokenDeleteHandler(token, options, userId) {
|
||||
if (token.flags?.['multilevel-tokens']?.stoken) {
|
||||
// if the deleted token is a dummy token from multilevel-tokens, ignore it
|
||||
|
||||
Reference in New Issue
Block a user