Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Project Diva F Maximum Failure Calculator</title>
- <script type="text/javascript">
- function update_stats() {
- var notes = parseInt(document.getElementById('notes').value);
- if (notes <= 0 || isNaN(notes)) {
- return;
- }
- var weight = 89.0 / notes;
- var ct = parseInt(document.getElementById('ct').value);
- var tz = parseInt(document.getElementById('tz').value);
- var min = 3 - ct - tz;
- var bonus = 5 * ct + 3 * tz;
- var quotas = [80, 90, 95];
- for (var i = 0; i < quotas.length; i++) {
- var c = Math.floor(notes - (quotas[i] - bonus) / weight);
- var possible = (c >= min);
- document.getElementById(quotas[i] + '_yes').style.display = (possible ? 'inline' : 'none');
- document.getElementById(quotas[i] + '_no').style.display = (possible ? 'none' : 'inline');
- document.getElementById(quotas[i] + '_c').value = c;
- }
- }
- </script>
- </head>
- <body>
- <h1>Project Diva F Maximum Failure Calculator</h1>
- <div>By antibolo</div>
- <hr />
- <div>
- Considering a Normal/Hard/Extreme song with
- <input id="notes" type="number" min="1" max="9999" size="4" onchange="update_stats()" />
- total notes, and assuming you
- <select id="ct" onchange="update_stats()">
- <option value="1">passed</option>
- <option value="0">failed</option>
- </select>
- the Chance Time and completed
- <select id="tz" onchange="update_stats()">
- <option value="2">both</option>
- <option value="1">one</option>
- <option value="0">neither</option>
- </select>
- of the Technical Zones...
- </div>
- <ul>
- <li>
- You
- <span id="80_yes">can fail up to <input id="80_c" disabled="disabled" size="4"> notes to</span>
- <span id="80_no" style="display: none; color: red; font-weight: bold;">CANNOT</span>
- get a <span style="color: blue; font-weight: bold;">Standard</span>
- </li>
- <li>
- You
- <span id="90_yes">can fail up to <input id="90_c" disabled="disabled" size="4"> notes to</span>
- <span id="90_no" style="display: none; color: red; font-weight: bold;">CANNOT</span>
- get a <span style="color: green; font-weight: bold;">Great</span>
- </li>
- <li>
- You
- <span id="95_yes">can fail up to <input id="95_c" disabled="disabled" size="4"> notes to</span>
- <span id="95_no" style="display: none; color: red; font-weight: bold;">CANNOT</span>
- get an <span style="color: lightblue; font-weight: bold;">Excellent</span>
- </li>
- </ul>
- <hr />
- <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons Licence" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement