summon with a raise
This commit is contained in:
parent
19c1e697db
commit
dd9390f15f
@ -589,6 +589,8 @@ class SummonEffect extends PowerEffect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.summonableActors = actors
|
||||||
|
|
||||||
this.menuData.inputs.push({
|
this.menuData.inputs.push({
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: 'Creature to summon',
|
label: 'Creature to summon',
|
||||||
@ -627,8 +629,16 @@ class SummonEffect extends PowerEffect {
|
|||||||
actorLink: false,
|
actorLink: false,
|
||||||
name: `${this.token.name}'s ${this.protoDoc.name}`
|
name: `${this.token.name}'s ${this.protoDoc.name}`
|
||||||
},
|
},
|
||||||
embedded: { ActiveEffect: {} }
|
embedded: { ActiveEffect: {}, Item: {} }
|
||||||
}
|
}
|
||||||
|
if (this.raise && ('raise_template' in this.summonableActors)) {
|
||||||
|
const raiseTemplate = this.summonableActors.raise_template
|
||||||
|
for (const item of raiseTemplate.items) {
|
||||||
|
const raiseItemDoc = await raiseTemplate.getEmbeddedDocument('Item', item.id)
|
||||||
|
this.spawnMutation.embedded.Item[item.name] = raiseItemDoc
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (const effectDocument of this.effectDocs) {
|
for (const effectDocument of this.effectDocs) {
|
||||||
this.spawnMutation.embedded.ActiveEffect[effectDocument.name] = effectDocument
|
this.spawnMutation.embedded.ActiveEffect[effectDocument.name] = effectDocument
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user