Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
- <html>
- <head>
- <meta charset="utf-8">
- </head>
- <script language="JavaScript">
- function calc(f) {
- var aciddamage = 0;
- var lavadamage = 0;
- var protect = 0;
- var firres = 0;
- var acires = 0;
- var moda = 0;
- if (f.armor.selectedIndex == 0) {
- protect = 1;
- firres = 0;
- acires = 0;
- moda = 1
- }
- if (f.armor.selectedIndex == 1) {
- protect = 2
- firres = 0;
- acires = 25
- moda = 1
- }
- if (f.armor.selectedIndex == 2) {
- protect = 2
- firres = 25
- acires = 50
- moda = 1
- }
- if (f.armor.selectedIndex == 3) {
- protect = 0
- firres = 0
- acires = 100
- moda = 1
- }
- if (f.armor.selectedIndex == 4) {
- protect = 10
- firres = 0
- acires = 0
- moda = 1
- }
- if (f.armor.selectedIndex == 5) {
- protect = 4
- firres = 0
- acires = 0
- moda = 1
- }
- if (f.armor.selectedIndex == 6) {
- protect = 0
- firres = 100
- acires = 100
- moda = 0
- }
- if (f.armor.selectedIndex == 7) {
- protect = 6
- firres = 30
- acires = 30
- moda = 0
- }
- if (moda == 1) {
- if (f.assembly[0].checked) {}
- if (f.assembly[1].checked) {
- firres = firres + 30
- }
- if (f.assembly[2].checked) {
- protect = protect + 1
- }
- if (f.assembly[3].checked) {
- firres = 100
- }
- if (f.assembly[4].checked) {
- firres = Math.min(firres + 75, 90)
- acires = Math.min(acires + 75, 90)
- }
- if (f.assembly[5].checked) {
- firres = 100
- acires = 100
- }
- }
- if (f.ber.checked) {
- if (firres < 100) {
- firres = Math.min(firres + 60, 90)
- }
- if (acires < 100) {
- acires = Math.min(acires + 60, 90)
- }
- }
- if ((f.pmod.checked) && (moda == 1)) {
- protect = protect * 2
- }
- aciddamage = Math.max(Math.floor((6 * (1 - 0.01 * acires)) - protect), 1)
- firedamage = Math.max(Math.floor((12 * (1 - 0.01 * firres)) - protect), 1)
- if (acires == 100) {
- aciddamage = 0
- }
- if (firres == 100) {
- firedamage = 0
- }
- restext = "<br>Damage taken : Acid "
- restext += aciddamage
- restext += ", Fire "
- restext += firedamage
- Result.innerHTML = restext
- }
- </script>
- <form>
- <br>
- <select name="armor">
- <option>Steel boots</option>
- <option>Protective boots</option>
- <option>Plasteel boots</option>
- <option>Acid-proof boots</option>
- <option>Gothic boots</option>
- <option>Phaseshift boots</option>
- <option>Enviroboots</option>
- <option>Nyarlaptotep's Boots</option>
- </select>
-
- <br> Power mod :
- <input type="checkbox" name="pmod"> Berserk :
- <input type="checkbox" name="ber">
- <br>
- <br>Assembly :
- <br>
- <input type="radio" id="plain" name="assembly" checked>Plain
- <input type="radio" id="fir" name="assembly">Fireproof
- <input type="radio" id="grap" name="assembly">Grappling
- <br>
- <input type="radio" id="lava" name="assembly">Lava
- <input type="radio" id="env" name="assembly">Environmental
- <input type="radio" id="cerb" name="assembly">Cerberus
- <br>
- <br>
- <input type="button" value="Calculate" onclick="calc(this.form);">
- <br>
- <div id="Result"></div>
- </form>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement