diff --git a/web/server.js b/web/server.js index b3f84d1..80bdda9 100644 --- a/web/server.js +++ b/web/server.js @@ -111,6 +111,12 @@ app.get('/items', (req, res) => { }); }); +app.get('/levels', (req, res) => { + render(res, 'levels', { + context: 'levels', + }); +}); + const port = process.env.PORT || 18000; const server = app.listen(port, () => { diff --git a/web/views/levels.pug b/web/views/levels.pug new file mode 100644 index 0000000..2b170e4 --- /dev/null +++ b/web/views/levels.pug @@ -0,0 +1,38 @@ +extends master.pug + +block tab-content + + table#main-table.table.table-sm.table-borderless.table-striped.table-hover.sticky-header + thead: tr.header + th Level + th Esuna + th Kamil + th Olvan + th Lejes + th Lux + th Valsu + th Wilme + + - let level = 0; + - const wilme = { initial: [ 20, 2, 5, 7, 2, 4 ], level: [ 8, 1, 4, 5, 2, 4 ] }; + - const lux = { initial: [ 18, 3, 5, 6, 3, 3 ], level: [ 7, 2, 4, 5, 3, 3 ] }; + - const olvan = { initial: [ 18, 3, 4, 5, 3, 3 ], level: [ 6, 2, 3, 3, 3, 3 ] }; + - const kamil = { initial: [ 16, 4, 4, 4, 3, 3 ], level: [ 5, 3, 3, 3, 3, 3 ] }; + - const lejes = { initial: [ 16, 10, 4, 4, 3, 4 ], level: [ 5, 4, 3, 3, 3, 4 ] }; + - const valsu = { initial: [ 15, 10, 4, 4, 4, 4 ], level: [ 5, 4, 2, 3, 4, 4 ] }; + - const esuna = { initial: [ 14, 16, 3, 3, 4, 4 ], level: [ 5, 5, 2, 2, 4, 4 ] }; + + tbody.data + + while level < 80 + mixin calcCharStats(char) + code= char.initial.map((x, i) => Math.min(i < 4 ? 999 : 255, x + (char.level[i] * (level - 1)))).join('/') + tr + td= ++level + td: +calcCharStats(esuna) + td: +calcCharStats(kamil) + td: +calcCharStats(olvan) + td: +calcCharStats(lejes) + td: +calcCharStats(lux) + td: +calcCharStats(valsu) + td: +calcCharStats(wilme) diff --git a/web/views/master.pug b/web/views/master.pug index 9ef4f3f..b103407 100644 --- a/web/views/master.pug +++ b/web/views/master.pug @@ -46,6 +46,7 @@ html li.nav-item: a.nav-link(href="/armor" class=(context === 'armor' ? 'active' : '')) Armor 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="/levels" class=(context === 'levels' ? 'active' : '')) Levels div button.btn.btn-secondary.btn-sm(data-toggle="modal" data-target="#char-stats-modal") Character stats… div.tab-content