world league

This commit is contained in:
vvo
2024-10-16 19:38:31 +08:00
parent f6b0115fea
commit 8465294b38
12 changed files with 1125 additions and 223 deletions
+499
View File
@@ -0,0 +1,499 @@
/*
* This combined file was created by the DataTables downloader builder:
* https://datatables.net/download
*
* To rebuild or modify this file with the latest versions of the included
* software please visit:
* https://datatables.net/download/#bm/dt-1.11.3/fh-3.2.0/r-2.2.9/sc-2.0.5
*
* Included libraries:
* DataTables 1.11.3, FixedHeader 3.2.0, Responsive 2.2.9, Scroller 2.0.5
*/
@charset "UTF-8";
td.dt-control {
background: url("https://www.datatables.net/examples/resources/details_open.png") no-repeat center center;
cursor: pointer;
}
tr.dt-hasChild td.dt-control {
background: url("https://www.datatables.net/examples/resources/details_close.png") no-repeat center center;
}
table.dataTable th.dt-left,
table.dataTable td.dt-left {
text-align: left;
}
table.dataTable th.dt-center,
table.dataTable td.dt-center,
table.dataTable td.dataTables_empty {
text-align: center;
}
table.dataTable th.dt-right,
table.dataTable td.dt-right {
text-align: right;
}
table.dataTable th.dt-justify,
table.dataTable td.dt-justify {
text-align: justify;
}
table.dataTable th.dt-nowrap,
table.dataTable td.dt-nowrap {
white-space: nowrap;
}
table.dataTable thead th.dt-head-left,
table.dataTable thead td.dt-head-left,
table.dataTable tfoot th.dt-head-left,
table.dataTable tfoot td.dt-head-left {
text-align: left;
}
table.dataTable thead th.dt-head-center,
table.dataTable thead td.dt-head-center,
table.dataTable tfoot th.dt-head-center,
table.dataTable tfoot td.dt-head-center {
text-align: center;
}
table.dataTable thead th.dt-head-right,
table.dataTable thead td.dt-head-right,
table.dataTable tfoot th.dt-head-right,
table.dataTable tfoot td.dt-head-right {
text-align: right;
}
table.dataTable thead th.dt-head-justify,
table.dataTable thead td.dt-head-justify,
table.dataTable tfoot th.dt-head-justify,
table.dataTable tfoot td.dt-head-justify {
text-align: justify;
}
table.dataTable thead th.dt-head-nowrap,
table.dataTable thead td.dt-head-nowrap,
table.dataTable tfoot th.dt-head-nowrap,
table.dataTable tfoot td.dt-head-nowrap {
white-space: nowrap;
}
table.dataTable tbody th.dt-body-left,
table.dataTable tbody td.dt-body-left {
text-align: left;
}
table.dataTable tbody th.dt-body-center,
table.dataTable tbody td.dt-body-center {
text-align: center;
}
table.dataTable tbody th.dt-body-right,
table.dataTable tbody td.dt-body-right {
text-align: right;
}
table.dataTable tbody th.dt-body-justify,
table.dataTable tbody td.dt-body-justify {
text-align: justify;
}
table.dataTable tbody th.dt-body-nowrap,
table.dataTable tbody td.dt-body-nowrap {
white-space: nowrap;
}
/*! DataTables Bulma integration
* ©2020 SpryMedia Ltd - datatables.net/license
*/
table.dataTable {
clear: both;
margin-top: 6px !important;
margin-bottom: 6px !important;
max-width: none !important;
border-collapse: separate !important;
border-spacing: 0;
}
table.dataTable td,
table.dataTable th {
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
table.dataTable td.dataTables_empty,
table.dataTable th.dataTables_empty {
text-align: center;
}
table.dataTable.nowrap th,
table.dataTable.nowrap td {
white-space: nowrap;
}
div.dataTables_wrapper div.dataTables_length label {
font-weight: normal;
text-align: left;
white-space: nowrap;
}
div.dataTables_wrapper div.dataTables_length div {
vertical-align: middle;
}
div.dataTables_wrapper div.dataTables_length select {
width: auto;
display: inline-block;
vertical-align: middle;
}
div.dataTables_wrapper div.dataTables_filter {
text-align: right;
}
div.dataTables_wrapper div.dataTables_filter label {
font-weight: normal;
white-space: nowrap;
text-align: left;
}
div.dataTables_wrapper div.dataTables_filter input {
margin-left: 0.5em;
width: auto;
vertical-align: middle;
}
div.dataTables_wrapper div.dataTables_info {
padding-top: 0.5em;
}
div.dataTables_wrapper div.dataTables_paginate ul {
justify-content: flex-end;
list-style: none;
margin: 0;
}
div.dataTables_wrapper div.dataTables_processing {
position: absolute;
top: 50%;
left: 50%;
width: 200px;
margin-left: -100px;
margin-top: -26px;
text-align: center;
padding: 1em 0;
}
table.dataTable > thead > tr > th:active,
table.dataTable > thead > tr > td:active {
outline: none;
}
table.dataTable > thead > tr > th:not(.sorting_disabled),
table.dataTable > thead > tr > td:not(.sorting_disabled) {
padding-right: 30px;
}
table.dataTable > thead .sorting,
table.dataTable > thead .sorting_asc,
table.dataTable > thead .sorting_desc,
table.dataTable > thead .sorting_asc_disabled,
table.dataTable > thead .sorting_desc_disabled {
cursor: pointer;
position: relative;
}
table.dataTable > thead .sorting:before, table.dataTable > thead .sorting:after,
table.dataTable > thead .sorting_asc:before,
table.dataTable > thead .sorting_asc:after,
table.dataTable > thead .sorting_desc:before,
table.dataTable > thead .sorting_desc:after,
table.dataTable > thead .sorting_asc_disabled:before,
table.dataTable > thead .sorting_asc_disabled:after,
table.dataTable > thead .sorting_desc_disabled:before,
table.dataTable > thead .sorting_desc_disabled:after {
position: absolute;
bottom: 0.7em;
display: block;
opacity: 0.3;
}
table.dataTable > thead .sorting:before,
table.dataTable > thead .sorting_asc:before,
table.dataTable > thead .sorting_desc:before,
table.dataTable > thead .sorting_asc_disabled:before,
table.dataTable > thead .sorting_desc_disabled:before {
right: 1em;
content: "↑";
}
table.dataTable > thead .sorting:after,
table.dataTable > thead .sorting_asc:after,
table.dataTable > thead .sorting_desc:after,
table.dataTable > thead .sorting_asc_disabled:after,
table.dataTable > thead .sorting_desc_disabled:after {
right: 0.5em;
content: "↓";
}
table.dataTable > thead .sorting_asc:before,
table.dataTable > thead .sorting_desc:after {
opacity: 1;
}
table.dataTable > thead .sorting_asc_disabled:before,
table.dataTable > thead .sorting_desc_disabled:after {
opacity: 0;
}
div.dataTables_scrollHead table.dataTable {
margin-bottom: 0 !important;
}
div.dataTables_scrollBody table {
border-top: none;
margin-top: 0 !important;
margin-bottom: 0 !important;
}
div.dataTables_scrollBody table thead .sorting:before,
div.dataTables_scrollBody table thead .sorting_asc:before,
div.dataTables_scrollBody table thead .sorting_desc:before,
div.dataTables_scrollBody table thead .sorting:after,
div.dataTables_scrollBody table thead .sorting_asc:after,
div.dataTables_scrollBody table thead .sorting_desc:after {
display: none;
}
div.dataTables_scrollBody table tbody tr:first-child th,
div.dataTables_scrollBody table tbody tr:first-child td {
border-top: none;
}
div.dataTables_scrollFoot > .dataTables_scrollFootInner {
box-sizing: content-box;
}
div.dataTables_scrollFoot > .dataTables_scrollFootInner > table {
margin-top: 0 !important;
border-top: none;
}
table.dataTable.fixedHeader-floating,
table.dataTable.fixedHeader-locked {
background-color: white;
margin-top: 0 !important;
margin-bottom: 0 !important;
}
table.dataTable.fixedHeader-locked {
position: absolute !important;
}
@media print {
table.fixedHeader-floating {
display: none;
}
}
.table td,
.table th {
padding: 7px 11px !important;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td.child,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.child,
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty {
cursor: default !important;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td.child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
display: none !important;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control {
position: relative;
padding-left: 30px;
cursor: pointer;
}
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
top: 50%;
left: 5px;
height: 1em;
width: 1em;
margin-top: -9px;
display: block;
position: absolute;
color: white;
border: 0.15em solid white;
border-radius: 1em;
box-shadow: 0 0 0.2em #444;
box-sizing: content-box;
text-align: center;
text-indent: 0 !important;
font-family: "Courier New", Courier, monospace;
line-height: 1em;
content: "+";
background-color: #00D1B2;
}
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
content: "-";
background-color: #d33333;
}
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control,
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control {
padding-left: 27px;
}
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th.dtr-control:before {
left: 4px;
height: 14px;
width: 14px;
border-radius: 14px;
line-height: 14px;
text-indent: 3px;
}
table.dataTable.dtr-column > tbody > tr > td.dtr-control,
table.dataTable.dtr-column > tbody > tr > th.dtr-control,
table.dataTable.dtr-column > tbody > tr > td.control,
table.dataTable.dtr-column > tbody > tr > th.control {
position: relative;
cursor: pointer;
}
table.dataTable.dtr-column > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr > th.dtr-control:before,
table.dataTable.dtr-column > tbody > tr > td.control:before,
table.dataTable.dtr-column > tbody > tr > th.control:before {
top: 50%;
left: 50%;
height: 0.8em;
width: 0.8em;
margin-top: -0.5em;
margin-left: -0.5em;
display: block;
position: absolute;
color: white;
border: 0.15em solid white;
border-radius: 1em;
box-shadow: 0 0 0.2em #444;
box-sizing: content-box;
text-align: center;
text-indent: 0 !important;
font-family: "Courier New", Courier, monospace;
line-height: 1em;
content: "+";
background-color: #00D1B2;
}
table.dataTable.dtr-column > tbody > tr.parent td.dtr-control:before,
table.dataTable.dtr-column > tbody > tr.parent th.dtr-control:before,
table.dataTable.dtr-column > tbody > tr.parent td.control:before,
table.dataTable.dtr-column > tbody > tr.parent th.control:before {
content: "-";
background-color: #d33333;
}
table.dataTable > tbody > tr.child {
padding: 0.5em 1em;
}
table.dataTable > tbody > tr.child:hover {
background: transparent !important;
}
table.dataTable > tbody > tr.child ul.dtr-details {
display: inline-block;
list-style-type: none;
margin: 0;
padding: 0;
}
table.dataTable > tbody > tr.child ul.dtr-details > li {
border-bottom: 1px solid #efefef;
padding: 0.5em 0;
}
table.dataTable > tbody > tr.child ul.dtr-details > li:first-child {
padding-top: 0;
}
table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
border-bottom: none;
}
table.dataTable > tbody > tr.child span.dtr-title {
display: inline-block;
min-width: 75px;
font-weight: bold;
}
div.dtr-modal {
position: fixed;
box-sizing: border-box;
top: 0;
left: 0;
height: 100%;
width: 100%;
z-index: 100;
padding: 10em 1em;
}
div.dtr-modal div.dtr-modal-display {
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 50%;
height: 50%;
overflow: auto;
margin: auto;
z-index: 102;
overflow: auto;
background-color: #f5f5f7;
border: 1px solid black;
border-radius: 0.5em;
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}
div.dtr-modal div.dtr-modal-content {
position: relative;
padding: 1em;
}
div.dtr-modal div.dtr-modal-close {
position: absolute;
top: 6px;
right: 6px;
width: 22px;
height: 22px;
border: 1px solid #eaeaea;
background-color: #f9f9f9;
text-align: center;
border-radius: 3px;
cursor: pointer;
z-index: 12;
}
div.dtr-modal div.dtr-modal-close:hover {
background-color: #eaeaea;
}
div.dtr-modal div.dtr-modal-background {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 101;
background: rgba(0, 0, 0, 0.6);
}
@media screen and (max-width: 767px) {
div.dtr-modal div.dtr-modal-display {
width: 95%;
}
}
table.dataTable > tbody > tr.child ul {
font-size: 1em;
}
div.modal-content {
padding: 20px;
background: white;
border-radius: 5px;
}
div.dts {
display: block !important;
}
div.dts tbody th,
div.dts tbody td {
white-space: nowrap;
}
div.dts div.dts_loading {
z-index: 1;
}
div.dts div.dts_label {
position: absolute;
right: 10px;
background: rgba(0, 0, 0, 0.8);
color: white;
box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
text-align: right;
border-radius: 3px;
padding: 0.4em;
z-index: 2;
display: none;
}
div.dts div.dataTables_scrollBody {
background: repeating-linear-gradient(45deg, #edeeff, #edeeff 10px, white 10px, white 20px);
}
div.dts div.dataTables_scrollBody table {
z-index: 2;
}
div.dts div.dataTables_paginate,
div.dts div.dataTables_length {
display: none;
}
+125
View File
@@ -0,0 +1,125 @@
let flareMatrix = {
"1": [145, 153, 162, 171, 179, 188, 197, 205, 214, 223, 232],
"2": [155, 164, 182, 192, 201, 210, 220, 220, 229, 238, 248],
"3": [170, 180, 190, 200, 210, 221, 231, 241, 251, 261, 272],
"4": [185, 196, 207, 218, 229, 240, 251, 262, 273, 284, 296],
"5": [205, 217, 229, 241, 254, 266, 278, 291, 303, 315, 328],
"6": [230, 243, 257, 271, 285, 299, 312, 326, 340, 354, 368],
"7": [255, 270, 285, 300, 316, 331, 346, 362, 377, 392, 408],
"8": [290, 307, 324, 342, 359, 377, 394, 411, 429, 446, 464],
"9": [335, 355, 375, 395, 415, 435, 455, 475, 495, 515, 536],
"10": [400, 424, 448, 472, 496, 520, 544, 568, 592, 616, 640],
"11": [465, 492, 520, 548, 576, 604, 632, 660, 688, 716, 744],
"12": [510, 540, 571, 601, 632, 663, 693, 724, 754, 785, 816],
"13": [545, 577, 610, 643, 675, 708, 741, 773, 806, 839, 872],
"14": [575, 609, 644, 678, 713, 747, 782, 816, 851, 885, 920],
"15": [600, 636, 672, 708, 744, 780, 816, 852, 888, 924, 960],
"16": [620, 657, 694, 731, 768, 806, 843, 880, 917, 954, 992],
"17": [635, 673, 711, 749, 787, 825, 863, 901, 939, 977, 1016],
"18": [650, 689, 728, 767, 806, 845, 884, 923, 962, 1001, 1040],
"19": [665, 704, 744, 784, 824, 864, 904, 944, 984, 1024, 1064]
}
let flareSkill = [
["NONE", 0, 500, 1000, 1500],
["MERCURY", 2000, 3000, 4000, 5000],
["VENUS", 6000, 7000, 8000, 9000],
["EARTH", 10000, 11500, 13000, 14500],
["MARS", 16000, 18000, 20000, 22000],
["JUPITER", 24000, 26500, 29000, 31500],
["SATURN", 34000, 36750, 39500, 42250],
["URANUS", 45000, 48750, 52500, 56250],
["NEPTUNE", 60000, 63750, 67500, 71250],
["SUN", 75000, 78750, 82500, 86250],
["WORLD", 90000]
]
let area = ["Unknown", "Hokkaido", "Aomori", "Iwate", "Miyagi", "Akita", "Yamagata", "Fukushima", "Ibaraki", "Tochigi", "Gunma", "Saitama", "Chiba", "Tokyo", "Kanagawa", "Niigata", "Toyama", "Ishikawa", "Fukui", "Yamanashi",
"Nagano", "Gifu", "Shizuoka", "Aichi", "Mie", "Shiga", "Kyoto", "Osaka", "Hyogo", "Nara", "Wakayama", "Tottori", "Shimane", "Okayama", "Hiroshima", "Yamaguchi", "Tokushima", "Kagawa", "Ehime", "Kochi", "Fukuoka", "Saga",
"Nagasaki", "Kumamoto", "Oita", "Miyazaki", "Kagoshima", "Okinawa", "Hong Kong", "Korea", "Taiwan", "USA", "Europe", "Overseas", "Alaska", "Alabama", "Arkansas", "Arizona", "California", "Colorado", "Connecticut", "Delaware",
"Florida", "Georgia", "Hawaii", "Iowa", "Idaho", "Illinois", "Indiana", "Kansas", "Kentucky", "Louisiana", "Massachusetts", "Maryland", "Maine", "Michigan", "Minnesota", "Missouri", "Mississippi", "Montana", "Nebraska",
"North Carolina", "North Dakota", "New Hampshire", "New Jersey", "New Mexico", "Nevada", "New York", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah",
"Virginia", "Vermont", "Washington", "Wisconsin", "West Virginia", "Wyoming", "Washington D.C.", "Japan", "Canada", "Singapore", "Thailand", "Australia", "New Zealand", "UK", "Italy", "Spain", "Germany", "France", "Portugal", "Indonesia",
"Philippines"
]
async function getFlareInfo(scores) {
let flareData = {}
let mdbData = []
let flareTopScores = {'sg': [], 'db': []}
let totalSgFlare = 0
let totalDbFlare = 0
let classicSgTop30 = []
let classicSgFlare = 0
let classicDbTop30 = []
let classicDbFlare = 0
let whiteSgTop30 = []
let whiteSgFlare = 0
let whiteDbTop30 = []
let whiteDbFlare = 0
let goldSgTop30 = []
let goldSgFlare = 0
let goldDbTop30 = []
let goldDbFlare = 0
await emit('getMDB', {}).then(
function(response) {
mdbData = response.data.mdb
}
)
if(mdbData !== undefined) {
scores.forEach(score => {
let songIndex = mdbData.findIndex(m => m.mcode === score.songId)
if(songIndex > -1 && score.songId != 38707 && score.flareForce >= 0) {
if(score.style === 0) {
flareTopScores.sg.push({
flare: flareMatrix[mdbData[songIndex]['diffLv'][score.difficulty]][score.flareForce],
title: mdbData[songIndex]['title'],
difficulty: mdbData[songIndex]['diffLv'][score.difficulty],
series: mdbData[songIndex]['series']
})
} else {
flareTopScores.db.push({
flare: flareMatrix[mdbData[songIndex]['diffLv'][score.difficulty]][score.flareForce],
title: mdbData[songIndex]['title'],
difficulty: mdbData[songIndex]['diffLv'][score.difficulty + 5],
series: mdbData[songIndex]['series']
})
}
}
})
flareData.classicSgTop30 = flareTopScores.sg.filter(ft => ft.series <= 13).sort((a, b) => b.flare - a.flare)
if(flareData.classicSgTop30.length > 30) flareData.classicSgTop30.slice(0, 30)
flareData.classicSgFlare = flareData.classicSgTop30.reduce((n, {flare}) => n + flare, 0)
flareData.whiteSgTop30 = flareTopScores.sg.filter(ft => ft.series >= 14 && ft.series <= 17).sort((a, b) => b.flare - a.flare)
if(flareData.whiteSgTop30.length > 30) flareData.whiteSgTop30.slice(0, 30)
flareData.whiteSgFlare = flareData.whiteSgTop30.reduce((n, {flare}) => n + flare, 0)
flareData.goldSgTop30 = flareTopScores.sg.filter(ft => ft.series >= 18).sort((a, b) => b.flare - a.flare)
if(flareData.goldSgTop30.length > 30) flareData.goldSgTop30.slice(0, 30)
flareData.goldSgFlare = flareData.goldSgTop30.reduce((n, {flare}) => n + flare, 0)
flareData.totalSgFlare = flareData.classicSgTop30.concat(flareData.whiteSgTop30, flareData.goldSgTop30).reduce((n, {flare}) => n + flare, 0)
flareData.classicDbTop30 = flareTopScores.db.filter(ft => ft.series <= 13).sort((a, b) => b.flare - a.flare)
if(flareData.classicDbTop30.length > 30) flareData.classicDbTop30.slice(0, 30)
flareData.classicDbFlare = flareData.classicDbTop30.reduce((n, {flare}) => n + flare, 0)
flareData.whiteDbTop30 = flareTopScores.db.filter(ft => ft.series >= 14 && ft.series <= 17).sort((a, b) => b.flare - a.flare)
if(flareData.whiteDbTop30.length > 30) flareData.whiteDbTop30.slice(0, 30)
flareData.whiteDbFlare = flareData.whiteDbTop30.reduce((n, {flare}) => n + flare, 0)
flareData.goldDbTop30 = flareTopScores.db.filter(ft => ft.series >= 18).sort((a, b) => b.flare - a.flare)
if(flareData.goldDbTop30.length > 30) flareData.goldDbTop30.slice(0, 30)
flareData.goldDbFlare = flareData.goldDbTop30.reduce((n, {flare}) => n + flare, 0)
flareData.totalDbFlare = flareData.classicDbTop30.concat(flareData.whiteDbTop30, flareData.goldDbTop30).reduce((n, {flare}) => n + flare, 0)
return flareData
}
}
+86
View File
@@ -0,0 +1,86 @@
let flareData = {}
let totalFlare = 0
let classicTop30 = []
let classicFlare = []
let whiteTop30 = []
let whiteFlare = []
let goldTop30 = []
let goldFlare = []
async function populateTables() {
if(parseInt($('#style_select').val()) === 0) {
totalFlare = flareData.totalSgFlare
classicTop30 = flareData.classicSgTop30
classicFlare = flareData.classicSgFlare
whiteTop30 = flareData.whiteSgTop30
whiteFlare = flareData.whiteSgFlare
goldTop30 = flareData.goldSgTop30
goldFlare = flareData.goldSgFlare
} else {
totalFlare = flareData.totalDbFlare
classicTop30 = flareData.classicDbTop30
classicFlare = flareData.classicDbFlare
whiteTop30 = flareData.whiteDbTop30
whiteFlare = flareData.whiteDbFlare
goldTop30 = flareData.goldDbTop30
goldFlare = flareData.goldDbFlare
}
if(classicTop30.length === 0) $("tbody#classic_flare").append($("<tr>").append($("<td colspan='4' style='text-align: center'>").append('No qualified scores.')))
if(whiteTop30.length === 0) $("tbody#white_flare").append($("<tr>").append($("<td colspan='4' style='text-align: center'>").append('No qualified scores.')))
if(goldTop30.length === 0) $("tbody#gold_flare").append($("<tr>").append($("<td colspan='4' style='text-align: center'>").append('No qualified scores.')))
for(const index in classicTop30) {
$("tbody#classic_flare").append(
$("<tr>").append(
$("<td>").append(parseInt(index) + 1)
).append(
$("<td>").append(classicTop30[index].title)
).append(
$("<td>").append(classicTop30[index].difficulty)
).append(
$("<td>").append(classicTop30[index].flare)
)
)
}
for(const index in whiteTop30) {
$("tbody#white_flare").append(
$("<tr>").append(
$("<td>").append(parseInt(index) + 1)
).append(
$("<td>").append(whiteTop30[index].title)
).append(
$("<td>").append(whiteTop30[index].difficulty)
).append(
$("<td>").append(whiteTop30[index].flare)
)
)
}
for(const index in goldTop30) {
$("tbody#gold_flare").append(
$("<tr>").append(
$("<td>").append(parseInt(index) + 1)
).append(
$("<td>").append(goldTop30[index].title)
).append(
$("<td>").append(goldTop30[index].difficulty)
).append(
$("<td>").append(goldTop30[index].flare)
)
)
}
}
$(document).ready(async function() {
let scores = JSON.parse(document.getElementById("score-pass").innerText)
flareData = await getFlareInfo(scores);
await populateTables()
$('#style_select').change(async function() {
$("#classic_flare tr").remove()
$("#white_flare tr").remove()
$("#gold_flare tr").remove()
console.log("Removed")
await populateTables()
})
})
+56 -150
View File
@@ -1,168 +1,74 @@
let flareMatrix = {
"1": [145, 153, 162, 171, 179, 188, 197, 205, 214, 223, 232],
"2": [155, 164, 182, 192, 201, 210, 220, 220, 229, 238, 248],
"3": [170, 180, 190, 200, 210, 221, 231, 241, 251, 261, 272],
"4": [185, 196, 207, 218, 229, 240, 251, 262, 273, 284, 296],
"5": [205, 217, 229, 241, 254, 266, 278, 291, 303, 315, 328],
"6": [230, 243, 257, 271, 285, 299, 312, 326, 340, 354, 368],
"7": [255, 270, 285, 300, 316, 331, 346, 362, 377, 392, 408],
"8": [290, 307, 324, 342, 359, 377, 394, 411, 429, 446, 464],
"9": [335, 355, 375, 395, 415, 435, 455, 475, 495, 515, 536],
"10": [400, 424, 448, 472, 496, 520, 544, 568, 592, 616, 640],
"11": [465, 492, 520, 548, 576, 604, 632, 660, 688, 716, 744],
"12": [510, 540, 571, 601, 632, 663, 693, 724, 754, 785, 816],
"13": [545, 577, 610, 643, 675, 708, 741, 773, 806, 839, 872],
"14": [575, 609, 644, 678, 713, 747, 782, 816, 851, 885, 920],
"15": [600, 636, 672, 708, 744, 780, 816, 852, 888, 924, 960],
"16": [620, 657, 694, 731, 768, 806, 843, 880, 917, 954, 992],
"17": [635, 673, 711, 749, 787, 825, 863, 901, 939, 977, 1016],
"18": [650, 689, 728, 767, 806, 845, 884, 923, 962, 1001, 1040],
"19": [665, 704, 744, 784, 824, 864, 904, 944, 984, 1024, 1064]
}
let flareSkill = [
["NONE", 0, 500, 1000, 1500],
["MERCURY", 2000, 3000, 4000, 5000],
["VENUS", 6000, 7000, 8000, 9000],
["EARTH", 10000, 11500, 13000, 14500],
["MARS", 16000, 18000, 20000, 22000],
["JUPITER", 24000, 26500, 29000, 31500],
["SATURN", 34000, 36750, 39500, 42250],
["URANUS", 45000, 48750, 52500, 56250],
["NEPTUNE", 60000, 63750, 67500, 71250],
["SUN", 75000, 78750, 82500, 86250],
["WORLD", 90000]
]
let area = ["Unknown", "Hokkaido", "Aomori", "Iwate", "Miyagi", "Akita", "Yamagata", "Fukushima", "Ibaraki", "Tochigi", "Gunma", "Saitama", "Chiba", "Tokyo", "Kanagawa", "Niigata", "Toyama", "Ishikawa", "Fukui", "Yamanashi",
"Nagano", "Gifu", "Shizuoka", "Aichi", "Mie", "Shiga", "Kyoto", "Osaka", "Hyogo", "Nara", "Wakayama", "Tottori", "Shimane", "Okayama", "Hiroshima", "Yamaguchi", "Tokushima", "Kagawa", "Ehime", "Kochi", "Fukuoka", "Saga",
"Nagasaki", "Kumamoto", "Oita", "Miyazaki", "Kagoshima", "Okinawa", "Hong Kong", "Korea", "Taiwan", "USA", "Europe", "Overseas", "Alaska", "Alabama", "Arkansas", "Arizona", "California", "Colorado", "Connecticut", "Delaware",
"Florida", "Georgia", "Hawaii", "Iowa", "Idaho", "Illinois", "Indiana", "Kansas", "Kentucky", "Louisiana", "Massachusetts", "Maryland", "Maine", "Michigan", "Minnesota", "Missouri", "Mississippi", "Montana", "Nebraska",
"North Carolina", "North Dakota", "New Hampshire", "New Jersey", "New Mexico", "Nevada", "New York", "Ohio", "Oklahoma", "Oregon", "Pennsylvania", "Rhode Island", "South Carolina", "South Dakota", "Tennessee", "Texas", "Utah",
"Virginia", "Vermont", "Washington", "Wisconsin", "West Virginia", "Wyoming", "Washington D.C.", "Japan", "Canada", "Singapore", "Thailand", "Australia", "New Zealand", "UK", "Italy", "Spain", "Germany", "France", "Portugal", "Indonesia",
"Philippines"
]
$(document).ready(async function() {
// classic 1-13 white 14-17 gold 18-21
let profile = JSON.parse(document.getElementById("profile3-pass").innerText)
let scores = JSON.parse(document.getElementById("score-pass").innerText)
let mdbData = []
let flareTopScores = {'sg': [], 'db': []}
let totalSgFlare = 0
let totalDbFlare = 0
let classicSgTop30 = []
let classicSgFlare = 0
let classicDbTop30 = []
let classicDbFlare = 0
let whiteSgTop30 = []
let whiteSgFlare = 0
let whiteDbTop30 = []
let whiteDbFlare = 0
let goldSgTop30 = []
let goldSgFlare = 0
let goldDbTop30 = []
let goldDbFlare = 0
await emit('getMDB', {}).then(
function(response) {
mdbData = response.data.mdb
}
)
$("#area").append(
$("<td>").append(area[profile.area])
)
if(mdbData !== undefined) {
scores.forEach(score => {
let songIndex = mdbData.findIndex(m => m.mcode === score.songId)
if(songIndex > -1 && score.songId != 38707 && score.flareForce >= 0) {
if(score.style === 0) {
flareTopScores.sg.push({
flare: flareMatrix[mdbData[songIndex]['diffLv'][score.difficulty]][score.flareForce],
series: mdbData[songIndex]['series']
})
} else {
flareTopScores.db.push({
flare: flareMatrix[mdbData[songIndex]['diffLv'][score.difficulty]][score.flareForce],
series: mdbData[songIndex]['series']
})
let flareData = await getFlareInfo(scores)
let totalSgFlare = flareData.totalSgFlare
let totalDbFlare = flareData.totalDbFlare
let classicSgTop30 = flareData.classicSgTop30
let classicSgFlare = flareData.classicSgFlare
let classicDbTop30 = flareData.classicDbTop30
let classicDbFlare = flareData.classicDbFlare
let whiteSgTop30 = flareData.whiteSgTop30
let whiteSgFlare = flareData.whiteSgFlare
let whiteDbTop30 = flareData.whiteDbTop30
let whiteDbFlare = flareData.whiteDbFlare
let goldSgTop30 = flareData.goldSgTop30
let goldSgFlare = flareData.goldSgFlare
let goldDbTop30 = flareData.goldDbTop30
let goldDbFlare = flareData.goldDbFlare
let skillGet = false
let sgSkill = ''
let dbSkill = ''
let skillPlus = '+++'
flareSkill.forEach(fs => {
if(!skillGet) {
for(let sctr = 1; sctr < fs.length; sctr++) {
if(totalSgFlare >= fs[sctr]) {
sgSkill = fs[0]
if(sctr > 1) sgSkill = sgSkill + skillPlus.substring(0, sctr - 1)
}
else skillGet = true
}
})
}
})
console.log(sgSkill + " (" + totalSgFlare + ")")
classicSgTop30 = flareTopScores.sg.filter(ft => ft.series <= 13).sort((a, b) => b.flare - a.flare)
if(classicSgTop30.length > 30) classicSgTop30.slice(0, 30)
classicSgFlare = classicSgTop30.reduce((n, {flare}) => n + flare, 0)
whiteSgTop30 = flareTopScores.sg.filter(ft => ft.series >= 14 && ft.series <= 17).sort((a, b) => b.flare - a.flare)
if(whiteSgTop30.length > 30) whiteSgTop30.slice(0, 30)
whiteSgFlare = whiteSgTop30.reduce((n, {flare}) => n + flare, 0)
goldSgTop30 = flareTopScores.sg.filter(ft => ft.series >= 18).sort((a, b) => b.flare - a.flare)
if(goldSgTop30.length > 30) goldSgTop30.slice(0, 30)
goldSgFlare = goldSgTop30.reduce((n, {flare}) => n + flare, 0)
totalSgFlare = classicSgTop30.concat(whiteSgTop30, goldSgTop30).reduce((n, {flare}) => n + flare, 0)
classicDbTop30 = flareTopScores.db.filter(ft => ft.series <= 13).sort((a, b) => b.flare - a.flare)
if(classicDbTop30.length > 30) classicDbTop30.slice(0, 30)
classicDbFlare = classicDbTop30.reduce((n, {flare}) => n + flare, 0)
whiteDbTop30 = flareTopScores.db.filter(ft => ft.series >= 14 && ft.series <= 17).sort((a, b) => b.flare - a.flare)
if(whiteDbTop30.length > 30) whiteDbTop30.slice(0, 30)
whiteDbFlare = whiteDbTop30.reduce((n, {flare}) => n + flare, 0)
goldDbTop30 = flareTopScores.db.filter(ft => ft.series >= 18).sort((a, b) => b.flare - a.flare)
if(goldDbTop30.length > 30) goldDbTop30.slice(0, 30)
goldDbFlare = goldDbTop30.reduce((n, {flare}) => n + flare, 0)
totalDbFlare = classicDbTop30.concat(whiteDbTop30, goldDbTop30).reduce((n, {flare}) => n + flare, 0)
let skillGet = false
let sgSkill = ''
let dbSkill = ''
let skillPlus = '+++'
flareSkill.forEach(fs => {
if(!skillGet) {
for(let sctr = 1; sctr < fs.length; sctr++) {
if(totalSgFlare >= fs[sctr]) {
sgSkill = fs[0]
if(sctr > 1) sgSkill = sgSkill + skillPlus.substring(0, sctr - 1)
}
else skillGet = true
skillGet = false
flareSkill.forEach(fs => {
if(!skillGet) {
for(let sctr = 1; sctr < fs.length; sctr++) {
if(totalDbFlare >= fs[sctr]) {
dbSkill = fs[0]
if(sctr > 1) dbSkill = dbSkill + skillPlus.substring(0, sctr - 1)
}
else skillGet = true
}
})
console.log(sgSkill + " (" + totalSgFlare + ")")
}
})
console.log(dbSkill + " (" + totalDbFlare + ")")
skillGet = false
flareSkill.forEach(fs => {
if(!skillGet) {
for(let sctr = 1; sctr < fs.length; sctr++) {
if(totalDbFlare >= fs[sctr]) {
dbSkill = fs[0]
if(sctr > 1) dbSkill = dbSkill + skillPlus.substring(0, sctr - 1)
}
else skillGet = true
}
}
})
console.log(dbSkill + " (" + totalDbFlare + ")")
$("#skillrank").append(
$("<td>").append(sgSkill)
).append(
$("<td>").append(dbSkill)
)
$("#skillrank").append(
$("<td>").append(sgSkill)
).append(
$("<td>").append(dbSkill)
)
$("#skilltotal").append(
$("<td>").append(totalSgFlare)
).append(
$("<td>").append(totalDbFlare)
)
}
$("#skilltotal").append(
$("<td>").append(totalSgFlare)
).append(
$("<td>").append(totalDbFlare)
)
$("#skillclassic").append(
$("<td>").append(classicSgFlare + ' (' + classicSgTop30.length + ' / 30)')
+1
View File
@@ -54,3 +54,4 @@ if profile3
div(hidden id='profile3-pass') !{JSON.stringify(profile3)}
div(hidden id='score-pass') !{JSON.stringify(score3)}
script(src="static/js/profile_details.js")
script(src="static/js/common.js")
+84
View File
@@ -0,0 +1,84 @@
//DATA//
profile: DB.FindOne(refid, { collection: "profile" })
profile3: DB.FindOne(refid, { collection: "profile3" })
score3: DB.Find(refid, { collection: "score3" })
-
if profile3
div
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-filter
| Filter Results
.card-content
.score-filter
.field.is-horizontal.has-addons
.field-label.is-normal
label.label Chart Style
.field-body
.control
.select
select(id="style_select" value=0)
option(value=0) SINGLE
option(value=1) DOUBLE
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-fire
| Classic
.card-content
table
thead
tr
th(style="width:10%") #
th(style="width:60%") Title
th(style="width:15%") Difficulty
th(style="width:15%") Flare Skill
tbody#classic_flare
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-fire
| White
.card-content
table
thead
tr
th(style="width:10%") #
th(style="width:60%") Title
th(style="width:15%") Difficulty
th(style="width:15%") Flare Skill
tbody#white_flare
.card
.card-header
p.card-header-title
span.icon
i.mdi.mdi-fire
| Gold
.card-content
table
thead
tr
th(style="width:10%") #
th(style="width:60%") Title
th(style="width:15%") Difficulty
th(style="width:15%") Flare Skill
tbody#gold_flare
div(hidden id='profile3-pass') !{JSON.stringify(profile3)}
div(hidden id='score-pass') !{JSON.stringify(score3)}
script(src="static/js/flaredata.js")
script(src="static/js/common.js")
+1
View File
@@ -3,6 +3,7 @@
score3: DB.Find(refid, { collection: "score3" })
-
link(rel="stylesheet" href="static/css/datatables.css")
if profile3
div