Ameliorations lancer de sort

This commit is contained in:
sladecraven 2021-02-02 08:20:42 +01:00
parent fed92b9be3
commit bd78b80c24
2 changed files with 4 additions and 1 deletions

View File

@ -1656,7 +1656,7 @@ export class RdDActor extends Actor {
for ( let sort of sortList) { for ( let sort of sortList) {
let voie = sort.data.draconic.toLowerCase(); let voie = sort.data.draconic.toLowerCase();
let competenceVoie = draconicList.find(item => item.data.categorie == 'draconic' && item.name.toLowerCase().includes( voie ) ); 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; competenceVoie = bestDraconic;
} }
if (!draconicDone[competenceVoie.name]) { if (!draconicDone[competenceVoie.name]) {

View File

@ -263,6 +263,9 @@ export class RdDResolutionTable {
/* -------------------------------------------- */ /* -------------------------------------------- */
static buildHTMLResults(caracValue, levelValue) { static buildHTMLResults(caracValue, levelValue) {
if ( caracValue == undefined || isNaN(caracValue )) caracValue = 10;
if ( levelValue == undefined || isNaN(levelValue )) levelValue = 0;
let cell = this.computeChances(caracValue, levelValue); let cell = this.computeChances(caracValue, levelValue);
cell.epart = cell.epart > 99 ? 'N/A' : cell.epart; cell.epart = cell.epart > 99 ? 'N/A' : cell.epart;
cell.etotal = cell.etotal > 100 ? 'N/A' : cell.etotal; cell.etotal = cell.etotal > 100 ? 'N/A' : cell.etotal;