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
-32
View File
@@ -1,32 +0,0 @@
let spells = await warhammer.utility.findAllItems("spell", "Loading Spells")
let lore = (await game.wfrp4e.tables.rollTable("random-caster", {hideDSN: true})).text
this.script.scriptNotification(lore)
if (lore == "GM's Choice") {
return
}
else if (lore == "Arcane Magic") {
lore = "Arcane"
}
else if (lore == "Petty Magic") {
lore = "petty"
}
else {
lore = lore.toLowerCase();
}
let spellsWithLore = []
if (lore == "Arcane") {
spellsWithLore = spells.filter(i => !i.system.lore.value)
}
else {
spellsWithLore = spells.filter(i => i.system.lore.value == lore)
}
let selectedSpell = spellsWithLore[Math.floor(CONFIG.Dice.randomUniform() * spellsWithLore.length)]
Item.implementation.create(selectedSpell.toObject(), { parent: this.actor}).then(item => {
this.actor.setupCast(item).then(test => test.roll());
})