foundryvtt-wh4-lang-fr-fr/scripts/ebDQH0MdGAG02CHl.js

14 lines
473 B
JavaScript
Raw Normal View History

2024-05-16 17:57:51 +02:00
let item = await fromUuid("Compendium.wfrp4e-core.items.SYjWiKDzMS6CtROJ")
let data = item.toObject();
data.system.location.key = this.item.system.location.key
if (this.item.system.location.key == "rArm")
{
data.system.location.value = "Main Droite"
2024-05-16 17:57:51 +02:00
data.system.location.key = "rHand"
}
else if (this.item.system.location.key == "lArm")
{
data.system.location.value = "Main Gauche"
2024-05-16 17:57:51 +02:00
data.system.location.key = "lHand"
}
this.actor.createEmbeddedDocuments("Item", [data])