Add all systems effects scripts
This commit is contained in:
14
scripts/PeZYj8b0vedyJj00.js
Normal file
14
scripts/PeZYj8b0vedyJj00.js
Normal file
@ -0,0 +1,14 @@
|
||||
// This script needs to be separate because equipTransfer is off on the other effect, and thus won't execute when added to an actor
|
||||
|
||||
let mainEffect = this.item.effects.contents[0];
|
||||
if (mainEffect.name.includes("(Lore)"))
|
||||
{
|
||||
let choice = await ItemDialog.create(ItemDialog.objectToArray(game.wfrp4e.config.magicLores, this.item.img), 1, "Choose Lore");
|
||||
if (choice.length)
|
||||
{
|
||||
mainEffect.update({name : mainEffect.name.replace("Lore", choice[0].name)})
|
||||
this.item.update({name : this.item.name += ` (${choice[0].name})`})
|
||||
}
|
||||
}
|
||||
|
||||
this.effect.delete();
|
Reference in New Issue
Block a user