MuniiiiMuni

advanced
sigonasr2, Sig, Sigo 4 years ago committed by GitHub
commit a4ac40ab02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 107
      english.js
  2. 107
      japanese.js
  3. 2
      muni.css
  4. 132
      muni.js
  5. 35
      parkingcalc.html

@ -0,0 +1,107 @@
function English(str) {
switch (str) {
case 1:{ //Tab Title of Webpage
return "D4DJ Parkings Calculator | Powered by Muni"
}break;
case 2:{ //Header Title (Top) of Webpage
return "D4DJ Event Parking Calculator"
}break;
case 3:{ //Set up your options (Category Title)
return "Parking Configuration"
}break;
case 4:{ //Selection for event type: Poker/Raid
return "Poker/Raid"
}break;
case 5:{ //Selection for event type: Bingo
return "Bingo"
}break;
case 6:{ //Selection for event type: Medley
return "Medley"
}break;
case 7:{ //Label for team % selector (Include ":")
return "Event Team Bonus:"
}break;
case 17:{ //Label for whether to enable flexible team options.
return "Flexible Team?"
}break;
case 8:{ //Tooltip for flexible team options (mouseover)
return "If turned on, calculates scoring options using lower % teams also."
}break;
case 18:{ //Label for what the max score in free lives is.
return "Max Free Live Score:"
}break;
case 9:{ //Tooltip for what the max score in free lives is. (Setting it to 0 forces the calculator to use Rehearsal)
return "The maximum score you can get from playing a song using <font color=\"aqua\">Free Live</font>.<br><sub>(Use 0 for Rehearsals Only)</sub>"
}break;
case 10:{ //Label for Advanced Settings toggle.
return "Advanced Options?"
}break;
case 11:{ //Tooltip for Advanced Settings toggle.
return "Enable voltage & EP limits."
}break;
case 12:{ //Label for setting the lowest EP where voltage is allowed.
return "Use voltage until: "
}break;
case 13:{ //Label for setting the total amount of voltage the calculator may consume.
return "Max Voltage to use:"
}break;
case 14:{ //Label for setting the Starting EP amount.
return "Starting EP:"
}break;
case 15:{ //Label for setting the final EP amount.
return "Target EP:"
}break;
case 16:{ //The text for the button users click to run the calculator.
return "Calculate"
}break;
case 19:{ //Tip: Here's the Light on EX or Synchrogazer on Hard/EX difficulty are some of the highest scoring songs you can pick.
return "Here's the Light on EX or Synchrogazer on Hard/EX difficulty are some of the highest scoring songs you can pick."
}break;
case 20:{ //Tip: When you get close to the score you need in Free Live, purposely fail the song. Notes are worth 10% their normal value when you have 0 health so you can finish easily.
return "When you get close to the score you need in Free Live, purposely fail the song. Notes are worth 10% their normal value when you have 0 health so you can finish easily."
}break;
case 21:{ //Tip: The "Flexible Team" option gives you the fastest park, but at the expense of more voltage.
return "The <b>\"Flexible Team\"</b> option gives you the fastest park, but at the expense of more voltage."
}break;
case "%INITIAL%":{ //This message is the first thing to display for a normal calculation.
//Sample message:
/*
Calculating from 100000 to 104000 for event type Poker/Raid...
(All games are done in Free Live)
Found a park! 9 steps and 13 voltage required!
*/
//Variables for this message:
/*
Calculating from %START% to %TARGET% for event type %EVENT%...
(All games are done in Free Live)
Found a park! %STEPS% step%PLURAL_STEPS% and %VOLTAGE% voltage required!
*/
return "Calculating from %START% to %TARGET% for event type %EVENT%...\n\t(All games are done in Free Live)\n\nFound a park! %STEPS% step%PLURAL_STEPS% and %VOLTAGE% voltage required!"
}break;
case "%STEP%":{ //This message is displayed for each normal voltage step in the process.
//Sample message:
/*
Step 1) Using 5 voltage w/160% team, score between 640000~649999 pts. EP +1480. Remaining:2520 EP
*/
//Variables for this message:
/*
Step %STEP%) Using %VOLTAGE% voltage w/%PERCENT%% team, score between %LOWSCORE%~%HIGHSCORE% pts. EP +%EPGAIN%. Remaining:%REMAINING% EP
*/
return "Step %STEP%) Using %VOLTAGE% voltage w/%PERCENT%% team, score between %LOWSCORE%~%HIGHSCORE% pts. EP +%EPGAIN%. Remaining:%REMAINING% EP"
}break;
case "%REHEARSAL%":{ //Similar to above, but for a rehearsal step instead.
return "Step %STEP%) Use Rehearsal w/%PERCENT%% team. EP +%EPGAIN%. Remaining:%REMAINING% EP"
}break;
case "%LARGEGAP%":{ //This message is displayed if the Starting EP and Final EP gap is too big for reasonable calculations.
return "Get closer to target score before using parking calculator!";
}break;
case "%FAILED%":{ //This message is displayed if it's impossible to park.
return "Impossible to park using this team!"
}break;
default:{
return "???"
}
}
}

