3.0.2 release.
This commit is contained in:
@@ -66,6 +66,8 @@ import {
|
||||
SummonPlanarAllyEffect,
|
||||
SummonAnimalEffect,
|
||||
SummonUndeadEffect,
|
||||
SummonEidolonEffect,
|
||||
SummonCompanionEffect,
|
||||
} from './summon.js';
|
||||
import { TelekinesisEffect } from './telekinesis.js';
|
||||
import { TeleportEffect } from './teleport.js';
|
||||
@@ -77,6 +79,7 @@ import { ZombieEffect } from './zombie.js';
|
||||
import { InquisitorJudgementEffect } from './inquisitor.js';
|
||||
|
||||
const PowerClasses = {
|
||||
'animal-companion': SummonCompanionEffect,
|
||||
'arcane-protection': ArcaneProtectionEffect,
|
||||
'baleful-polymorph': BalefulPolymorphEffect,
|
||||
banish: BanishEffect,
|
||||
@@ -90,6 +93,7 @@ const PowerClasses = {
|
||||
'boost-trait': BoostLowerTraitEffect,
|
||||
burrow: BurrowEffect,
|
||||
burst: BurstEffect,
|
||||
companion: SummonCompanionEffect,
|
||||
'conceal-arcana': DetectConcealArcanaEffect,
|
||||
confusion: ConfusionEffect,
|
||||
'conjure-item': ConjureItemEffect,
|
||||
@@ -106,6 +110,7 @@ const PowerClasses = {
|
||||
dispel: DispelEffect,
|
||||
divination: DivinationEffect,
|
||||
'drain-power-points': DrainPowerPointsEffect,
|
||||
eidolon: SummonEidolonEffect,
|
||||
'elemental-manipulation': ElementalManipulationEffect,
|
||||
empathy: EmpathyEffect,
|
||||
entangle: EntangleEffect,
|
||||
@@ -158,6 +163,8 @@ const PowerClasses = {
|
||||
sound: SoundSilenceEffect,
|
||||
'speak-language': SpeakLanguageEffect,
|
||||
stun: StunEffect,
|
||||
summoner: SummonEidolonEffect,
|
||||
'summon-eidolon': SummonEidolonEffect,
|
||||
'summon-ally': SummonAllyEffect,
|
||||
'summon-animal': SummonAnimalEffect,
|
||||
'summon-monster': SummonMonsterEffect,
|
||||
|
||||
@@ -12,7 +12,7 @@ export class ShapeChangeEffect extends ActorFolderEffect {
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return this.data.duration ? 50 : 5;
|
||||
return (this.data.duration ? 50 : 5) * (this.data.wildShape ? 2 : 1);
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
@@ -55,16 +55,27 @@ export class ShapeChangeEffect extends ActorFolderEffect {
|
||||
}
|
||||
|
||||
get modifiers() {
|
||||
const wildShape = !!this.source.actor.items.find((i) => i.type === 'edge' && i.system.swid === 'wild-shape');
|
||||
return [
|
||||
...super.modifiers,
|
||||
{
|
||||
name: 'Duration',
|
||||
type: 'checkbox',
|
||||
value: 1,
|
||||
default: false,
|
||||
id: 'duration',
|
||||
epic: false,
|
||||
effect: false,
|
||||
},
|
||||
{
|
||||
name: 'Wild Shape (Druid)',
|
||||
type: 'checkbox',
|
||||
value: 0,
|
||||
default: wildShape,
|
||||
id: 'wildShape',
|
||||
epic: false,
|
||||
effect: false,
|
||||
},
|
||||
{
|
||||
name: 'Transform Other?',
|
||||
type: 'select',
|
||||
@@ -206,6 +217,10 @@ export class ShapeChangeEffect extends ActorFolderEffect {
|
||||
}
|
||||
|
||||
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
|
||||
return;
|
||||
}
|
||||
log('TOKEN DELETED |', token, options, userId);
|
||||
const sourceInfo = token.getFlag(moduleName, 'shapeChange');
|
||||
if (!sourceInfo?.srcTokenId) {
|
||||
|
||||
@@ -485,3 +485,47 @@ export class SummonUndeadEffect extends BaseAllyEffect {
|
||||
return 'icons/magic/death/skeleton-glow-yellow-black.webp';
|
||||
}
|
||||
}
|
||||
|
||||
export class SummonEidolonEffect extends BaseSummonEffect {
|
||||
get name() {
|
||||
return 'Eidolon';
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/environment/creatures/monster-barbed-carapace-purple.webp';
|
||||
}
|
||||
|
||||
get basePowerPoints() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
get duration() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
get isTargeted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get isRaisable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
get summonCount() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
get modifiers() {
|
||||
return super.modifiers.filter((m) => m.id === 'actorId');
|
||||
}
|
||||
}
|
||||
|
||||
export class SummonCompanionEffect extends SummonEidolonEffect {
|
||||
get name() {
|
||||
return 'Companion';
|
||||
}
|
||||
|
||||
get icon() {
|
||||
return 'icons/creatures/mammals/dog-husky-white-blue.webp';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user