3.0.2 release.

This commit is contained in:
Mike Bloy 2024-06-24 21:28:15 -05:00
parent 8e206d1180
commit 65d8ec2d39
17 changed files with 224 additions and 31 deletions

View File

@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [3.0.2] 2024-06-24
### Fixed
- Fixed bug in which effects would disappear on the target's next turn
### Added
- Eidolon summon effect and helper action
- Companion "summon" effect and helper action
## [3.0.1] 2024-06-18 ## [3.0.1] 2024-06-18
### Added ### Added

View File

@ -8,7 +8,7 @@
} }
], ],
"url": "https://git.bloy.org/foundryvtt/swade-mb-helpers", "url": "https://git.bloy.org/foundryvtt/swade-mb-helpers",
"version": "3.0.1", "version": "3.0.2",
"compatibility": { "compatibility": {
"minimum": "11", "minimum": "11",
"verified": "11" "verified": "11"

View File

@ -66,6 +66,8 @@ import {
SummonPlanarAllyEffect, SummonPlanarAllyEffect,
SummonAnimalEffect, SummonAnimalEffect,
SummonUndeadEffect, SummonUndeadEffect,
SummonEidolonEffect,
SummonCompanionEffect,
} from './summon.js'; } from './summon.js';
import { TelekinesisEffect } from './telekinesis.js'; import { TelekinesisEffect } from './telekinesis.js';
import { TeleportEffect } from './teleport.js'; import { TeleportEffect } from './teleport.js';
@ -77,6 +79,7 @@ import { ZombieEffect } from './zombie.js';
import { InquisitorJudgementEffect } from './inquisitor.js'; import { InquisitorJudgementEffect } from './inquisitor.js';
const PowerClasses = { const PowerClasses = {
'animal-companion': SummonCompanionEffect,
'arcane-protection': ArcaneProtectionEffect, 'arcane-protection': ArcaneProtectionEffect,
'baleful-polymorph': BalefulPolymorphEffect, 'baleful-polymorph': BalefulPolymorphEffect,
banish: BanishEffect, banish: BanishEffect,
@ -90,6 +93,7 @@ const PowerClasses = {
'boost-trait': BoostLowerTraitEffect, 'boost-trait': BoostLowerTraitEffect,
burrow: BurrowEffect, burrow: BurrowEffect,
burst: BurstEffect, burst: BurstEffect,
companion: SummonCompanionEffect,
'conceal-arcana': DetectConcealArcanaEffect, 'conceal-arcana': DetectConcealArcanaEffect,
confusion: ConfusionEffect, confusion: ConfusionEffect,
'conjure-item': ConjureItemEffect, 'conjure-item': ConjureItemEffect,
@ -106,6 +110,7 @@ const PowerClasses = {
dispel: DispelEffect, dispel: DispelEffect,
divination: DivinationEffect, divination: DivinationEffect,
'drain-power-points': DrainPowerPointsEffect, 'drain-power-points': DrainPowerPointsEffect,
eidolon: SummonEidolonEffect,
'elemental-manipulation': ElementalManipulationEffect, 'elemental-manipulation': ElementalManipulationEffect,
empathy: EmpathyEffect, empathy: EmpathyEffect,
entangle: EntangleEffect, entangle: EntangleEffect,
@ -158,6 +163,8 @@ const PowerClasses = {
sound: SoundSilenceEffect, sound: SoundSilenceEffect,
'speak-language': SpeakLanguageEffect, 'speak-language': SpeakLanguageEffect,
stun: StunEffect, stun: StunEffect,
summoner: SummonEidolonEffect,
'summon-eidolon': SummonEidolonEffect,
'summon-ally': SummonAllyEffect, 'summon-ally': SummonAllyEffect,
'summon-animal': SummonAnimalEffect, 'summon-animal': SummonAnimalEffect,
'summon-monster': SummonMonsterEffect, 'summon-monster': SummonMonsterEffect,

View File

@ -12,7 +12,7 @@ export class ShapeChangeEffect extends ActorFolderEffect {
} }
get duration() { get duration() {
return this.data.duration ? 50 : 5; return (this.data.duration ? 50 : 5) * (this.data.wildShape ? 2 : 1);
} }
get isTargeted() { get isTargeted() {
@ -55,16 +55,27 @@ export class ShapeChangeEffect extends ActorFolderEffect {
} }
get modifiers() { get modifiers() {
const wildShape = !!this.source.actor.items.find((i) => i.type === 'edge' && i.system.swid === 'wild-shape');
return [ return [
...super.modifiers, ...super.modifiers,
{ {
name: 'Duration', name: 'Duration',
type: 'checkbox', type: 'checkbox',
value: 1, value: 1,
default: false,
id: 'duration', id: 'duration',
epic: false, epic: false,
effect: false, effect: false,
}, },
{
name: 'Wild Shape (Druid)',
type: 'checkbox',
value: 0,
default: wildShape,
id: 'wildShape',
epic: false,
effect: false,
},
{ {
name: 'Transform Other?', name: 'Transform Other?',
type: 'select', type: 'select',
@ -206,6 +217,10 @@ export class ShapeChangeEffect extends ActorFolderEffect {
} }
export async function shapeChangeTokenDeleteHandler(token, options, userId) { 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); log('TOKEN DELETED |', token, options, userId);
const sourceInfo = token.getFlag(moduleName, 'shapeChange'); const sourceInfo = token.getFlag(moduleName, 'shapeChange');
if (!sourceInfo?.srcTokenId) { if (!sourceInfo?.srcTokenId) {

View File

@ -485,3 +485,47 @@ export class SummonUndeadEffect extends BaseAllyEffect {
return 'icons/magic/death/skeleton-glow-yellow-black.webp'; 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';
}
}

Binary file not shown.

View File

@ -1,5 +1,5 @@
2024/06/18-10:41:57.594700 7526dca00640 Delete type=3 #1 2024/06/24-21:25:51.691281 7f0ee1fbd700 Delete type=3 #1
2024/06/18-10:41:57.597427 7526db000640 Level-0 table #5: started 2024/06/24-21:25:51.693418 7f0ee0fbb700 Level-0 table #5: started
2024/06/18-10:41:57.598484 7526db000640 Level-0 table #5: 17134 bytes OK 2024/06/24-21:25:51.696862 7f0ee0fbb700 Level-0 table #5: 18330 bytes OK
2024/06/18-10:41:57.599441 7526db000640 Delete type=0 #3 2024/06/24-21:25:51.700171 7f0ee0fbb700 Delete type=0 #3
2024/06/18-10:41:57.599672 7526db000640 Manual compaction at level-0 from '!folders!0nDRFmMBs5DBJU9M' @ 72057594037927935 : 1 .. '!items.effects!RC1Nz6iph8wPPK1B.g9W5hJisq3MsCpZW' @ 0 : 0; will stop at (end) 2024/06/24-21:25:51.700246 7f0ee0fbb700 Manual compaction at level-0 from '!folders!0nDRFmMBs5DBJU9M' @ 72057594037927935 : 1 .. '!items.effects!RC1Nz6iph8wPPK1B.g9W5hJisq3MsCpZW' @ 0 : 0; will stop at (end)

View File

@ -1,5 +1,5 @@
2024/06/18-10:41:57.680100 70f947600640 Delete type=3 #1 2024/06/24-21:25:51.813834 7fd3f8fbd700 Delete type=3 #1
2024/06/18-10:41:57.682228 70f946c00640 Level-0 table #5: started 2024/06/24-21:25:51.816127 7fd3f7d40700 Level-0 table #5: started
2024/06/18-10:41:57.683460 70f946c00640 Level-0 table #5: 6787 bytes OK 2024/06/24-21:25:51.819760 7fd3f7d40700 Level-0 table #5: 6787 bytes OK
2024/06/18-10:41:57.684707 70f946c00640 Delete type=0 #3 2024/06/24-21:25:51.827595 7fd3f7d40700 Delete type=0 #3
2024/06/18-10:41:57.684956 70f946c00640 Manual compaction at level-0 from '!items!JWyBQe4tnOYljFAF' @ 72057594037927935 : 1 .. '!items!tWWSfEMmLmws6Yb1' @ 0 : 0; will stop at (end) 2024/06/24-21:25:51.827676 7fd3f7d40700 Manual compaction at level-0 from '!items!JWyBQe4tnOYljFAF' @ 72057594037927935 : 1 .. '!items!tWWSfEMmLmws6Yb1' @ 0 : 0; will stop at (end)

View File

@ -1,5 +1,5 @@
2024/06/18-10:41:57.762408 7f3ebe800640 Delete type=3 #1 2024/06/24-21:25:51.937578 7f0e72fbe700 Delete type=3 #1
2024/06/18-10:41:57.765316 7f3ebd800640 Level-0 table #5: started 2024/06/24-21:25:51.939623 7f0e71540700 Level-0 table #5: started
2024/06/18-10:41:57.766837 7f3ebd800640 Level-0 table #5: 1751 bytes OK 2024/06/24-21:25:51.943112 7f0e71540700 Level-0 table #5: 1751 bytes OK
2024/06/18-10:41:57.768732 7f3ebd800640 Delete type=0 #3 2024/06/24-21:25:51.946116 7f0e71540700 Delete type=0 #3
2024/06/18-10:41:57.769025 7f3ebd800640 Manual compaction at level-0 from '!actors!U5v4gFHquo0Y1SAq' @ 72057594037927935 : 1 .. '!actors!U5v4gFHquo0Y1SAq' @ 0 : 0; will stop at (end) 2024/06/24-21:25:51.946188 7f0e71540700 Manual compaction at level-0 from '!actors!U5v4gFHquo0Y1SAq' @ 72057594037927935 : 1 .. '!actors!U5v4gFHquo0Y1SAq' @ 0 : 0; will stop at (end)

View File

@ -1,5 +1,5 @@
2024/06/18-10:41:57.843986 725194a00640 Delete type=3 #1 2024/06/24-21:25:52.063889 7f3526ffd700 Delete type=3 #1
2024/06/18-10:41:57.846307 72518f800640 Level-0 table #5: started 2024/06/24-21:25:52.066002 7f35267fc700 Level-0 table #5: started
2024/06/18-10:41:57.847516 72518f800640 Level-0 table #5: 20105 bytes OK 2024/06/24-21:25:52.069526 7f35267fc700 Level-0 table #5: 20105 bytes OK
2024/06/18-10:41:57.848771 72518f800640 Delete type=0 #3 2024/06/24-21:25:52.072473 7f35267fc700 Delete type=0 #3
2024/06/18-10:41:57.848911 72518f800640 Manual compaction at level-0 from '!folders!8FWN37c0gcpAisAv' @ 72057594037927935 : 1 .. '!macros!ypFtlnrgQkzqLpxI' @ 0 : 0; will stop at (end) 2024/06/24-21:25:52.072548 7f35267fc700 Manual compaction at level-0 from '!folders!8FWN37c0gcpAisAv' @ 72057594037927935 : 1 .. '!macros!ypFtlnrgQkzqLpxI' @ 0 : 0; will stop at (end)

Binary file not shown.

View File

@ -1,5 +1,5 @@
2024/06/18-10:41:57.926511 710681e00640 Delete type=3 #1 2024/06/24-21:25:52.185506 7f4b3a7bd700 Delete type=3 #1
2024/06/18-10:41:57.929373 710680a00640 Level-0 table #5: started 2024/06/24-21:25:52.187614 7f4b397bb700 Level-0 table #5: started
2024/06/18-10:41:57.930861 710680a00640 Level-0 table #5: 20877 bytes OK 2024/06/24-21:25:52.190994 7f4b397bb700 Level-0 table #5: 21157 bytes OK
2024/06/18-10:41:57.932097 710680a00640 Delete type=0 #3 2024/06/24-21:25:52.194054 7f4b397bb700 Delete type=0 #3
2024/06/18-10:41:57.932311 710680a00640 Manual compaction at level-0 from '!journal!HbtPlHNFO1L6RVj0' @ 72057594037927935 : 1 .. '!journal.pages!w4TImRTAiNiqDWeL.vQhO6BVdKZOubTUQ' @ 0 : 0; will stop at (end) 2024/06/24-21:25:52.194144 7f4b397bb700 Manual compaction at level-0 from '!journal!HbtPlHNFO1L6RVj0' @ 72057594037927935 : 1 .. '!journal.pages!w4TImRTAiNiqDWeL.vQhO6BVdKZOubTUQ' @ 0 : 0; will stop at (end)

View File

@ -0,0 +1,58 @@
{
"name": "Companion",
"type": "action",
"folder": "rXqlP1phfPHNZrRT",
"_id": "WfqlcSZ7OPaa7lR2",
"img": "icons/creatures/mammals/dog-husky-white-blue.webp",
"system": {
"description": "<p>Animal Companions, guard dogs, familiars, etc</p>",
"notes": "",
"source": "",
"swid": "companion",
"additionalStats": {},
"favorite": false,
"category": "Savage Pathfinder",
"templates": {
"cone": false,
"stream": false,
"small": false,
"medium": false,
"large": false
},
"actions": {
"trait": "",
"traitMod": "",
"dmgMod": "",
"additional": {
"E4Pbzvi0": {
"name": "Place Companion",
"type": "macro",
"dice": null,
"resourcesUsed": null,
"modifier": "",
"override": "",
"uuid": "Compendium.swade-mb-helpers.helper-macros.Macro.AjuA11hQ48UJNwlH",
"macroActor": "self",
"isHeavyWeapon": false
}
}
},
"choiceSets": []
},
"effects": [],
"sort": 0,
"ownership": {
"default": 0,
"sVoCvBU1knmXzoYe": 3
},
"flags": {},
"_stats": {
"systemId": "swade",
"systemVersion": "3.4.1",
"coreVersion": "11.315",
"createdTime": 1719281390401,
"modifiedTime": 1719281480747,
"lastModifiedBy": "sVoCvBU1knmXzoYe"
},
"_key": "!items!WfqlcSZ7OPaa7lR2"
}

View File

@ -0,0 +1,58 @@
{
"name": "Eidolon",
"type": "action",
"folder": "rXqlP1phfPHNZrRT",
"_id": "jlcWxKDqboK2xLzV",
"img": "icons/environment/creatures/monster-barbed-carapace-purple.webp",
"system": {
"description": "",
"notes": "",
"source": "",
"swid": "eidolon",
"additionalStats": {},
"favorite": false,
"category": "Savage Pathfinder (Summoner)",
"templates": {
"cone": false,
"stream": false,
"small": false,
"medium": false,
"large": false
},
"actions": {
"trait": "",
"traitMod": "",
"dmgMod": "",
"additional": {
"E4Pbzvi0": {
"name": "Summon Eidolon",
"type": "macro",
"dice": null,
"resourcesUsed": null,
"modifier": "",
"override": "",
"uuid": "Compendium.swade-mb-helpers.helper-macros.Macro.AjuA11hQ48UJNwlH",
"macroActor": "self",
"isHeavyWeapon": false
}
}
},
"choiceSets": []
},
"effects": [],
"sort": 0,
"ownership": {
"default": 0,
"sVoCvBU1knmXzoYe": 3
},
"flags": {},
"_stats": {
"systemId": "swade",
"systemVersion": "3.4.1",
"coreVersion": "11.315",
"createdTime": 1719281279098,
"modifiedTime": 1719281348612,
"lastModifiedBy": "sVoCvBU1knmXzoYe"
},
"_key": "!items!jlcWxKDqboK2xLzV"
}

File diff suppressed because one or more lines are too long