Created
November 20, 2025 05:29
-
-
Save BoogieWithACookie1722/ed986a44e7e2b18805efb50c97bc39fc to your computer and use it in GitHub Desktop.
Mastery Calc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Power Gain Time Calculator</title> | |
| <style> | |
| body { | |
| font-family: Segoe UI, sans-serif; | |
| background: #0e0e0e; | |
| color: #f5f5f5; | |
| text-align: center; | |
| margin-top: 60px; | |
| } | |
| input { | |
| padding: 8px; | |
| border-radius: 8px; | |
| border: none; | |
| width: 160px; | |
| text-align: center; | |
| margin: 6px; | |
| background: #1e1e1e; | |
| color: white; | |
| } | |
| input:focus { | |
| outline: 2px solid #4b7bec; | |
| } | |
| .result { | |
| color: #4b7bec; | |
| margin-top: 25px; | |
| font-size: 20px; | |
| font-weight: bold; | |
| } | |
| .container { | |
| background: #161616; | |
| display: inline-block; | |
| padding: 25px 45px; | |
| border-radius: 20px; | |
| box-shadow: 0 0 15px rgba(75, 123, 236, 0.25); | |
| } | |
| h2 { | |
| color: #4b7bec; | |
| margin-bottom: 20px; | |
| } | |
| label { | |
| color: #ddd; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <h2>⚡ Power Gain Time Calculator ⚡</h2> | |
| <div> | |
| <label>Current Power:</label><br> | |
| <input id="current" value="37No"><br> | |
| <label>Target Power:</label><br> | |
| <input id="target" value="160No"><br> | |
| <label>Power Per Click:</label><br> | |
| <input id="power" value="590Sp"><br> | |
| <label>Clicks Per Second:</label><br> | |
| <input id="cps" value="5.6"><br> | |
| <div class="result" id="result">⏱️ Time Needed: —</div> | |
| </div> | |
| </div> | |
| <script> | |
| function convertToNumber(val) { | |
| val = val.trim(); | |
| const suffixes = { | |
| "K":3, "M":6, "B":9, "T":12, "Qa":15, "Qi":18, "Sx":21, "Sp":24, | |
| "Oc":27, "No":30, "De":33, "Ud":36, "Dd":39, "Td":42 | |
| }; | |
| for (const s in suffixes) { | |
| if (val.includes(s)) { | |
| const num = parseFloat(val.replace(s, "")); | |
| return num * Math.pow(10, suffixes[s]); | |
| } | |
| } | |
| return parseFloat(val); | |
| } | |
| function updateCalc() { | |
| const current = convertToNumber(document.getElementById("current").value); | |
| const target = convertToNumber(document.getElementById("target").value); | |
| const power = convertToNumber(document.getElementById("power").value); | |
| const cps = parseFloat(document.getElementById("cps").value); | |
| const needed = target - current; | |
| const gainPerSec = power * cps; | |
| const result = document.getElementById("result"); | |
| if (!isFinite(needed) || !isFinite(gainPerSec) || gainPerSec <= 0 || needed <= 0) { | |
| result.innerText = "⚠️ Invalid or incomplete input!"; | |
| return; | |
| } | |
| let seconds = needed / gainPerSec; | |
| const h = Math.floor(seconds / 3600); | |
| const m = Math.floor((seconds % 3600) / 60); | |
| const s = Math.floor(seconds % 60); | |
| // Add short version (if mostly hours) | |
| const hoursOnly = (seconds / 3600).toFixed(2); | |
| result.innerText = `⏱️ Time Needed: ${h}h ${m}m ${s}s (≈ ${hoursOnly} hours)`; | |
| } | |
| // Automatically update as user types | |
| ["current","target","power","cps"].forEach(id => { | |
| document.getElementById(id).addEventListener("input", updateCalc); | |
| }); | |
| // Calculate once at start | |
| updateCalc(); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment