Skip to content

Commit

Permalink
Fix when rolling with non-transferred spell effcts
Browse files Browse the repository at this point in the history
  • Loading branch information
moo-man committed Jul 8, 2024
1 parent 39539bc commit 354168e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/item/item-aos.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class AgeOfSigmarItem extends Item {
if (this.archetype) {
// Get the archetype's equipment, find the corresponding object, add to its diff

let list = duplicate(getProperty(this.archetype.data, this.archetypeItemPath))
let list = getProperty(this.archetype.toObject(), this.archetypeItemPath)
let item = list[this.archetypeItemIndex];
mergeObject( // Merge current diff with new diff
item.diff,
Expand Down
2 changes: 1 addition & 1 deletion scripts/item/sheet/item-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class AgeOfSigmarItemSheet extends ItemSheet {

// If this is a temp item with an archetype parent
if (this.item.archetype) {
let list = duplicate(getProperty(this.item.archetype.data, this.item.archetypeItemPath))
let list = getProperty(this.item.archetype.toObject(), this.item.archetypeItemPath);
let item = list[this.item.archetypeItemIndex];
mergeObject(data.data, item.diff, { overwrite: true }) // Merge archetype diff with item data
data.name = item.diff.name || data.item.name
Expand Down
2 changes: 1 addition & 1 deletion scripts/system/tests/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ export default class Test {
_testEffects(item) {
if(!item)
return []
return item.effects.filter(e => !e.data.transfer)
return item.effects.filter(e => !e.transfer)
}

_itemTest(item) {
Expand Down
4 changes: 2 additions & 2 deletions system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "age-of-sigmar-soulbound",
"title": "Warhammer Age of Sigmar: Soulbound",
"description": "The first ever tabletop roleplaying game set in <b>Warhammer Age of Sigmar</b>. Take on the role of the Soulbound, explore and roleplay in the Mortal Realms, filled with gods, monsters, daemons, and demigods, and shape its future. ",
"version": "6.1.1",
"version": "6.1.2",
"minimumCoreVersion" : 11,
"compatibility" : {
"minimum" : 11,
Expand Down Expand Up @@ -57,6 +57,6 @@
"url": "https://github.com/moo-man/AoS-Soulbound-FoundryVTT",
"socket": true,
"manifest": "https://github.com/moo-man/AoS-Soulbound-FoundryVTT/releases/latest/download/system.json",
"download": "https://github.com/moo-man/AoS-Soulbound-FoundryVTT/releases/download/6.1.1/age-of-sigmar-soulbound.zip",
"download": "https://github.com/moo-man/AoS-Soulbound-FoundryVTT/releases/download/6.1.2/age-of-sigmar-soulbound.zip",
"license": "LICENSE.txt"
}

0 comments on commit 354168e

Please sign in to comment.