events json update, gene update, arena station 6
This commit is contained in:
+101
-1
@@ -36,7 +36,8 @@ export const EVENT6 = [
|
||||
'MEGAMIX_ENABLE',
|
||||
'VALGENE_ENABLE',
|
||||
'ARENA_ENABLE',
|
||||
'DISP_PASELI_BANNER'
|
||||
'DISP_PASELI_BANNER',
|
||||
'S_PUC_EFFECT_ENABLE'
|
||||
];
|
||||
|
||||
export const INFORMATION6 = {
|
||||
@@ -129,6 +130,21 @@ export const EVENT_SONGS6 = {
|
||||
],
|
||||
"bpl2022_6": [
|
||||
'1947', '1953'
|
||||
],
|
||||
"bpl2022_7": [
|
||||
'1944', '1950'
|
||||
],
|
||||
"bpl2022_8": [
|
||||
'1954', '1945'
|
||||
],
|
||||
"bpl2022_9": [
|
||||
'1942'
|
||||
],
|
||||
"bpl2022_10": [
|
||||
'1940'
|
||||
],
|
||||
"bpl2022_11": [
|
||||
'1939'
|
||||
]
|
||||
}
|
||||
|
||||
@@ -184,6 +200,21 @@ export const RESTRICTED_SONGS6 = {
|
||||
],
|
||||
"bpl2022_6": [
|
||||
'1947', '1953'
|
||||
],
|
||||
"bpl2022_7": [
|
||||
'1944', '1950'
|
||||
],
|
||||
"bpl2022_8": [
|
||||
'1954', '1945'
|
||||
],
|
||||
"bpl2022_9": [
|
||||
'1942'
|
||||
],
|
||||
"bpl2022_10": [
|
||||
'1940'
|
||||
],
|
||||
"bpl2022_11": [
|
||||
'1939'
|
||||
]
|
||||
}
|
||||
|
||||
@@ -634,6 +665,75 @@ export const ARENA = {
|
||||
param: 8,
|
||||
}
|
||||
]
|
||||
},
|
||||
'Set 6 (02/16/23)': {
|
||||
details: {
|
||||
// season: 4,
|
||||
time_start: BigInt(Date.parse('16 Feb 2023 00:00:00 GMT')),
|
||||
time_end: BigInt(Date.parse('31 Dec 2099 23:59:59 GMT')),
|
||||
shop_start: BigInt(Date.parse('16 Feb 2023 00:00:00 GMT')),
|
||||
shop_end: BigInt(Date.parse('31 Dec 2099 23:59:59 GMT')),
|
||||
is_open: 1,
|
||||
is_shop: 1
|
||||
},
|
||||
arena_items: [
|
||||
{
|
||||
catalog_id: 1,
|
||||
catalog_type: 1,
|
||||
price: 8000,
|
||||
item_type: 0,
|
||||
item_id: 1846,
|
||||
param: 23,
|
||||
},
|
||||
{
|
||||
catalog_id: 1,
|
||||
catalog_type: 1,
|
||||
price: 8000,
|
||||
item_type: 0,
|
||||
item_id: 1743,
|
||||
param: 23,
|
||||
},
|
||||
{
|
||||
catalog_id: 1,
|
||||
catalog_type: 1,
|
||||
price: 8000,
|
||||
item_type: 0,
|
||||
item_id: 342,
|
||||
param: 8,
|
||||
},
|
||||
{
|
||||
catalog_id: 1,
|
||||
catalog_type: 1,
|
||||
price: 4000,
|
||||
item_type: 0,
|
||||
item_id: 131,
|
||||
param: 8,
|
||||
},
|
||||
{
|
||||
catalog_id: 1,
|
||||
catalog_type: 1,
|
||||
price: 4000,
|
||||
item_type: 0,
|
||||
item_id: 612,
|
||||
param: 8,
|
||||
},
|
||||
{
|
||||
catalog_id: 1,
|
||||
catalog_type: 1,
|
||||
price: 2000,
|
||||
item_type: 0,
|
||||
item_id: 8,
|
||||
param: 8,
|
||||
},
|
||||
{
|
||||
catalog_id: 1,
|
||||
catalog_type: 1,
|
||||
price: 2000,
|
||||
item_type: 0,
|
||||
item_id: 323,
|
||||
param: 8,
|
||||
}
|
||||
]
|
||||
}
|
||||
// 'debug': {
|
||||
// details: {
|
||||
|
||||
+545
-544
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,8 @@
|
||||
let hiddenEvents = ['xrecord', 'bpl2021', 'bsb2021', 'sdvx10thstamp', 'reflecstamp', 'gmz2022', 'pcbevent', '2023appealstampevent', '11thannivappealstampevent']
|
||||
|
||||
function generateEventToggles(eventInfo, eventConfig) {
|
||||
let cardContent = $('<div class="card-content">')
|
||||
if(!['bpl2022', 'konasute', 'xrecord'].includes(eventInfo['id'])) {
|
||||
if(!['bpl2022', 'konasute'].includes(eventInfo['id'])) {
|
||||
cardContent.append(
|
||||
$('<div class="field is-horizontal">').append(
|
||||
$('<div class="field-label is-normal"><label class="label" for="' + eventInfo['id'] + '">Enable</label></div>')
|
||||
@@ -39,13 +41,12 @@ async function readEventsJsonFile() {
|
||||
}
|
||||
|
||||
async function generateNewEventsConfigFile() {
|
||||
let hiddenEvents = ['bpl2021', 'bsb2021', 'gmz2022', 'pcbevent']
|
||||
let eventConfig = {}
|
||||
let eventData = await readEventsJsonFile()
|
||||
for(const eventIter in eventData['events']) {
|
||||
let hidden = false
|
||||
let toggle = false
|
||||
if(['bpl2022', 'konasute', 'xrecord'].includes(eventData['events'][eventIter]['id'])) {
|
||||
if(['bpl2022', 'konasute'].includes(eventData['events'][eventIter]['id'])) {
|
||||
toggle = {}
|
||||
for(const toggleIter in eventData['events'][eventIter]['info']) {
|
||||
toggle[eventData['events'][eventIter]['id'] + '_' + (parseInt(toggleIter) + 1)] = false
|
||||
@@ -59,7 +60,6 @@ async function generateNewEventsConfigFile() {
|
||||
'toggle': toggle
|
||||
}
|
||||
}
|
||||
console.log(eventConfig)
|
||||
return eventConfig
|
||||
}
|
||||
|
||||
@@ -68,6 +68,14 @@ $(document).ready(async function() {
|
||||
let eventData = await readEventsJsonFile()
|
||||
let eventConfig = await readEventsConfigFile()
|
||||
for(const eventIter in eventData['events']) {
|
||||
|
||||
// NEEDS MORE WORK FOR EVENTS WITH MULTIPLE TOGGLES EACH
|
||||
if(!(eventData['events'][eventIter]['id'] in eventConfig)) {
|
||||
eventConfig[eventData['events'][eventIter]['id']] = {
|
||||
'hidden': hiddenEvents.includes(eventData['events'][eventIter]['id']),
|
||||
'toggle': false
|
||||
}
|
||||
}
|
||||
if(!eventConfig[eventData['events'][eventIter]['id']]['hidden']) {
|
||||
$('div.main').append(
|
||||
$('<header class="card-header"><p class="card-header-title"><span class="icon"><i class="mdi mdi-calendar-clock"></i></span>' + eventData['events'][eventIter]['name'] + '</p></header>')
|
||||
|
||||
@@ -1,168 +1,182 @@
|
||||
function countGeneItems(geneItems, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys) {
|
||||
let obtained = 0, total = 0;
|
||||
if('crew' in geneItems.items) {
|
||||
obtained += items_crew.filter(crew => geneItems.items.crew.includes(crew['id'])).length
|
||||
total += geneItems.items['crew'].length
|
||||
}
|
||||
if('stamp' in geneItems.items) {
|
||||
obtained += items_stamp.filter(stamp => geneItems.items.stamp.includes(stamp['id'] / 4)).length
|
||||
total += geneItems.items['stamp'].length
|
||||
}
|
||||
if('subbg' in geneItems.items) {
|
||||
obtained += items_subbg.filter(subbg => geneItems.items.subbg.includes(subbg['id'])).length
|
||||
total += geneItems.items['subbg'].length
|
||||
}
|
||||
if('bgm' in geneItems.items) {
|
||||
obtained += items_bgm.filter(bgm => geneItems.items.bgm.includes(bgm['id'])).length
|
||||
total += geneItems.items['bgm'].length
|
||||
}
|
||||
if('nemsys' in geneItems.items) {
|
||||
obtained += items_nemsys.filter(nemsys => geneItems.items.nemsys.includes(nemsys['id'])).length
|
||||
total += geneItems.items['nemsys'].length
|
||||
}
|
||||
|
||||
return [obtained, total]
|
||||
}
|
||||
|
||||
function loadImages(itemList, itemType, userItems) {
|
||||
itemList.forEach(item => {
|
||||
let itemBrightness = userItems.find(userItem => userItem.id == ((itemType !== 'stamp') ? item : (item * 4))) != undefined ? 1 : 0.25
|
||||
let imageUrl = 'static/asset/valgene_item/item_' + itemType + '_' + item + '.png'
|
||||
$.get(imageUrl, function(data, textStatus) {
|
||||
if (textStatus == "success") {
|
||||
$('.' + itemType + '-items').append('<img style="width: 350px; padding: 10px; filter: brightness(' + itemBrightness + ')" src=' + imageUrl + '>')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async function getGeneratorEditionItems(gene_edition, itemSet) {
|
||||
let valGeneData = await $.getJSON( "static/asset/json/valgene_data.json", function(data) {
|
||||
return data
|
||||
})
|
||||
if(gene_edition === 'valkyrie') {
|
||||
return valGeneData.valgene[itemSet - 1]
|
||||
} else {
|
||||
return valGeneData.pregene[itemSet - 1]
|
||||
}
|
||||
}
|
||||
|
||||
async function loadItems(itemSet, gene_edition, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys) {
|
||||
let geneItems = await getGeneratorEditionItems(gene_edition, itemSet)
|
||||
let itemCounts = countGeneItems(geneItems, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys)
|
||||
if(itemCounts[0] >= itemCounts[1]) $('#pregene-roll').attr('disabled', 'disabled')
|
||||
else $('#pregene-roll').removeAttr('disabled')
|
||||
|
||||
$('.count').text('Unlocked items: ' + itemCounts[0] + "/" + itemCounts[1])
|
||||
if(itemSet === 1) {
|
||||
$('.setinfo').append('<p class="jpn-excl" style="padding:5px">These items are only usable in Japan. Change region to Japan in the ea3-config.xml file.</p>')
|
||||
} else {
|
||||
$('.jpn-excl').remove()
|
||||
}
|
||||
|
||||
if('crew' in geneItems.items) {
|
||||
$('.item_banners').append('<div style="padding: 5px"><h3>Nemsys Crew</h3></div>')
|
||||
$('.item_banners').append('<div class=crew-items style="text-align: center; background-color: #3a3a3a; padding: 20px; border-radius: 6px;"></div><br>')
|
||||
loadImages(geneItems.items['crew'].sort(function(a, b){return parseInt(a.id) - parseInt(b.id)}), 'crew', items_crew)
|
||||
}
|
||||
|
||||
if('stamp' in geneItems.items) {
|
||||
$('.item_banners').append('<div style="padding: 5px"><h3>Appeal Stamp</h3></div>')
|
||||
$('.item_banners').append('<div class=stamp-items style="text-align: center; background-color: #3a3a3a; padding: 20px; border-radius: 6px;"></div><br>')
|
||||
loadImages(geneItems.items['stamp'].sort(function(a, b){return parseInt(a.id) - parseInt(b.id)}), 'stamp', items_stamp)
|
||||
}
|
||||
|
||||
if('subbg' in geneItems.items) {
|
||||
$('.item_banners').append('<div style="padding: 5px"><h3>Submonitor BG</h3></div>')
|
||||
$('.item_banners').append('<div class=bg-items style="text-align: center; background-color: #3a3a3a; padding: 20px; border-radius: 6px;"></div><br>')
|
||||
loadImages(geneItems.items['subbg'].sort(function(a, b){return parseInt(a.id) - parseInt(b.id)}), 'bg', items_subbg)
|
||||
}
|
||||
|
||||
if('bgm' in geneItems.items) {
|
||||
$('.item_banners').append('<div style="padding: 5px"><h3>BGM</h3></div>')
|
||||
$('.item_banners').append('<div class=bgm-items style="text-align: center; background-color: #3a3a3a; padding: 20px; border-radius: 6px;"></div><br>')
|
||||
loadImages(geneItems.items['bgm'].sort(function(a, b){return parseInt(a.id) - parseInt(b.id)}), 'bgm', items_bgm)
|
||||
}
|
||||
|
||||
if('nemsys' in geneItems.items) {
|
||||
$('.item_banners').append('<div style="padding: 5px"><h3>Nemsys</h3></div>')
|
||||
$('.item_banners').append('<div class=nemsys-items style="text-align: center; background-color: #3a3a3a; padding: 20px; border-radius: 6px;"></div><br>')
|
||||
loadImages(geneItems.items['nemsys'].sort(function(a, b){return parseInt(a.id) - parseInt(b.id)}), 'nemsys', items_nemsys)
|
||||
}
|
||||
}
|
||||
|
||||
async function loadValgeneData(gene_edition) {
|
||||
let valGeneData = await $.getJSON( "static/asset/json/valgene_data.json", function(data) {
|
||||
return data
|
||||
})
|
||||
if(gene_edition === 'valkyrie') {
|
||||
for(const valGeneDataIndex in valGeneData.valgene) {
|
||||
$('#set_select').append('<option value=' + valGeneData.valgene[valGeneDataIndex].id + '>' + valGeneData.valgene[valGeneDataIndex].name + '</option>')
|
||||
}
|
||||
} else {
|
||||
for(const pregeneDataIndex in valGeneData.pregene) {
|
||||
$('#set_select').append('<option value=' + valGeneData.pregene[pregeneDataIndex].id + '>' + valGeneData.pregene[pregeneDataIndex].name + '</option>')
|
||||
}
|
||||
}
|
||||
$('#set_select').val($("#set_select option").length)
|
||||
}
|
||||
|
||||
$(document).ready(async function() {
|
||||
if(document.getElementById("data-pass-unlock-all").innerText === 'true') {
|
||||
$('.card-content').text("The \"Unlock All Valkyrie and Premium Items\" option is enabled. You wouldn't need this.")
|
||||
$('#pregene-roll').attr('disabled')
|
||||
return 0;
|
||||
}
|
||||
|
||||
$('#roll-result').on('click', function(){location.reload()})
|
||||
|
||||
$('html').keypress(function(e){
|
||||
if([13, 27, 32].includes(e.keyCode) && $('.modal.is-active').length > 0) {
|
||||
location.reload()
|
||||
}
|
||||
})
|
||||
|
||||
$('.input').hide()
|
||||
$('.button').addClass('is-link')
|
||||
let refid = document.getElementsByName("refid")[0].value
|
||||
let items_crew = JSON.parse(document.getElementById("data-pass-crew").innerText);
|
||||
let items_stamp = JSON.parse(document.getElementById("data-pass-stamp").innerText);
|
||||
let items_subbg = JSON.parse(document.getElementById("data-pass-subbg").innerText);
|
||||
let items_bgm = JSON.parse(document.getElementById("data-pass-bgm").innerText);
|
||||
let items_nemsys = JSON.parse(document.getElementById("data-pass-nemsys").innerText);
|
||||
let gene_edition = document.getElementById("generator-edition").innerText;
|
||||
await loadValgeneData(gene_edition)
|
||||
loadItems($('#set_select').val(), gene_edition, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys)
|
||||
|
||||
$('#set_select').change(function() {
|
||||
$('.count').text('')
|
||||
$('.item_banners').empty()
|
||||
loadItems(parseInt($('#set_select').val()), gene_edition, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys)
|
||||
})
|
||||
|
||||
$('#pregene-roll').on('click', async function() {
|
||||
$('#pregene-roll').attr('disabled', 'disabled')
|
||||
if(gene_edition === 'premium' && window.location.search.match(/(premium)/g) != undefined) {
|
||||
let geneItems = await getGeneratorEditionItems(gene_edition, parseInt($('#set_select').val()))
|
||||
if(countGeneItems(geneItems, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys)[0] >= countGeneItems(geneItems, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys)[1]) {
|
||||
alert("All items have been unlocked already.")
|
||||
} else {
|
||||
emit('preGeneRoll', {
|
||||
set: parseInt(document.getElementById('set_select').value),
|
||||
refid: refid,
|
||||
items: items_crew.concat(items_stamp, items_subbg, items_bgm, items_nemsys)
|
||||
}).then(
|
||||
function() {
|
||||
$.getJSON("static/asset/logs/preGeneRollResult.json", function(data) {
|
||||
$('.modal-card-head').append('<p class="modal-card-title">Rolled item!</p>')
|
||||
$('.modal-card-body').append('<img style="width: 400px; padding: 10px;" src="static/asset/valgene_item/item_' + data.type + '_' + data.id + '.png">')
|
||||
$('.modal-card-foot').append('<button onclick=location.reload(); class="button is-primary">Close</button>')
|
||||
$('.modal').addClass('is-active')
|
||||
})
|
||||
})
|
||||
}
|
||||
} else {
|
||||
alert("Not premium generator: a precaution")
|
||||
}
|
||||
})
|
||||
})
|
||||
function countGeneItems(geneItems, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys) {
|
||||
let obtained = 0, total = 0;
|
||||
if('crew' in geneItems.items) {
|
||||
obtained += items_crew.filter(crew => geneItems.items.crew.includes(crew['id'])).length
|
||||
total += geneItems.items['crew'].length
|
||||
}
|
||||
if('stamp' in geneItems.items) {
|
||||
obtained += items_stamp.filter(stamp => geneItems.items.stamp.includes(stamp['id'] / 4)).length
|
||||
total += geneItems.items['stamp'].length
|
||||
}
|
||||
if('subbg' in geneItems.items) {
|
||||
obtained += items_subbg.filter(subbg => geneItems.items.subbg.includes(subbg['id'])).length
|
||||
total += geneItems.items['subbg'].length
|
||||
}
|
||||
if('bgm' in geneItems.items) {
|
||||
obtained += items_bgm.filter(bgm => geneItems.items.bgm.includes(bgm['id'])).length
|
||||
total += geneItems.items['bgm'].length
|
||||
}
|
||||
if('nemsys' in geneItems.items) {
|
||||
obtained += items_nemsys.filter(nemsys => geneItems.items.nemsys.includes(nemsys['id'])).length
|
||||
total += geneItems.items['nemsys'].length
|
||||
}
|
||||
|
||||
return [obtained, total]
|
||||
}
|
||||
|
||||
function loadImages(itemList, itemType, userItems) {
|
||||
itemList.forEach(item => {
|
||||
let itemBrightness = userItems.find(userItem => userItem.id == ((itemType !== 'stamp') ? item : (item * 4))) != undefined ? 1 : 0.25
|
||||
let imageUrl = 'static/asset/valgene_item/item_' + itemType + '_' + item + '.png'
|
||||
$.get(imageUrl, function(data, textStatus) {
|
||||
if (textStatus == "success") {
|
||||
$('.' + itemType + '-items').append('<img style="width: 350px; padding: 10px; filter: brightness(' + itemBrightness + ')" src=' + imageUrl + '>')
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async function getGeneratorEditionItems(gene_edition, itemSet) {
|
||||
let valGeneData = await $.getJSON( "static/asset/json/valgene_data.json", function(data) {
|
||||
return data
|
||||
})
|
||||
if(gene_edition === 'valkyrie') {
|
||||
return valGeneData.valgene[itemSet - 1]
|
||||
} else {
|
||||
return valGeneData.pregene[itemSet - 1]
|
||||
}
|
||||
}
|
||||
|
||||
async function loadItems(itemSet, gene_edition, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys) {
|
||||
console.log(gene_edition)
|
||||
let geneItems = await getGeneratorEditionItems(gene_edition, itemSet)
|
||||
let itemCounts = countGeneItems(geneItems, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys)
|
||||
if(gene_edition === 'premium') {
|
||||
console.log('naur')
|
||||
if(itemCounts[0] >= itemCounts[1]) $('#pregene-roll').attr('disabled', 'disabled')
|
||||
else $('#pregene-roll').removeAttr('disabled')
|
||||
} else if(gene_edition === 'valkyrie') {
|
||||
console.log('yes1')
|
||||
if(itemSet >= 1 && itemSet <= 5) {
|
||||
console.log('yes2')
|
||||
if(itemCounts[0] >= itemCounts[1]) $('#valgene-roll').attr('disabled', 'disabled')
|
||||
else $('#valgene-roll').removeAttr('disabled')
|
||||
} else $('#valgene-roll').attr('disabled', 'disabled')
|
||||
}
|
||||
|
||||
|
||||
$('.count').text('Unlocked items: ' + itemCounts[0] + "/" + itemCounts[1])
|
||||
if(itemSet === 1) {
|
||||
$('.setinfo').append('<p class="jpn-excl" style="padding:5px">These items are only usable in Japan. Change region to Japan in the ea3-config.xml file.</p>')
|
||||
} else {
|
||||
$('.jpn-excl').remove()
|
||||
}
|
||||
|
||||
if('crew' in geneItems.items) {
|
||||
$('.item_banners').append('<div style="padding: 5px"><h3>Nemsys Crew</h3></div>')
|
||||
$('.item_banners').append('<div class=crew-items style="text-align: center; background-color: #3a3a3a; padding: 20px; border-radius: 6px;"></div><br>')
|
||||
loadImages(geneItems.items['crew'].sort(function(a, b){return parseInt(a.id) - parseInt(b.id)}), 'crew', items_crew)
|
||||
}
|
||||
|
||||
if('stamp' in geneItems.items) {
|
||||
$('.item_banners').append('<div style="padding: 5px"><h3>Appeal Stamp</h3></div>')
|
||||
$('.item_banners').append('<div class=stamp-items style="text-align: center; background-color: #3a3a3a; padding: 20px; border-radius: 6px;"></div><br>')
|
||||
loadImages(geneItems.items['stamp'].sort(function(a, b){return parseInt(a.id) - parseInt(b.id)}), 'stamp', items_stamp)
|
||||
}
|
||||
|
||||
if('subbg' in geneItems.items) {
|
||||
$('.item_banners').append('<div style="padding: 5px"><h3>Submonitor BG</h3></div>')
|
||||
$('.item_banners').append('<div class=bg-items style="text-align: center; background-color: #3a3a3a; padding: 20px; border-radius: 6px;"></div><br>')
|
||||
loadImages(geneItems.items['subbg'].sort(function(a, b){return parseInt(a.id) - parseInt(b.id)}), 'bg', items_subbg)
|
||||
}
|
||||
|
||||
if('bgm' in geneItems.items) {
|
||||
$('.item_banners').append('<div style="padding: 5px"><h3>BGM</h3></div>')
|
||||
$('.item_banners').append('<div class=bgm-items style="text-align: center; background-color: #3a3a3a; padding: 20px; border-radius: 6px;"></div><br>')
|
||||
loadImages(geneItems.items['bgm'].sort(function(a, b){return parseInt(a.id) - parseInt(b.id)}), 'bgm', items_bgm)
|
||||
}
|
||||
|
||||
if('nemsys' in geneItems.items) {
|
||||
$('.item_banners').append('<div style="padding: 5px"><h3>Nemsys</h3></div>')
|
||||
$('.item_banners').append('<div class=nemsys-items style="text-align: center; background-color: #3a3a3a; padding: 20px; border-radius: 6px;"></div><br>')
|
||||
loadImages(geneItems.items['nemsys'].sort(function(a, b){return parseInt(a.id) - parseInt(b.id)}), 'nemsys', items_nemsys)
|
||||
}
|
||||
}
|
||||
|
||||
async function loadValgeneData(gene_edition) {
|
||||
let valGeneData = await $.getJSON( "static/asset/json/valgene_data.json", function(data) {
|
||||
return data
|
||||
})
|
||||
if(gene_edition === 'valkyrie') {
|
||||
for(const valGeneDataIndex in valGeneData.valgene) {
|
||||
$('#set_select').append('<option value=' + valGeneData.valgene[valGeneDataIndex].id + '>' + valGeneData.valgene[valGeneDataIndex].name + '</option>')
|
||||
}
|
||||
} else {
|
||||
for(const pregeneDataIndex in valGeneData.pregene) {
|
||||
$('#set_select').append('<option value=' + valGeneData.pregene[pregeneDataIndex].id + '>' + valGeneData.pregene[pregeneDataIndex].name + '</option>')
|
||||
}
|
||||
}
|
||||
$('#set_select').val($("#set_select option").length)
|
||||
}
|
||||
|
||||
$(document).ready(async function() {
|
||||
if(document.getElementById("data-pass-unlock-all").innerText === 'true') {
|
||||
$('.card-content').text("The \"Unlock All Valkyrie and Premium Items\" option is enabled. You wouldn't need this.")
|
||||
$('#pregene-roll').attr('disabled')
|
||||
return 0;
|
||||
}
|
||||
|
||||
$('#roll-result').on('click', function(){location.reload()})
|
||||
|
||||
$('html').keypress(function(e){
|
||||
if([13, 27, 32].includes(e.keyCode) && $('.modal.is-active').length > 0) {
|
||||
location.reload()
|
||||
}
|
||||
})
|
||||
|
||||
$('.input').hide()
|
||||
$('.button').addClass('is-link')
|
||||
let refid = document.getElementsByName("refid")[0].value
|
||||
let items_crew = JSON.parse(document.getElementById("data-pass-crew").innerText);
|
||||
let items_stamp = JSON.parse(document.getElementById("data-pass-stamp").innerText);
|
||||
let items_subbg = JSON.parse(document.getElementById("data-pass-subbg").innerText);
|
||||
let items_bgm = JSON.parse(document.getElementById("data-pass-bgm").innerText);
|
||||
let items_nemsys = JSON.parse(document.getElementById("data-pass-nemsys").innerText);
|
||||
let gene_edition = document.getElementById("generator-edition").innerText;
|
||||
await loadValgeneData(gene_edition)
|
||||
loadItems($('#set_select').val(), gene_edition, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys)
|
||||
|
||||
$('#set_select').change(function() {
|
||||
$('.count').text('')
|
||||
$('.item_banners').empty()
|
||||
loadItems(parseInt($('#set_select').val()), gene_edition, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys)
|
||||
})
|
||||
|
||||
$('#pregene-roll, #valgene-roll').on('click', async function() {
|
||||
console.log('cliucked')
|
||||
$('#pregene-roll, #valgene-roll').attr('disabled', 'disabled')
|
||||
if(gene_edition === 'premium' && window.location.search.match(/(premium)/g) != undefined) {
|
||||
let geneItems = await getGeneratorEditionItems(gene_edition, parseInt($('#set_select').val()))
|
||||
if(countGeneItems(geneItems, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys)[0] >= countGeneItems(geneItems, items_crew, items_stamp, items_subbg, items_bgm, items_nemsys)[1]) {
|
||||
alert("All items have been unlocked already.")
|
||||
} else {
|
||||
emit('preGeneRoll', {
|
||||
set: parseInt(document.getElementById('set_select').value),
|
||||
refid: refid,
|
||||
geneEdition: gene_edition,
|
||||
items: items_crew.concat(items_stamp, items_subbg, items_bgm, items_nemsys)
|
||||
}).then(
|
||||
function() {
|
||||
$.getJSON("static/asset/logs/preGeneRollResult.json", function(data) {
|
||||
$('.modal-card-head').append('<p class="modal-card-title">Rolled item!</p>')
|
||||
$('.modal-card-body').append('<img style="width: 400px; padding: 10px;" src="static/asset/valgene_item/item_' + data.type + '_' + data.id + '.png">')
|
||||
$('.modal-card-foot').append('<button onclick=location.reload(); class="button is-primary">Close</button>')
|
||||
$('.modal').addClass('is-active')
|
||||
})
|
||||
})
|
||||
}
|
||||
} else {
|
||||
alert("Not premium generator: a precaution")
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -4,10 +4,7 @@
|
||||
"id": "xrecord",
|
||||
"in_game_event": false,
|
||||
"name": "X-record",
|
||||
"info": [
|
||||
"1st set of songs from X-record; originally unlocked by playing either SOUND VOLTEX on the Valkyrie model, or beatmaniaIIDX on the Lightning model.<br>Enable this option to have them automatically unlocked and saved to your account.",
|
||||
"2nd set of songs from X-record; originally unlocked by playing either SOUND VOLTEX on the Valkyrie model, or beatmaniaIIDX on the Lightning model.<br>Enable this option to have them automatically unlocked and saved to your account."
|
||||
]
|
||||
"info": "1st set of songs from X-record; originally unlocked by playing either SOUND VOLTEX on the Valkyrie model, or beatmaniaIIDX on the Lightning model.<br>Enable this option to activate this event.<br>(imho all cross events like this should be in a separate asphyxia plugin altogether)"
|
||||
},
|
||||
{
|
||||
"id": "konasute",
|
||||
@@ -25,50 +22,67 @@
|
||||
"id": "bpl2021",
|
||||
"in_game_event": false,
|
||||
"name": "BPL応援 楽曲解禁スタンプラリー (BPL ouen gakkyoku kaikin stamp rally)",
|
||||
"info": "Songs in this event are originally unlocked by accessing the official BEMANI PRO LEAGUE 2021 website and obtaining the stamp by watching VODs of the BPL competition.<br>Enable this option to have them unlocked and saved to your account."
|
||||
"info": "Songs in this event are originally unlocked by accessing the official BEMANI PRO LEAGUE 2021 website and obtaining the stamp by watching VODs of the BPL competition.<br>Enable this option to activate this event."
|
||||
},
|
||||
{
|
||||
"id": "bsb2021",
|
||||
"in_game_event": false,
|
||||
"name": "BEMANI 2021真夏の歌合戦5番勝負 (BEMANI 2021 manatsu no utagassen 5 ban shoubu)",
|
||||
"info": "This is a cross-BEMANI event. Songs are originally unlocked by playing participating BEMANI games and earn 'Yell' points.<br>Enable this option to have the songs unlocked and saved to your account."
|
||||
"info": "This is a cross-BEMANI event. Songs are originally unlocked by playing participating BEMANI games and earn 'Yell' points.<br>Enable this option to activate this event."
|
||||
},
|
||||
{
|
||||
"id": "sdvx10thstamp",
|
||||
"in_game_event": true,
|
||||
"name": "SOUND VOLTEX 10th Anniversary",
|
||||
"info": "Stamp event to unlock 7 songs.<br>Enable this option to enable this stamp event."
|
||||
"info": "Stamp event to unlock 7 songs.<br>Enable this option to enable this stamp event in-game."
|
||||
},
|
||||
{
|
||||
"id": "reflecstamp",
|
||||
"in_game_event": true,
|
||||
"name": "REFLEC BEAT Song Stamp Event",
|
||||
"info": "Stamp event to unlock 5 songs originally from the REFLEC BEAT game.<br>Enable this option to enable this stamp event."
|
||||
"info": "Stamp event to unlock 5 songs originally from the REFLEC BEAT game.<br>Enable this option to enable this stamp event in-game."
|
||||
},
|
||||
{
|
||||
"id": "gmz2022",
|
||||
"in_game_event": false,
|
||||
"name": "いちかのごちゃまぜMix UP! (Ichika no gochamaze Mix UP! )",
|
||||
"info": "This is a cross-BEMANI event. Songs include some that are shared from other BEMANI games and some that are mashup/remixes of the shared songs. These are originally unlocked by playing participating BEMANI games and earning points to fill different gauges.<br><br>Enable this option to have the songs unlocked and saved to your account."
|
||||
"info": "This is a cross-BEMANI event. Songs include some that are shared from other BEMANI games and some that are mashup/remixes of the shared songs. These are originally unlocked by playing participating BEMANI games and earning points to fill different gauges.<br><br>Enable this option to activate this event."
|
||||
},
|
||||
{
|
||||
"id": "bpl2022",
|
||||
"in_game_event": false,
|
||||
"name": "BEMANI PRO LEAGUE -SEASON 2-! Original Song",
|
||||
"info": [
|
||||
"Enable this option to have songs from the 1st week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Enable this option to have songs from the 2nd week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Enable this option to have songs from the 3rd week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Enable this option to have songs from the 4th week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Enable this option to have songs from the 5th week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Enable this option to have songs from the 6th week unlocked on the next login.<br>Otherwise, the songs are still unlockable through BLASTER GATE."
|
||||
"Week 1 songs: 'Chat perché' and 'WINNING ROAD'<br>Enable this option to have these songs unlocked on the next login. Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Week 2 songs: 'ENDGAME' and 'ИADIR'<br>Enable this option to have these songs unlocked on the next login. Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Week 3 songs: 'Ice Fortress' and 'MURASAME'<br>Enable this option to have these songs unlocked on the next login. Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Week 4 songs: 'Initiating League' and 'Scat Jazz Dance'<br>Enable this option to have these songs unlocked on the next login. Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Week 5 songs: '最果ての勇者にラブソングを' and '灼ナル刃、破カヰ譜'<br>Enable this option to have these songs unlocked on the next login. Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Week 6 songs: 'Fl0ating:' and 'Petit espoir'<br>Enable this option to have these songs unlocked on the next login. Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Week 7 songs: 'Paradigm Shift' and 'イグノアザーズ'<br>Enable this option to have these songs unlocked on the next login. Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Week 8 songs: 'Thousand Triggers' and 'trea→journey'<br>Enable this option to have these songs unlocked on the next login. Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Week 9 songs: 'MILITARY R04D'<br>Enable this option to have this song unlocked on the next login. Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Week 10 songs: 'DEUX EX MĀXHINĀ'<br>Enable this option to have this song unlocked on the next login. Otherwise, the songs are still unlockable through BLASTER GATE.",
|
||||
"Week 11 songs: 'All We Need is HAPPY END!!!'<br>Enable this option to have this song unlocked on the next login. Otherwise, the songs are still unlockable through BLASTER GATE."
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "pcbevent",
|
||||
"in_game_event": true,
|
||||
"name": "PCB Stamp Event",
|
||||
"info": "Stamp event to earn PCB.<br>Enable this option to enable this stamp event."
|
||||
"info": "Stamp event to earn PCB.<br>Enable this option to activate this stamp event in-game."
|
||||
},
|
||||
{
|
||||
"id": "2023appealstampevent",
|
||||
"in_game_event": true,
|
||||
"name": "新春スタンプボーナス (2023 New Year Stamp Bonus Event)",
|
||||
"info": "Stamp event to unlock a special appeal card to commemorate the new year (2023).<br>Enable this option to activate this stamp event in-game."
|
||||
},
|
||||
{
|
||||
"id": "11thannivappealstampevent",
|
||||
"in_game_event": true,
|
||||
"name": "11周年記念スタンプ (SDVX 11th Anniversary Appeal Card Stamp Bonus Event)",
|
||||
"info": "Stamp event to unlock a special appeal card to commemorate the 11th anniversary of SOUND VOLTEX.<br>Enable this option to activate this stamp event in-game."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -35,7 +35,7 @@ div
|
||||
.select
|
||||
select(name="set_select" id="set_select")
|
||||
// option(value="1") Premium Generator 1 (Aqua Set)
|
||||
div(style="padding: 15px; text-align: center;")
|
||||
div(id="roll-div" style="padding: 15px; text-align: center;")
|
||||
div.setinfo(style="padding: 5px")
|
||||
h3.count()
|
||||
input.input(type="text" name="refid", value=refid readonly)
|
||||
|
||||
@@ -28,10 +28,11 @@ div
|
||||
.control
|
||||
.select
|
||||
select(name="set_select" id="set_select")
|
||||
div(style="padding: 15px; text-align: center;")
|
||||
div(id="roll-div" style="padding: 15px; text-align: center;")
|
||||
div(style="padding: 5px")
|
||||
h3.count()
|
||||
input.input(type="text" name="refid", value=refid readonly)
|
||||
button.button(id="valgene-roll" style="font-size: 20px") Roll
|
||||
br()
|
||||
div.item_banners()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user