Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>They Are Billions Score Calculator</title>
- <link rel="shortcut icon" type="image/png" href="tab.png">
- <style type="text/css">
- a:link, a:visited{
- color:black;
- text-decoration:none;
- }
- .pageHead{
- border-bottom:solid black 3px;
- width:105%;
- margin-left:-14px;
- }
- #headr{
- text-align:left;
- position:relative;
- left:10px;
- background-color:#f2f2f2;
- }
- .pagenav{
- background-color:#e6e6e6;
- border: 1px solid black;
- color:black;
- padding: 9px 29px;
- text-align:center;
- text-decoration:none;
- font-weight:bold;
- display:inline-block;
- font-size:16px;
- cursor:pointer;
- float:left;
- }
- #home{
- position:absolute;
- top:14px;
- left:510px;
- }
- #notes{
- position:absolute;
- top:14px;
- left:620px;
- }
- table{
- position:relative;
- top:10px;
- width:430px;
- border: 3px solid black;
- }
- table, td, th{
- border: 1px solid black;
- padding:2.5px;
- text-align:center;
- }
- table.center {
- margin-left:auto;
- margin-right:auto;
- }
- #firstrow{
- height:20px;
- font-size:25px;
- }
- #finalrow{
- height:63px;
- font-size:18px;
- }
- .query{
- width:100px;
- }
- .wonders{
- width:104px;
- }
- #computeAlt{
- width:300px;
- }
- body{
- text-align:center;
- background-color:#f2f2f2;
- }
- h2{
- position:relative;
- top:5px;
- }
- .explain, ul{
- text-align:left;
- }
- </style>
- <script>
- function totalCalc() {
- var w = document.getElementById("wincon").value;
- var p = document.getElementById("pop").value;
- var i = document.getElementById("infected").value;
- var s = document.getElementById("soldier").value;
- var maximumS = 500;
- if (s > maximumS){s = maximumS};
- var c = document.getElementById("colonist").value;
- var maximumC = 500;
- if (c > maximumC){c = maximumC};
- var winC = 1
- var m = document.getElementById("multiplier").value;
- var b = document.getElementById("beholder");
- if (b.checked == true){b = "1000";} else {b = "0";}
- var cr = document.getElementById("palace");
- if (cr.checked == true){cr = "1500";} else {cr = "0";}
- var a = document.getElementById("academy");
- if (a.checked == true){a = "1000";} else {a = "0";}
- var v = document.getElementById("victorious");
- if (v.checked == true){v = "2000";} else {v = "0";}
- var sp = document.getElementById("spire");
- if (sp.checked == true){sp = "1500";} else {sp = "0";}
- var at = document.getElementById("atlas");
- if (at.checked == true){at = "2000";} else {at = "0";}
- var ds = document.getElementById("dayS").value;
- var dt = document.getElementById("dayT").value;
- var scoreL = 1000*((ds)/(dt))
- var t
- if(winC < w){t = ((+m)/(100))*((+p*0.5) + ((+i/10)*1) - ((+s + +c)*10) + +b + +cr + +a + +v + +sp + +at + +w)}
- if(winC > w){t = ((+m)/(100))*(+scoreL + (+p*0.5) + ((+i/10)*1) + +b + +cr + +a + +v + +sp + +at)}
- document.getElementById("totalScore").innerHTML = Math.round(t);
- }
- </script>
- </head>
- <body onload="totalCalc()">
- <a href="TAB Calculator.html"><h1 id="headr" class="pageHead">They Are Billions Score Calculator</h1></a>
- <div class="buttonGroup">
- <a href="TAB Calculator.html"><button id="home" class="pagenav">Home</button></a>
- <a href="TAB Notes.html"><button id="notes" class="pagenav">Notes</button></a>
- </div>
- <div id="Calculator">
- <table class="center">
- <tr id="firstrow">
- <th colspan="2">Score Calculator</th>
- </tr>
- <div id="form input percentage">
- <tr>
- <td><span class="form-input-text">Score Factor (%)</span></td>
- <td><input class="query" id="multiplier" type="percent" value="800" min=".01" max="8" onchange="totalCalc()" onkeyup="totalCalc()"></td>
- </tr>
- </div>
- <div id="form input victory">
- <tr>
- <td><span class="form-input-text">Victory or Defeat?</span></td>
- <td><select class="wonders" id="wincon" onchange="totalCalc()">
- <option value="20000">Victory</option>
- <option value="0">Defeat</option>
- </select></td>
- </tr>
- </div>
- <div id="days survived">
- <tr>
- <td><span class="form-input-text">Days Survived</span></td>
- <td><input class="query" id="dayS" type="number" value="80" min="0" max="149" onchange="totalCalc()" onkeyup="totalCalc()"></td>
- </tr>
- </div>
- <div id="days total">
- <tr>
- <td><span class="form-input-text">Days Total</span></td>
- <td><select class="wonders" id="dayT" onchange="totalCalc()">
- <option value="80">80 Days</option>
- <option value="100">100 Days</option>
- <option value="120">120 Days</option>
- <option value="150">150 Days</option>
- </select></td>
- </div>
- <div id="form input pop">
- <tr>
- <td><span class="form-input-text">Total Population</span></td>
- <td><input class="query" id="pop" type="number" value="0" min="0" onkeyup="totalCalc()" onchange="totalCalc()"></td>
- </tr>
- </div>
- <div id="form input infected">
- <tr>
- <td><span class="form-input-text">Infected Killed</span></td>
- <td><input class="query" id="infected" type="number" value="0" min="0" onkeyup="totalCalc()" onchange="totalCalc()"></td>
- </tr>
- </div>
- <div id="form input soldiers">
- <tr>
- <td><span class="form-input-text">Soldier Deaths</span></td>
- <td><input class="query" id="soldier" type="number" value="0" min="0" max="500" onkeyup="totalCalc()" onchange="totalCalc()"></td>
- </tr>
- </div>
- <div id="form input colonists">
- <tr>
- <td><span class="form-input-text">Colonist Deaths</span></td>
- <td><input class="query" id="colonist" type="number" value="0" min="0" max="500" onkeyup="totalCalc()" onchange="totalCalc()"></td>
- </tr>
- </div>
- <div id="form input beholder">
- <tr>
- <td><span class="form-input-text">The Silent Beholder Completed?</span></td>
- <td><input class="wonders" name="bbox" type="hidden" onchange="totalCalc()">
- <input class="wonders" name="bbox" type="checkbox" id="beholder" onchange="totalCalc()"></td>
- </tr>
- </div>
- <div id="form input palace">
- <tr>
- <td><span class="form-input-text">The Crystal Palace Completed?</span></td>
- <td><input class="wonders" name="bbox2" type="hidden" onchange="totalCalc()">
- <input class="wonders" name="bbox2" type="checkbox" id="palace" onchange="totalCalc()"></td>
- </tr>
- </div>
- <div id="form input academy">
- <tr>
- <td><span class="form-input-text">The Academy of Immortals Completed?</span></td>
- <td><input class="wonders" name="bbox3" type="hidden" onchange="totalCalc()">
- <input class="wonders" name="bbox3" type="checkbox" id="academy" onchange="totalCalc()"></td>
- </tr>
- </div>
- <div id="form input victorious">
- <tr>
- <td><span class="form-input-text">The Victorious Completed?</span></td>
- <td><input class="wonders" name="bbox4" type="hidden" onchange="totalCalc()">
- <input class="wonders" name="bbox4" type="checkbox" id="victorious" onchange="totalCalc()"></td>
- </tr>
- </div>
- <div id="form input spire">
- <tr>
- <td><span class="form-input-text">The Lightning Spire Completed?</span></td>
- <td><input class="wonders" name="bbox5" type="hidden" onchange="totalCalc()">
- <input class="wonders" name="bbox5" type="checkbox" id="spire" onchange="totalCalc()"></td>
- </tr>
- </div>
- <div id="form input atlas">
- <tr>
- <td><span class="form-input-text">The Atlas Transmutator Completed?</span></td>
- <td><input class="wonders" name="bbox6" type="hidden" onchange="totalCalc()">
- <input class="wonders" name="bbox6" type="checkbox" id="atlas" onchange="totalCalc()"></td>
- </tr>
- </div>
- <div id="total">
- <tr id="finalrow">
- <th><span id="form-output-text">Final Score</span></th>
- <th><p id="totalScore"></p></th>
- </tr>
- </div>
- </table>
- </div>
- <h6>Website Created By: Admiral__Ryan</h6>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement