From a8ba0a64c09a70e2a7700e2bdac71b3e04ab3770 Mon Sep 17 00:00:00 2001 From: Mike Bloy Date: Tue, 7 Nov 2023 23:28:55 -0600 Subject: [PATCH] update to support swids --- scripts/powerEffects.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/powerEffects.js b/scripts/powerEffects.js index da38a49..96e4ca9 100644 --- a/scripts/powerEffects.js +++ b/scripts/powerEffects.js @@ -1328,36 +1328,51 @@ class SummonUndeadEffect extends SummonEffect { const PowerClasses = { 'arcane protection': ArcaneProtectionEffect, + 'arcane-protection': ArcaneProtectionEffect, blast: BlastEffect, blind: BlindEffect, bolt: BoltEffect, 'boost/lower trait': BoostLowerTraitEffect, + 'boostlower-trait': BoostLowerTraitEffect, 'boost trait': BoostLowerTraitEffect, + 'boost-trait': BoostLowerTraitEffect, burrow: BurrowEffect, burst: BurstEffect, 'conceal arcana': DetectConcealArcanaEffect, + 'conceal-arcana': DetectConcealArcanaEffect, confusion: ConfusionEffect, darksight: DarksightEffect, deflection: DeflectionEffect, 'detect arcana': DetectConcealArcanaEffect, + 'detect-arcana': DetectConcealArcanaEffect, 'detect/conceal aracana': DetectConcealArcanaEffect, + 'detectconceal-aracana': DetectConcealArcanaEffect, disguise: DisguiseEffect, entangle: EntangleEffect, intangibility: IntangibilityEffect, invisibility: InvisibilityEffect, 'lower trait': BoostLowerTraitEffect, + 'lower-trait': BoostLowerTraitEffect, protection: ProtectionEffect, 'shape change': ShapeChangeEffect, + 'shape-change': ShapeChangeEffect, sloth: SlothSpeedEffect, 'sloth/speed': SlothSpeedEffect, + slothspeed: SlothSpeedEffect, smite: SmiteEffect, speed: SlothSpeedEffect, 'summon ally': SummonAllyEffect, + 'summon-ally': SummonAllyEffect, 'summon animal': SummonAnimalEffect, + 'summon-animal': SummonAnimalEffect, 'summon monster': SummonMonsterEffect, + 'summon-monster': SummonMonsterEffect, "summon nature's ally": SummonNaturesAllyEffect, + 'summon-natures-ally': SummonNaturesAllyEffect, 'summon planar ally': SummonPlanarAllyEffect, + 'summon-planar-ally': SummonPlanarAllyEffect, 'summon undead': SummonUndeadEffect, + 'summon-undead': SummonUndeadEffect, zombie: SummonUndeadEffect } @@ -1370,7 +1385,7 @@ export async function powerEffects (options = {}) { const targets = 'targets' in options ? Array.from(options.targets) : [] const item = 'item' in options ? options.item : null - const name = 'name' in options ? options.name : (item !== null ? item.name : null) + const name = options?.name || item?.system?.swid || item?.name || null const lcName = name.toLowerCase() for (const name in PowerClasses) {