Minor fixes

This commit is contained in:
sladecraven 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

View File

@ -281,10 +281,11 @@ export class MournbladeUtility {
}
}
//console.log("Result : ", rollData)
if (rollData.difficulte > 0 && !rollData.isDramatique) {
rollData.isSuccess = (rollData.roll.finalResult >= rollData.difficulte)
rollData.isHeroique = ((rollData.roll.finalResult - rollData.difficulte) >= 10)
rollData.isDramatique = ((rollData.roll.finalResult - rollData.difficulte) <= -10)
rollData.isSuccess = (rollData.finalResult >= rollData.difficulte)
rollData.isHeroique = ((rollData.finalResult - rollData.difficulte) >= 10)
rollData.isDramatique = ((rollData.finalResult - rollData.difficulte) <= -10)
}
}
@ -307,6 +308,7 @@ export class MournbladeUtility {
actor.changeEclat(-1)
}
}
//console.log("BEFORE COMP", rollData)
if (rollData.competence) {
rollData.predilections = duplicate( rollData.competence.system.predilections.filter( pred => !pred.used) || [] )
let compmod = (rollData.competence.system.niveau == 0) ? -3 : 0
@ -324,6 +326,9 @@ export class MournbladeUtility {
if ( rollData.runemode == "inscrire") {
rollData.runeduree *= 2
}
if ( rollData.runemode == "prononcer") {
rollData.runeduree = 1
}
}
let myRoll = new Roll(rollData.diceFormula).roll({ async: false })

View File

@ -1,7 +1,7 @@
{
"id": "fvtt-mournblade",
"description": "Mournblade RPG for FoundryVTT",
"version": "10.0.6",
"version": "10.0.7",
"authors": [
{
"name": "Uberwald/LeRatierBretonnien",
@ -15,7 +15,7 @@
"gridUnits": "m",
"license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-mournblade/raw/branch/v10/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.6.zip",
"download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.7.zip",
"packs": [
{
"type": "Item",