Compare commits

..

1 Commits

Author SHA1 Message Date
2ef0919097 link to automatically set char stats from levels 2021-03-18 21:59:34 -07:00
2 changed files with 4 additions and 17 deletions

View File

@ -19,14 +19,6 @@
sameSite: 'strict', sameSite: 'strict',
}); });
} }
const stats = [
charStats.power || '?',
charStats.guard || '?',
charStats.magic || '?',
charStats.speed || '?',
]
$('.char-stats-display').text('[' + stats.join('/') + ']');
}; };
window.saga = { window.saga = {
@ -269,7 +261,6 @@
checkLocations(); checkLocations();
checkApprentices(); checkApprentices();
checkCharStats(); checkCharStats();
onCharStatChange();
window.saga.sortData(); window.saga.sortData();
window.saga.filterApprentices(); window.saga.filterApprentices();
window.saga.filterLocations(); window.saga.filterLocations();
@ -323,6 +314,8 @@
} }
}); });
update();
// scale all enemy images to fit in a 64x64 square // scale all enemy images to fit in a 64x64 square
$('.enemy-sprite').each((i, el) => { $('.enemy-sprite').each((i, el) => {
const $el = $(el); const $el = $(el);
@ -363,12 +356,9 @@
case 'magic': case 'magic':
case 'speed': case 'speed':
$(`#char-${stat}`).val(data[stat]); $(`#char-${stat}`).val(data[stat]);
window.saga.updateCharStat(stat, Number(data[stat]));
break; break;
} }
}); });
onCharStatChange();
}); });
const $enemyInfoModal = $('#enemy-info-modal'); const $enemyInfoModal = $('#enemy-info-modal');
@ -732,6 +722,4 @@
}); });
}); });
} }
update();
}(window)); }(window));

View File

@ -47,9 +47,8 @@ html
li.nav-item: a.nav-link(href="/accessories" class=(context === 'accessories' ? 'active' : '')) Accessories li.nav-item: a.nav-link(href="/accessories" class=(context === 'accessories' ? 'active' : '')) Accessories
li.nav-item: a.nav-link(href="/exp" class=(context === 'exp' ? 'active' : '')) Experience li.nav-item: a.nav-link(href="/exp" class=(context === 'exp' ? 'active' : '')) Experience
li.nav-item: a.nav-link(href="/levels" class=(context === 'levels' ? 'active' : '')) Levels li.nav-item: a.nav-link(href="/levels" class=(context === 'levels' ? 'active' : '')) Levels
div: button.btn.btn-secondary.btn-sm(data-toggle="modal" data-target="#char-stats-modal") div
| Set character stats button.btn.btn-secondary.btn-sm(data-toggle="modal" data-target="#char-stats-modal") Character stats…
small.ml-1: tt.char-stats-display
div.tab-content div.tab-content
div.tab-pane.show.active.mt-2 div.tab-pane.show.active.mt-2
block tab-content block tab-content