2024-05-16 17:57:51 +02:00
|
|
|
let as = (await fromUuid("Compendium.wfrp4e-core.items.Item.9h82z72XGo9tfgQS")).toObject();
|
|
|
|
let hv = (await fromUuid("Compendium.wfrp4e-core.items.Item.Nj3tC8A5fZ3zEdMR")).toObject();
|
|
|
|
let ms = (await fromUuid("Compendium.wfrp4e-core.items.Item.6w30u0VPsAicrqb5")).toObject();
|
|
|
|
let ss = (await fromUuid("Compendium.wfrp4e-core.items.Item.OEjUvJKi0xmBwbS2")).toObject();
|
|
|
|
|
2024-05-17 12:46:44 +02:00
|
|
|
as.name += " (Vue)";
|
2024-05-16 17:57:51 +02:00
|
|
|
|
|
|
|
let roll = (await new Roll("1d10").roll());
|
|
|
|
roll.toMessage(this.script.getChatData())
|
|
|
|
let items = []
|
|
|
|
|
|
|
|
if (roll.total <= 2)
|
|
|
|
{
|
|
|
|
items = items.concat([as]);
|
|
|
|
}
|
|
|
|
else if (roll.total <= 4)
|
|
|
|
{
|
|
|
|
items = items.concat([hv]);
|
|
|
|
}
|
|
|
|
else if (roll.total <= 6)
|
|
|
|
{
|
|
|
|
items = items.concat([ms]);
|
|
|
|
}
|
|
|
|
else if (roll.total <= 8)
|
|
|
|
{
|
|
|
|
items = items.concat([ss]);
|
|
|
|
}
|
|
|
|
else if (roll.total <= 10)
|
|
|
|
{
|
|
|
|
items = items.concat([as, hv, ms, ss]);
|
|
|
|
}
|
|
|
|
|
|
|
|
this.actor.createEmbeddedDocuments("Item", items, {fromEffect: this.effect.id})
|