From f396636713c8991581c7de80ce7b0efee42c0a0e Mon Sep 17 00:00:00 2001 From: Mike Bloy Date: Sun, 1 Jun 2025 17:26:29 -0500 Subject: [PATCH] summon ally - mirror self fixes --- CHANGELOG.md | 6 ++++++ src/module.json | 26 +++++++++++++++++++++++++- src/module/powers/summon.js | 15 ++++++++++++++- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7956b83..02eed59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [4.0.0] +### Added + +- Added example morphables and summonables actor compendia. + ### Changed - Updated for Foundry v13 @@ -18,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fixed Darksight effect name. +- Summon Ally: Mirror Self improvements - remove changesets and grants from + copied items. ## [3.1.5] 2025-01-27 diff --git a/src/module.json b/src/module.json index 45bffac..4161863 100644 --- a/src/module.json +++ b/src/module.json @@ -65,6 +65,28 @@ "ASSISTANT": "OWNER" } }, + { + "name": "summonable-actors", + "label": "SWADE MB Example Summonable Actors", + "path": "packs/summonable-actors", + "type": "Actor", + "system": "swade", + "ownership": { + "PLAYER": "OBSERVER", + "ASSISTANT": "OWNER" + } + }, + { + "name": "morphable-actors", + "label": "SWADE MB Example Morphable Actors", + "path": "packs/morphable-actors", + "type": "Actor", + "system": "swade", + "ownership": { + "PLAYER": "OBSERVER", + "ASSISTANT": "OWNER" + } + }, { "name": "swade-mb-gear", "label": "SWADE MB Gear", @@ -88,7 +110,9 @@ "helper-macros", "helper-actors", "Common Actions", - "swade-mb-gear" + "swade-mb-gear", + "morphable-actors", + "summonable-actors" ] } ], diff --git a/src/module/powers/summon.js b/src/module/powers/summon.js index d40d5df..a59cb91 100644 --- a/src/module/powers/summon.js +++ b/src/module/powers/summon.js @@ -357,6 +357,13 @@ export class SummonAllyEffect extends BaseAllyEffect { scaleX: this.source.document.texture.scaleX * -1, scaleY: this.source.document.texture.scaleY, }, + ring: { + enabled: this.source.document.ring.enabled, + colors: { + ring: this.source.document.ring.colors.ring, + background: this.source.document.ring.colors.background, + }, + }, }); this.data.mirrorChanges = []; for (const mirrorItem of mirrorActor.items) { @@ -369,7 +376,13 @@ export class SummonAllyEffect extends BaseAllyEffect { if (['weapon', 'armor', 'consumable', 'gear'].includes(mirrorItem.type)) { continue; } - this.data.embeddedUpdates.Item[mirrorItem.name] = await mirrorActor.getEmbeddedDocument('Item', mirrorItem.id); + this.data.embeddedUpdates.Item[mirrorItem.name] = await mirrorActor + .getEmbeddedDocument('Item', mirrorItem.id) + .clone({ + 'system.choiceSets': {}, + 'system.grants': [], + }); + if (mirrorItem.type === 'skill') { this.data.mirrorChanges.push({ key: `@Skill{${mirrorItem.name}}[system.die.sides]`,