@ -0,0 +1,107 @@
function Japanese(str) {
switch (str) {
case 1:{ //Tab Title of Webpage
return "D4DJ Parking Calculator | Powered by Muni"
}break;
case 2:{ //Header Title (Top) of Webpage
return "D4DJ Event Parking Calculator"
}break;
case 3:{ //Set up your options (Category Title)
return "Parking Configuration"
}break;
case 4:{ //Selection for event type: Poker/Raid
return "Poker/Raid"
}break;
case 5:{ //Selection for event type: Bingo
return "Bingo"
}break;
case 6:{ //Selection for event type: Medley
return "Medley"
}break;
case 7:{ //Label for team % selector (Include ":")
return "Event Team Bonus:"
}break;
case 17:{ //Label for whether to enable flexible team options.
return "Flexible Team?"
}break;
case 8:{ //Tooltip for flexible team options (mouseover)
return "If turned on, calculates scoring options using lower % teams also."
}break;
case 18:{ //Label for what the max score in free lives is.
return "Max Free Live Score:"
}break;
case 9:{ //Tooltip for what the max score in free lives is. (Setting it to 0 forces the calculator to use Rehearsal)
return "The maximum score you can get from playing a song using <font color=\"aqua\">Free Live</font>.<br><sub>(Use 0 for Rehearsals Only)</sub>"
}break;
case 10:{ //Label for Advanced Settings toggle.
return "Advanced Options?"
}break;
case 11:{ //Tooltip for Advanced Settings toggle.
return "Enable voltage & EP limits."
}break;
case 12:{ //Label for setting the lowest EP where voltage is allowed.
return "Use voltage until: "
}break;
case 13:{ //Label for setting the total amount of voltage the calculator may consume.
return "Max Voltage to use:"
}break;
case 14:{ //Label for setting the Starting EP amount.
return "Starting EP:"
}break;
case 15:{ //Label for setting the final EP amount.
return "Target EP:"
}break;
case 16:{ //The text for the button users click to run the calculator.
return "Calculate"
}break;
case 19:{ //Tip: Here's the Light on EX or Synchrogazer on Hard/EX difficulty are some of the highest scoring songs you can pick.
return "Here's the Light on EX or Synchrogazer on Hard/EX difficulty are some of the highest scoring songs you can pick."
}break;
case 20:{ //Tip: When you get close to the score you need in Free Live, purposely fail the song. Notes are worth 10% their normal value when you have 0 health so you can finish easily.
return "When you get close to the score you need in Free Live, purposely fail the song. Notes are worth 10% their normal value when you have 0 health so you can finish easily."
}break;
case 21:{ //Tip: The "Flexible Team" option gives you the fastest park, but at the expense of more voltage.
return "The <b>\"Flexible Team\"</b> option gives you the fastest park, but at the expense of more voltage."
}break;
case "%INITIAL%":{ //This message is the first thing to display for a normal calculation.
//Sample message:
/*
Calculating from 100000 to 104000 for event type Poker/Raid...
(All games are done in Free Live)
Found a park! 9 steps and 13 voltage required!
*/
//Variables for this message:
/*
Calculating from %START% to %TARGET% for event type %EVENT%...
(All games are done in Free Live)
Found a park! %STEPS% step%PLURAL_STEPS% and %VOLTAGE% voltage required!
*/
return "Calculating from %START% to %TARGET% for event type %EVENT%...\n\t(All games are done in Free Live)\n\nFound a park! %STEPS% step%PLURAL_STEPS% and %VOLTAGE% voltage required!"
}break;
case "%STEP%":{ //This message is displayed for each normal voltage step in the process.
//Sample message:
/*
Step 1) Using 5 voltage w/160% team, score between 640000~649999 pts. EP +1480. Remaining:2520 EP
*/
//Variables for this message:
/*
Step %STEP%) Using %VOLTAGE% voltage w/%PERCENT%% team, score between %LOWSCORE%~%HIGHSCORE% pts. EP +%EPGAIN%. Remaining:%REMAINING% EP
*/
return "Step %STEP%) Using %VOLTAGE% voltage w/%PERCENT%% team, score between %LOWSCORE%~%HIGHSCORE% pts. EP +%EPGAIN%. Remaining:%REMAINING% EP"
}break;
case "%REHEARSAL%":{ //Similar to above, but for a rehearsal step instead.
return "Step %STEP%) Use Rehearsal w/%PERCENT%% team. EP +%EPGAIN%. Remaining:%REMAINING% EP"
}break;
case "%LARGEGAP%":{ //This message is displayed if the Starting EP and Final EP gap is too big for reasonable calculations.
return "Get closer to target score before using parking calculator!";
}break;
case "%FAILED%":{ //This message is displayed if it's impossible to park.
return "Impossible to park using this team!"
}break;
default:{ //Default to English when translation doesn't exist.
return English(str)
}
}
}

