Minor fixes

This commit is contained in:
2022-09-28 20:36:54 +02:00
parent f08ec8eaff
commit da6d6584c4
3 changed files with 15 additions and 5 deletions

View File

@@ -412,6 +412,11 @@ export class MournbladeActor extends Actor {
/* -------------------------------------------- */
async rollRune(runeId) {
let comp = this.items.find(comp => comp.type == "competence" && comp.name.toLowerCase() == "savoir : runes")
if ( !comp) {
ui.notifications.warn("La compétence Savoirs : Runes n'a pas été trouvée, abandon.")
return
}
let rollData = this.getCommonRollData("cla", undefined, "Savoir : Runes")
rollData.rune = duplicate(this.items.get(runeId) || {})
rollData.difficulte = rollData.rune?.system?.seuil || 0