diff --git a/module/actor.js b/module/actor.js index 9c008e86..02821e42 100644 --- a/module/actor.js +++ b/module/actor.js @@ -1656,7 +1656,7 @@ export class RdDActor extends Actor { for ( let sort of sortList) { let voie = sort.data.draconic.toLowerCase(); let competenceVoie = draconicList.find(item => item.data.categorie == 'draconic' && item.name.toLowerCase().includes( voie ) ); - if ( sort.name.toLowerCase().includes('aura') ) { + if ( sort.name.toLowerCase().includes('aura') ) { competenceVoie = bestDraconic; } if (!draconicDone[competenceVoie.name]) { diff --git a/module/rdd-resolution-table.js b/module/rdd-resolution-table.js index 226230b2..8c05bcee 100644 --- a/module/rdd-resolution-table.js +++ b/module/rdd-resolution-table.js @@ -263,6 +263,9 @@ export class RdDResolutionTable { /* -------------------------------------------- */ static buildHTMLResults(caracValue, levelValue) { + if ( caracValue == undefined || isNaN(caracValue )) caracValue = 10; + if ( levelValue == undefined || isNaN(levelValue )) levelValue = 0; + let cell = this.computeChances(caracValue, levelValue); cell.epart = cell.epart > 99 ? 'N/A' : cell.epart; cell.etotal = cell.etotal > 100 ? 'N/A' : cell.etotal;