@ -91,4 +91,4 @@ textarea:disabled {
.munigrid:nth-child(even){
border-left:none;
border-right:none;
}
}

@ -1,125 +1,4 @@
const MAXSTEPS= 10000
function Korean(str) {
switch (str) {
case "Hello":{
return "안녕하세요"
}break;
default:{
return English(str)
}
}
}
function English(str) {
switch (str) {
case 1:{ //Tab Title of Webpage
return "D4DJ Parking Calculator | Powered by Muni"
}break;
case 2:{ //Header Title (Top) of Webpage
return "D4DJ Event Parking Calculator"
}break;
case 3:{ //Set up your options (Category Title)
return "Parking Configuration"
}break;
case 4:{ //Selection for event type: Poker/Raid
return "Poker/Raid"
}break;
case 5:{ //Selection for event type: Bingo
return "Bingo"
}break;
case 6:{ //Selection for event type: Medley
return "Medley"
}break;
case 7:{ //Label for team % selector (Include ":")
return "Event Team Bonus:"
}break;
case 17:{ //Label for whether to enable flexible team options.
return "Flexible Team?"
}break;
case 8:{ //Tooltip for flexible team options (mouseover)
return "If turned on, calculates scoring options using lower % teams also."
}break;
case 18:{ //Label for what the max score in free lives is.
return "Max Free Live Score:"
}break;
case 9:{ //Tooltip for what the max score in free lives is. (Setting it to 0 forces the calculator to use Rehearsal)
return "The maximum score you can get from playing a song using <font color=\"aqua\">Free Live</font>.<br><sub>(Use 0 for Rehearsals Only)</sub>"
}break;
case 10:{ //Label for Advanced Settings toggle.
return "Advanced Options?"
}break;
case 11:{ //Tooltip for Advanced Settings toggle.
return "Enable voltage & EP limits."
}break;
case 12:{ //Label for setting the lowest EP where voltage is allowed.
return "Lowest EP to use Voltage:"
}break;
case 13:{ //Label for setting the total amount of voltage the calculator may consume.
return "Max Voltage to consume:"
}break;
case 14:{ //Label for setting the Starting EP amount.
return "Starting EP:"
}break;
case 15:{ //Label for setting the final EP amount.
return "Target EP:"
}break;
case 16:{ //The text for the button users click to run the calculator.
return "Calculate"
}break;
case "%INITIAL%":{ //This message is the first thing to display for a normal calculation.
//Sample message:
/*
Calculating from 100000 to 104000 for event type Poker/Raid...
(All games are done in Free Live)
Found a park! 9 steps and 13 voltage required!
*/
//Variables for this message:
/*
Calculating from %START% to %TARGET% for event type %EVENT%...
(All games are done in Free Live)
Found a park! %STEPS% step%PLURAL_STEPS% and %VOLTAGE% voltage required!
*/
return "Calculating from %START% to %TARGET% for event type %EVENT%...\n\t(All games are done in Free Live)\n\nFound a park! %STEPS% step%PLURAL_STEPS% and %VOLTAGE% voltage required!"
}break;
case "%STEP%":{ //This message is displayed for each normal voltage step in the process.
//Sample message:
/*
Step 1) Using 5 voltage w/160% team, score between 640000~649999 pts. EP +1480. Remaining:2520 EP
*/
//Variables for this message:
/*
Step %STEP%) Using %VOLTAGE% voltage w/%PERCENT%% team, score between %LOWSCORE~%HIGHSCORE% pts. EP +%EPGAIN%. Remaining:%REMAINING% EP
*/
return "Step %STEP%) Using %VOLTAGE% voltage w/%PERCENT%% team, score between %LOWSCORE%~%HIGHSCORE% pts. EP +%EPGAIN%. Remaining:%REMAINING% EP"
}break;
case "%REHEARSAL%":{ //Similar to above, but for a rehearsal step instead.
return "Step %STEP%) Use Rehearsal w/%PERCENT%% team. EP +%EPGAIN%. Remaining:%REMAINING% EP"
}break;
case "%LARGEGAP%":{ //This message is displayed if the Starting EP and Final EP gap is too big for reasonable calculations.
return "Get closer to target score before using parking calculator!";
}break;
case "%FAILED%":{ //This message is displayed if it's impossible to park.
return "Impossible to park using this team!"
}break;
default:{
return "???"
}
}
}
function Reveal(str) {
switch (str) {
case "Hello":{
return "Hi"
}break;
default:{
return English(str)
}
}
}
function ConvertVariables(str,data) {
return str
@ -137,8 +16,8 @@ const MAXSTEPS= 10000
.replaceAll("%REMAINING%",data.remaining)
}
var LANGUAGE=Reveal
var LANGUAGELIST={English:English,Korean:Korean}
var LANGUAGE=English
var LANGUAGELIST={English:{name:"English",translation:English},Japanese:{name:"Japanese",translation:Japanese}/*,Korean:{name:"한국어",translation:Korean}*/}
var TRANSLATEELEMENTS=100 //Increase as number of translated elements increases.
function Plural(t) {
@ -155,6 +34,11 @@ const MAXSTEPS= 10000
}
}
ConvertLanguage()
function toggle(){
//document.getElementById("console").value+=JSON.stringify(document.getElementById("advanced"))
document.getElementById("advanced2").style.visibility=document.getElementById("advanced").checked?"visible":"hidden"
}
function test(){
@ -173,7 +57,7 @@ const MAXSTEPS= 10000
var interval = (type=="Medley")?15000:10000
var maxscore = Math.floor(Math.abs(Math.max(0,Number(document.getElementById("maxscore").value)))/interval)*interval
var maxscore = Math.floor(Math.abs(Math.min(5000000,Math.max(0,Number(document.getElementById("maxscore").value))))/interval)*interval
function EPCalc(voltage,score,bonus) {
if (voltage>0) {

@ -6,6 +6,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="muni.css" />
<title class="translate1">D4DJ Parking Calculator | Powered by Muni</title>
<script src="english.js"></script>
<script src="japanese.js"></script>
</head>
<body>
<h1 class="translate2">D4DJ Event Parking Calculator</h1>
@ -44,31 +46,31 @@
<br />
<br />
<span class="tooltip"><label for="maxscore"><b class="translate18">Max Free Live Score: </b> </label
><input id="maxscore" min="0" type="number" value="650000" /> <span class="tooltiptext translate9">
><input id="maxscore" min="0" type="number" max="5000000" value="650000" /> <span class="tooltiptext translate9">
The maximum score you can get from playing a song using <font color="aqua">Free Live</font>.<br>
<sub>(Use 0 for Rehearsals Only)</sub></span></span>
</div>
<div class="munigrid">
<span class="tooltip"><label for="advanced" alt="Yes"
><b class="translate10">Advanced Options?</b></label
><input id="advanced" type="checkbox" /><span class="tooltiptext translate11">
><input id="advanced" type="checkbox" onclick="toggle()" /><span class="tooltiptext translate11">
Enable voltage & EP limits.</span></span>
<div class="grid" id="advanced" style="visibility:hidden">
<div class="munigrid translate12">
Lowest EP to use Voltage:
</div>
<div class="munigrid translate13">
Max Voltage to consume:
</div>
<div id="advanced2" style="visibility:hidden">
<label for="lowest" class="translate12">
Use voltage until:
</label><input style="width:96px;" id="lowest" type="number" min="10" step="2" value="80"> EP<br>
<label for="maxvolt" class="translate13">
Max Voltage to use:
</label> <input style="width:64px;" id="maxvolt" type="number" min="0" value="20">
</div>
</div>
</div>
<hr />
<label for="starting" class="translate14"><b>Starting EP:</b> </label
><input id="starting" min="0" type="number" value="100000" />
<b><label for="starting" class="translate14">Starting EP: </label
></b><input id="starting" min="0" type="number" value="100000" />
<span style="font-size: 32px; padding: 0px 10px 0px 10px"></span>
<label for="ending" class="translate15"><b>Target EP:</b> </label
><input id="ending" min="0" type="number" value="104000" />
<b><label for="ending" class="translate15">Target EP: </label
></b><input id="ending" min="0" type="number" value="104000" />
<br />
<br />
<button
@ -88,7 +90,12 @@
<div style="display: flex; justify-content: stretch; align-items: center">
<textarea rows="20" cols="160" id="console" disabled> </textarea>
</div>
<sub><u>Tips</u></sub>
<ul>
<li class="translate19">Here's the Light on EX or Synchrogazer on Hard/EX difficulty are some of the highest scoring songs you can pick.</li>
<li class="translate20">When you get close to the score you need in Free Live, purposely fail the song. Notes are worth 10% their normal value when you have 0 health so you can finish easily.</li>
<li class="translate21">The <b>"Flexible Team"</b> option gives you the fastest park, but at the expense of more voltage.</li>
</ul>
<script src="muni.js"></script>
<script>
document.getElementById("ips").value = "";

Loading…
Cancel
Save