Neuanfang mit französischem Modul

This commit is contained in:
2025-05-05 23:25:00 +02:00
parent cf24ef97df
commit 3f74b8dfdd
3135 changed files with 38383 additions and 93206 deletions
-30
View File
@@ -1,30 +0,0 @@
let hasMagazine = await Dialog.confirm({content: "<p>Does the vessel have a magazine or any other kind of store for blackpowder?</p>"});
if (!hasMagazine) return;
let roll = new Roll("d10");
await roll.evaluate();
// await roll.toMessage();
let anchor = roll.toAnchor();
let crits = [];
for (let i = 0; i < roll.total; i++) {
let result = await WFRP_Tables.rollTable('crithull');
let collection = game.packs.get(result.object.documentCollection)
if (collection)
await collection.getDocuments()
if (!collection)
collection = game.items;
let item = collection.get(result.object.documentId)
if (item)
crits.push(item);
}
const items = await this.actor.createEmbeddedDocuments("Item", crits);
const speaker = ChatMessage.getSpeaker({actor: this.actor});
const uuids = items.map(i => `@UUID[${i.uuid}]`);
this.script.scriptMessage(`<p><b>${this.item.name}</b> caused an additional ${anchor.outerHTML} Critical Hits to the Hull!</p><ul><li>${uuids.join('<li>')}</ul>`)