/********************************************************************* Update Log 1/6/03 - Added functions for bonus skills gained through quests, etc. 1/4/03 - Changed CL requirement (from 48 to 50) for lvl 9 weapon skill. 12/5/02 - Changed text for minimum conditions to only show level requirement. 11/21/02 - Modified decrease CL/EL/TL functions with the correct condition comparison between skill point total and points used. - Added functions for Shield Leech skill from 11/20/02 patch. 11/20/02 - Added reset call in load() to clear data so load doesn't add on to previously recalled data. 11/19/02 - Cost and Req show "MAX" for all skills at highest level 11/14/02 - Functions to decrease CL/EL/TL - Functions to max/min skills - Functions to save/load data to/from cookies *********************************************************************/ function incSB() { sb = eval(document.form.sb.value); st = eval(document.form.st.value); sr = eval(document.form.sr.value); if (sb < 500) { sb++; st++; sr++; } document.form.sb.value = sb; document.form.st.value = st; document.form.sr.value = sr; } function decSB() { sb = eval(document.form.sb.value); st = eval(document.form.st.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); if ( (sb > 0) && (st > 0) && (st > su) ) { sb--; st--; sr--; } document.form.sb.value = sb; document.form.st.value = st; document.form.sr.value = sr; } function ffSB() { for (a = 0; a < 10; a++) { incSB(); } } function fbSB() { for (a = 0; a < 10; a++) { decSB(); } } function upgrades(ch) { if ( (ch >= 0) && (ch < 10) ) { document.form.rk.value = "Aspirant"; document.form.hl.value = "11"; document.form.ws.value = "1"; document.form.dv.value = "2"; document.form.cg.value = "18"; } else if ( (ch >= 10) && (ch < 30) ) { document.form.rk.value = "Initiate"; document.form.hl.value = "45"; document.form.ws.value = "1"; document.form.dv.value = "3"; document.form.cg.value = "20"; } else if ( (ch >= 30) && (ch < 50) ) { document.form.rk.value = "Novice"; document.form.hl.value = "170"; document.form.ws.value = "2"; document.form.dv.value = "3"; document.form.cg.value = "22"; } else if ( (ch >= 50) && (ch < 75) ) { document.form.rk.value = "Disciple"; document.form.hl.value = "680"; document.form.ws.value = "2"; document.form.dv.value = "4"; document.form.cg.value = "24"; } else if ( (ch >= 75) && (ch < 100) ) { document.form.rk.value = "Adept"; document.form.hl.value = "2,700"; document.form.ws.value = "2"; document.form.dv.value = "5"; document.form.cg.value = "26"; } else if ( (ch >= 100) && (ch < 135) ) { document.form.rk.value = "Master"; document.form.hl.value = "10,500"; document.form.ws.value = "3"; document.form.dv.value = "5"; document.form.cg.value = "28"; } else if ( (ch >= 135) && (ch < 150) ) { document.form.rk.value = "Grand Master"; document.form.hl.value = "42,000"; document.form.ws.value = "3"; document.form.dv.value = "6"; document.form.cg.value = "30"; } } function incCL() { cl = eval(document.form.cl.value); ch = eval(document.form.ch.value); st = eval(document.form.st.value); sr = eval(document.form.sr.value); if (cl < 50) { cl++; ch++; upgrades(ch); if ((cl >= 1) && (cl <= 19)) { st++; sr++; } if ((cl >= 20) && (cl <= 39)) { st += 2; sr += 2; } if ((cl >= 40) && (cl <= 50)) { st += 3; sr += 3; } } document.form.cl.value = cl; document.form.ch.value = ch; document.form.st.value = st; document.form.sr.value = sr; } function decCL() { cl = eval(document.form.cl.value); ch = eval(document.form.ch.value); st = eval(document.form.st.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); if (cl > 0) { if ( (cl >= 1) && (cl <= 19) && ((st - 1) >= su) ) { st--; sr--; cl--; ch--; upgrades(ch); } else if ( (cl >= 20) && (cl <= 39) && ((st - 2) >= su) ) { st -= 2; sr -= 2; cl--; ch--; upgrades(ch); } else if ( (cl >= 40) && (cl <= 50) && ((st - 3) >= su) ) { st -= 3; sr -= 3; cl--; ch--; upgrades(ch); } } document.form.cl.value = cl; document.form.ch.value = ch; document.form.st.value = st; document.form.sr.value = sr; } function incEL() { el = eval(document.form.el.value); ch = eval(document.form.ch.value); st = eval(document.form.st.value); sr = eval(document.form.sr.value); if (el < 50) { el++; ch++; upgrades(ch); if ((el >= 1) && (el <= 19)) { st++; sr++; } if ((el >= 20) && (el <= 39)) { st += 2; sr += 2; } if ((el >= 40) && (el <= 50)) { st += 3; sr += 3; } } document.form.el.value = el; document.form.ch.value = ch; document.form.st.value = st; document.form.sr.value = sr; } function decEL() { el = eval(document.form.el.value); ch = eval(document.form.ch.value); st = eval(document.form.st.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); if (el > 0) { if ( (el >= 1) && (el <= 19) && ((st - 1) >= su) ) { st--; sr--; el--; ch--; upgrades(ch); } else if ( (el >= 20) && (el <= 39) && ((st - 2) >= su) ) { st -= 2; sr -= 2; el--; ch--; upgrades(ch); } else if ( (el >= 40) && (el <= 50) && ((st - 3) >= su) ) { st -= 3; sr -= 3; el--; ch--; upgrades(ch); } } document.form.el.value = el; document.form.ch.value = ch; document.form.st.value = st; document.form.sr.value = sr; } function incTL() { tl = eval(document.form.tl.value); ch = eval(document.form.ch.value); st = eval(document.form.st.value); sr = eval(document.form.sr.value); if (tl < 50) { tl++; ch++; upgrades(ch); if ((tl >= 1) && (tl <= 19)) { st++; sr++; } if ((tl >= 20) && (tl <= 39)) { st += 2; sr += 2; } if ((tl >= 40) && (tl <= 50)) { st += 3; sr += 3; } } document.form.tl.value = tl; document.form.ch.value = ch; document.form.st.value = st; document.form.sr.value = sr; } function decTL() { tl = eval(document.form.tl.value); ch = eval(document.form.ch.value); st = eval(document.form.st.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); if (tl > 0) { if ( (tl >= 1) && (tl <= 19) && ((st - 1) >= su) ) { st--; sr--; tl--; ch--; upgrades(ch); } else if ( (tl >= 20) && (tl <= 39) && ((st - 2) >= su) ) { st -= 2; sr -= 2; tl--; ch--; upgrades(ch); } else if ( (tl >= 40) && (tl <= 50) && ((st - 3) >= su) ) { st -= 3; sr -= 3; tl--; ch--; upgrades(ch); } } document.form.tl.value = tl; document.form.ch.value = ch; document.form.st.value = st; document.form.sr.value = sr; } function ffCL() { for (a = 0; a < 10; a++) { incCL(); } } function fbCL() { for (a = 0; a < 10; a++) { decCL(); } } function ffEL() { for (a = 0; a < 10; a++) { incEL(); } } function fbEL() { for (a = 0; a < 10; a++) { decEL(); } } function ffTL() { for (a = 0; a < 10; a++) { incTL(); } } function fbTL() { for (a = 0; a < 10; a++) { decTL(); } } function maxL() { for (a = 0; a < 50; a++) { incCL(); incEL(); incTL(); } } // WEAPON function incWB() { if (document.form.wbnl.value == "MAX") { document.form.wbnl.value = "9"; } cl = eval(document.form.cl.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); wb = eval(document.form.wb.value); wbnl = eval(document.form.wbnl.value); wbsu = eval(document.form.wbsu.value); if ( (wb == 1) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL12"; document.form.wbds.value = "+25% Dmg, +Accuracy, Allows L2 Beams"; } else if ( (wb == 2) && (cl >= 12) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL18"; document.form.wbds.value = "+50% Dmg, +Accuracy, Allows L3 Beams"; } else if ( (wb == 3) && (cl >= 18) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL24"; document.form.wbds.value = "+75% Dmg, +Accuracy, Allows L4 Beams"; } else if ( (wb == 4) && (cl >= 24) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL30"; document.form.wbds.value = "+100% Dmg, +Accuracy, Allows L5 Beams"; } else if ( (wb == 5) && (cl >= 30) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL36"; document.form.wbds.value = "+125% Dmg, +Accuracy, Allows L6 Beams"; } else if ( (wb == 6) && (cl >= 36) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL42"; document.form.wbds.value = "+150% Dmg, +Accuracy, Allows L7 Beams"; } else if ( (wb == 7) && (cl >= 42) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL50"; document.form.wbds.value = "+175% Dmg, +Accuracy, Allows L8 Beams"; } else if ( (wb == 8) && (cl >= 50) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "MAX"; document.form.wbds.value = "+200% Dmg, +Accuracy, Allows L9 Beams"; } document.form.sr.value = sr; document.form.su.value = su; document.form.wb.value = wb; document.form.wbnl.value = wbnl; document.form.wbsu.value = wbsu; if (document.form.wbnl.value == "9") { document.form.wbnl.value = "MAX"; } } function decWB() { if (document.form.wbnl.value == "MAX") { document.form.wbnl.value = "9"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); wb = eval(document.form.wb.value); wbnl = eval(document.form.wbnl.value); wbsu = eval(document.form.wbsu.value); if (wb == 2) { wb--; wbnl = wb; wbsu -= wbnl; su -= wbnl; sr += wbnl; document.form.wbrq.value = "None"; document.form.wbds.value = "Allows L1 Beams"; } else if (wb == 3) { wb--; wbnl = wb; wbsu -= wbnl; su -= wbnl; sr += wbnl; document.form.wbrq.value = "CL12"; document.form.wbds.value = "+25% Dmg, +Accuracy, Allows L2 Beams"; } else if (wb == 4) { wb--; wbnl = wb; wbsu -= wbnl; su -= wbnl; sr += wbnl; document.form.wbrq.value = "CL18"; document.form.wbds.value = "+50% Dmg, +Accuracy, Allows L3 Beams"; } else if (wb == 5) { wb--; wbnl = wb; wbsu -= wbnl; su -= wbnl; sr += wbnl; document.form.wbrq.value = "CL24"; document.form.wbds.value = "+75% Dmg, +Accuracy, Allows L4 Beams"; } else if (wb == 6) { wb--; wbnl = wb; wbsu -= wbnl; su -= wbnl; sr += wbnl; document.form.wbrq.value = "CL30"; document.form.wbds.value = "+100% Dmg, +Accuracy, Allows L5 Beams"; } else if (wb == 7) { wb--; wbnl = wb; wbsu -= wbnl; su -= wbnl; sr += wbnl; document.form.wbrq.value = "CL36"; document.form.wbds.value = "+125% Dmg, +Accuracy, Allows L6 Beams"; } else if (wb == 8) { wb--; wbnl = wb; wbsu -= wbnl; su -= wbnl; sr += wbnl; document.form.wbrq.value = "CL42"; document.form.wbds.value = "+150% Dmg, +Accuracy, Allows L7 Beams"; } else if (wb == 9) { wb--; wbnl = wb; wbsu -= wbnl; su -= wbnl; sr += wbnl; document.form.wbrq.value = "CL50"; document.form.wbds.value = "+175% Dmg, +Accuracy, Allows L8 Beams"; } document.form.sr.value = sr; document.form.su.value = su; document.form.wb.value = wb; document.form.wbnl.value = wbnl; document.form.wbsu.value = wbsu; } function incWP() { if (document.form.wpnl.value == "MAX") { document.form.wpnl.value = "8"; } cl = eval(document.form.cl.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); wp = eval(document.form.wp.value); wpnl = eval(document.form.wpnl.value); wpsu = eval(document.form.wpsu.value); if ( (wp == 0) && (ch >= 25) ) { wp++; wpnl++; document.form.wprq.value = "CL7"; document.form.wpds.value = "Allows L1 Projectiles"; } else if ( (wp == 1) && (cl >= 7) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL14"; document.form.wpds.value = "+25% Dmg, +Accuracy, Allows L2 Projectiles"; } else if ( (wp == 2) && (cl >= 14) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL21"; document.form.wpds.value = "+50% Dmg, +Accuracy, Allows L3 Projectiles"; } else if ( (wp == 3) && (cl >= 21) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL28"; document.form.wpds.value = "+75% Dmg, +Accuracy, Allows L4 Projectiles"; } else if ( (wp == 4) && (cl >= 28) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL35"; document.form.wpds.value = "+100% Dmg, +Accuracy, Allows L5 Projectiles"; } else if ( (wp == 5) && (cl >= 35) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL42"; document.form.wpds.value = "+125% Dmg, +Accuracy, Allows L6 Projectiles"; } else if ( (wp == 6) && (cl >= 42) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL49"; document.form.wpds.value = "+150% Dmg, +Accuracy, Allows L7 Projectiles"; } else if ( (wp == 7) && (cl >= 49) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "MAX"; document.form.wpds.value = "+175% Dmg, +Accuracy, Allows L8 Projectiles"; } document.form.sr.value = sr; document.form.su.value = su; document.form.wp.value = wp; document.form.wpnl.value = wpnl; document.form.wpsu.value = wpsu; if (document.form.wpnl.value == "8") { document.form.wpnl.value = "MAX"; } } function decWP() { if (document.form.wpnl.value == "MAX") { document.form.wpnl.value = "8"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); wp = eval(document.form.wp.value); wpnl = eval(document.form.wpnl.value); wpsu = eval(document.form.wpsu.value); if (wp == 1) { wp--; wpnl--; document.form.wprq.value = "L25"; document.form.wpds.value = ""; } else if (wp == 2) { wp--; wpnl = wp; wpsu -= wpnl; su -= wpnl; sr += wpnl; document.form.wprq.value = "CL7"; document.form.wpds.value = "Allows L1 Projectiles"; } else if (wp == 3) { wp--; wpnl = wp; wpsu -= wpnl; su -= wpnl; sr += wpnl; document.form.wprq.value = "CL14"; document.form.wpds.value = "+25% Dmg, +Accuracy, Allows L2 Projectiles"; } else if (wp == 4) { wp--; wpnl = wp; wpsu -= wpnl; su -= wpnl; sr += wpnl; document.form.wprq.value = "CL21"; document.form.wpds.value = "+50% Dmg, +Accuracy, Allows L3 Projectiles"; } else if (wp == 5) { wp--; wpnl = wp; wpsu -= wpnl; su -= wpnl; sr += wpnl; document.form.wprq.value = "CL28"; document.form.wpds.value = "+75% Dmg, +Accuracy, Allows L4 Projectiles"; } else if (wp == 6) { wp--; wpnl = wp; wpsu -= wpnl; su -= wpnl; sr += wpnl; document.form.wprq.value = "CL35"; document.form.wpds.value = "+100% Dmg, +Accuracy, Allows L5 Projectiles"; } else if (wp == 7) { wp--; wpnl = wp; wpsu -= wpnl; su -= wpnl; sr += wpnl; document.form.wprq.value = "CL42"; document.form.wpds.value = "+125% Dmg, +Accuracy, Allows L6 Projectiles"; } else if (wp == 8) { wp--; wpnl = wp; wpsu -= wpnl; su -= wpnl; sr += wpnl; document.form.wprq.value = "CL49"; document.form.wpds.value = "+150% Dmg, +Accuracy, Allows L7 Projectiles"; } document.form.sr.value = sr; document.form.su.value = su; document.form.wp.value = wp; document.form.wpnl.value = wpnl; document.form.wpsu.value = wpsu; } // ACTIVE function incAO() { if (document.form.aonl.value == "MAX") { document.form.aonl.value = "7"; } el = eval(document.form.el.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); ao = eval(document.form.ao.value); aonl = eval(document.form.aonl.value); aosu = eval(document.form.aosu.value); if ( (ao == 0) && (ch >= 8) ) { ao++; aonl++; document.form.aorq.value = "None"; document.form.aods.value = "Enables Cloak"; } else if ( (ao == 1) && (sr >= aonl) ) { ao++; aosu += aonl; su += aonl; sr -= aonl; aonl = ao; document.form.aorq.value = "EL5"; document.form.aods.value = "Cloak time = 6 sec"; } else if ( (ao == 2) && (el >= 5) && (sr >= aonl) ) { ao++; aosu += aonl; su += aonl; sr -= aonl; aonl = ao; document.form.aorq.value = "EL15"; document.form.aods.value = "Cloak time = 5 sec, Enables Advanced Cloak"; } else if ( (ao == 3) && (el >= 15) && (sr >= aonl) ) { ao++; aosu += aonl; su += aonl; sr -= aonl; aonl = ao; document.form.aorq.value = "EL25"; document.form.aods.value = "Cloak time = 4 sec"; } else if ( (ao == 4) && (el >= 25) && (sr >= aonl) ) { ao++; aosu += aonl; su += aonl; sr -= aonl; aonl = ao; document.form.aorq.value = "EL35"; document.form.aods.value = "Cloak time = 3 sec, Enables Combat Cloak"; } else if ( (ao == 5) && (el >= 35) && (sr >= aonl) ) { ao++; aosu += aonl; su += aonl; sr -= aonl; aonl = ao; document.form.aorq.value = "EL45"; document.form.aods.value = "Enables Group Stealth"; } else if ( (ao == 6) && (el >= 45) && (sr >= aonl) ) { ao++; aosu += aonl; su += aonl; sr -= aonl; aonl = ao; document.form.aorq.value = "MAX"; document.form.aods.value = "Enables Group Cloak"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ao.value = ao; document.form.aonl.value = aonl; document.form.aosu.value = aosu; if (document.form.aonl.value == "7") { document.form.aonl.value = "MAX"; } } function decAO() { if (document.form.aonl.value == "MAX") { document.form.aonl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ao = eval(document.form.ao.value); aonl = eval(document.form.aonl.value); aosu = eval(document.form.aosu.value); if (ao == 1) { ao--; aonl--; document.form.aorq.value = "L8"; document.form.aods.value = ""; } else if (ao == 2) { ao--; aonl = ao; aosu -= aonl; su -= aonl; sr += aonl; document.form.aorq.value = "None"; document.form.aods.value = "Enables Cloak"; } else if (ao == 3) { ao--; aonl = ao; aosu -= aonl; su -= aonl; sr += aonl; document.form.aorq.value = "EL5"; document.form.aods.value = "Cloak time = 6 sec"; } else if (ao == 4) { ao--; aonl = ao; aosu -= aonl; su -= aonl; sr += aonl; document.form.aorq.value = "EL15"; document.form.aods.value = "Cloak time = 5 sec, Enables Advanced Cloak"; } else if (ao == 5) { ao--; aonl = ao; aosu -= aonl; su -= aonl; sr += aonl; document.form.aorq.value = "EL25"; document.form.aods.value = "Cloak time = 4 sec"; } else if (ao == 6) { ao--; aonl = ao; aosu -= aonl; su -= aonl; sr += aonl; document.form.aorq.value = "EL35"; document.form.aods.value = "Cloak time = 3 sec, Enables Combat Cloak"; } else if (ao == 7) { ao--; aonl = ao; aosu -= aonl; su -= aonl; sr += aonl; document.form.aorq.value = "EL45"; document.form.aods.value = "Enables Group Stealth"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ao.value = ao; document.form.aonl.value = aonl; document.form.aosu.value = aosu; } function incAW() { if (document.form.awnl.value == "MAX") { document.form.awnl.value = "7"; } el = eval(document.form.el.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); aw = eval(document.form.aw.value); awnl = eval(document.form.awnl.value); awsu = eval(document.form.awsu.value); if ( (aw == 0) && (ch >= 15) ) { aw++; awnl++; document.form.awrq.value = "None"; document.form.awds.value = "Enables Kailasa Gate"; } else if ( (aw == 1) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "EL5"; document.form.awds.value = "Enables Jupiter Gate"; } else if ( (aw == 2) && (el >= 5) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "EL15"; document.form.awds.value = "Enable Swooping Eagle Gate"; } else if ( (aw == 3) && (el >= 15) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "EL25"; document.form.awds.value = "Enables Valkyrie Twins Gate"; } else if ( (aw == 4) && (el >= 25) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "EL35"; document.form.awds.value = "Enables ABB Gate"; } else if ( (aw == 5) && (el >= 35) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "EL45"; document.form.awds.value = "Enables Carpenter Gate"; } else if ( (aw == 6) && (el >= 45) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "MAX"; document.form.awds.value = "Enables Endriago Gate"; } document.form.sr.value = sr; document.form.su.value = su; document.form.aw.value = aw; document.form.awnl.value = awnl; document.form.awsu.value = awsu; if (document.form.awnl.value == "7") { document.form.awnl.value = "MAX"; } } function decAW() { if (document.form.awnl.value == "MAX") { document.form.awnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); aw = eval(document.form.aw.value); awnl = eval(document.form.awnl.value); awsu = eval(document.form.awsu.value); if (aw == 1) { aw--; awnl--; document.form.awrq.value = "L15"; document.form.awds.value = ""; } else if (aw == 2) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "None"; document.form.awds.value = "Enables Kailasa Gate"; } else if (aw == 3) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "EL5"; document.form.awds.value = "Enables Jupiter Gate"; } else if (aw == 4) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "EL15"; document.form.awds.value = "Enable Swooping Eagle Gate"; } else if (aw == 5) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "EL25"; document.form.awds.value = "Enables Valkyrie Twins Gate"; } else if (aw == 6) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "EL35"; document.form.awds.value = "Enables ABB Gate"; } else if (aw == 7) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "EL45"; document.form.awds.value = "Enables Carpenter Gate"; } document.form.sr.value = sr; document.form.su.value = su; document.form.aw.value = aw; document.form.awnl.value = awnl; document.form.awsu.value = awsu; } function incAN() { if (document.form.annl.value == "MAX") { document.form.annl.value = "7"; } el = eval(document.form.el.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); an = eval(document.form.an.value); annl = eval(document.form.annl.value); ansu = eval(document.form.ansu.value); if ( (an == 0) && (ch >= 45) ) { an++; annl++; document.form.anrq.value = "None"; document.form.ands.value = "Enables Environment Barrier"; } else if ( (an == 1) && (sr >= annl) ) { an++; ansu += annl; su += annl; sr -= annl; annl = an; document.form.anrq.value = "EL5"; document.form.ands.value = "+Duration, Range = 2750"; } else if ( (an == 2) && (el >= 5) && (sr >= annl) ) { an++; ansu += annl; su += annl; sr -= annl; annl = an; document.form.anrq.value = "EL15"; document.form.ands.value = "+Duration, Range = 3000, Enables Lesser Environment Shield"; } else if ( (an == 3) && (el >= 15) && (sr >= annl) ) { an++; ansu += annl; su += annl; sr -= annl; annl = an; document.form.anrq.value = "EL25"; document.form.ands.value = "+Duration, Range = 3250"; } else if ( (an == 4) && (el >= 25) && (sr >= annl) ) { an++; ansu += annl; su += annl; sr -= annl; annl = an; document.form.anrq.value = "EL35"; document.form.ands.value = "+Duration, Range = 3500, Enables Environment Shield"; } else if ( (an == 5) && (el >= 35) && (sr >= annl) ) { an++; ansu += annl; su += annl; sr -= annl; annl = an; document.form.anrq.value = "EL45"; document.form.ands.value = "+Duration, Range = 3750, Enables Greater Environment Shield"; } else if ( (an == 6) && (el >= 45) && (sr >= annl) ) { an++; ansu += annl; su += annl; sr -= annl; annl = an; document.form.anrq.value = "MAX"; document.form.ands.value = "+Duration, Range = 4000, Enables Ultra Environment Shield"; } document.form.sr.value = sr; document.form.su.value = su; document.form.an.value = an; document.form.annl.value = annl; document.form.ansu.value = ansu; if (document.form.annl.value == "7") { document.form.annl.value = "MAX"; } } function decAN() { if (document.form.annl.value == "MAX") { document.form.annl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); an = eval(document.form.an.value); annl = eval(document.form.annl.value); ansu = eval(document.form.ansu.value); if (an == 1) { an--; annl--; document.form.anrq.value = "L45"; document.form.ands.value = ""; } else if (an == 2) { an--; annl = an; ansu -= annl; su -= annl; sr += annl; document.form.anrq.value = "None"; document.form.ands.value = "Enables Environment Barrier"; } else if (an == 3) { an--; annl = an; ansu -= annl; su -= annl; sr += annl; document.form.anrq.value = "EL5"; document.form.ands.value = "+Duration, Range = 2750"; } else if (an == 4) { an--; annl = an; ansu -= annl; su -= annl; sr += annl; document.form.anrq.value = "EL15"; document.form.ands.value = "+Duration, Range = 3000, Enables Lesser Environment Shield"; } else if (an == 5) { an--; annl = an; ansu -= annl; su -= annl; sr += annl; document.form.anrq.value = "EL25"; document.form.ands.value = "+Duration, Range = 3250"; } else if (an == 6) { an--; annl = an; ansu -= annl; su -= annl; sr += annl; document.form.anrq.value = "EL35"; document.form.ands.value = "+Duration, Range = 3500, Enables Environment Shield"; } else if (an == 7) { an--; annl = an; ansu -= annl; su -= annl; sr += annl; document.form.anrq.value = "EL45"; document.form.ands.value = "+Duration, Range = 3750, Enables Greater Environment Shield"; } document.form.sr.value = sr; document.form.su.value = su; document.form.an.value = an; document.form.annl.value = annl; document.form.ansu.value = ansu; } function incAF() { if (document.form.afnl.value == "MAX") { document.form.afnl.value = "5"; } el = eval(document.form.el.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); af = eval(document.form.af.value); afnl = eval(document.form.afnl.value); afsu = eval(document.form.afsu.value); if ( (af == 0) && (ch >= 8) ) { af++; afnl++; document.form.afrq.value = "None"; document.form.afds.value = "Enables Teleport Self"; } else if ( (af == 1) && (sr >= afnl) ) { af++; afsu += afnl; su += afnl; sr -= afnl; afnl = af; document.form.afrq.value = "EL5"; document.form.afds.value = "Range = 5300"; } else if ( (af == 2) && (el >= 5) && (sr >= afnl) ) { af++; afsu += afnl; su += afnl; sr -= afnl; afnl = af; document.form.afrq.value = "EL15"; document.form.afds.value = "Range = 5600, Enables Teleport Enemy"; } else if ( (af == 3) && (el >= 15) && (sr >= afnl) ) { af++; afsu += afnl; su += afnl; sr -= afnl; afnl = af; document.form.afrq.value = "EL25"; document.form.afds.value = "Range = 5900"; } else if ( (af == 4) && (el >= 25) && (sr >= afnl) ) { af++; afsu += afnl; su += afnl; sr -= afnl; afnl = af; document.form.afrq.value = "MAX"; document.form.afds.value = "Range = 6200, Enables Teleport Friendly"; } document.form.sr.value = sr; document.form.su.value = su; document.form.af.value = af; document.form.afnl.value = afnl; document.form.afsu.value = afsu; if (document.form.afnl.value == "5") { document.form.afnl.value = "MAX"; } } function decAF() { if (document.form.afnl.value == "MAX") { document.form.afnl.value = "5"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); af = eval(document.form.af.value); afnl = eval(document.form.afnl.value); afsu = eval(document.form.afsu.value); if (af == 1) { af--; afnl--; document.form.afrq.value = "L8"; document.form.afds.value = ""; } else if (af == 2) { af--; afnl = af; afsu -= afnl; su -= afnl; sr += afnl; document.form.afrq.value = "None"; document.form.afds.value = "Enables Teleport Self"; } else if (af == 3) { af--; afnl = af; afsu -= afnl; su -= afnl; sr += afnl; document.form.afrq.value = "EL5"; document.form.afds.value = "Range = 5300"; } else if (af == 4) { af--; afnl = af; afsu -= afnl; su -= afnl; sr += afnl; document.form.afrq.value = "EL15"; document.form.afds.value = "Range = 5600, Enables Teleport Enemy"; } else if (af == 5) { af--; afnl = af; afsu -= afnl; su -= afnl; sr += afnl; document.form.afrq.value = "EL25"; document.form.afds.value = "Range = 5900"; } document.form.sr.value = sr; document.form.su.value = su; document.form.af.value = af; document.form.afnl.value = afnl; document.form.afsu.value = afsu; } function incAJ() { if (document.form.ajnl.value == "MAX") { document.form.ajnl.value = "7"; } el = eval(document.form.el.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); aj = eval(document.form.aj.value); ajnl = eval(document.form.ajnl.value); ajsu = eval(document.form.ajsu.value); if ( (aj == 0) && (ch >= 20) ){ aj++; ajnl++; document.form.ajrq.value = "None"; document.form.ajds.value = "Enables Jumpstart"; } else if ( (aj == 1) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "EL5"; document.form.ajds.value = "Range = 1250, +Success rate, +Hull repair, -14% XP debt"; } else if ( (aj == 2) && (el >= 5) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "EL15"; document.form.ajds.value = "Range = 1500, +Success rate, +Hull repair, -21% XP debt"; } else if ( (aj == 3) && (el >= 15) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "EL25"; document.form.ajds.value = "Range = 1750, +Success rate, +Hull repair, -28% XP debt"; } else if ( (aj == 4) && (el >= 25) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "EL35"; document.form.ajds.value = "Range = 2000, +Success rate, +Hull repair, -35% XP debt"; } else if ( (aj == 5) && (el >= 35) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "EL45"; document.form.ajds.value = "Range = 2250, +Success rate, +Hull repair, -42% XP debt"; } else if ( (aj == 6) && (el >= 45) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "MAX"; document.form.ajds.value = "Range = 2500, +Success rate, +Hull repair, -49% XP debt"; } document.form.sr.value = sr; document.form.su.value = su; document.form.aj.value = aj; document.form.ajnl.value = ajnl; document.form.ajsu.value = ajsu; if (document.form.ajnl.value == "7") { document.form.ajnl.value = "MAX"; } } function decAJ() { if (document.form.ajnl.value == "MAX") { document.form.ajnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); aj = eval(document.form.aj.value); ajnl = eval(document.form.ajnl.value); ajsu = eval(document.form.ajsu.value); if (aj == 1) { aj--; ajnl--; document.form.ajrq.value = "L20"; document.form.ajds.value = ""; } else if (aj == 2) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "None"; document.form.ajds.value = "Enables Jumpstart"; } else if (aj == 3) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "EL5"; document.form.ajds.value = "Range = 1250, +Success rate, +Hull repair, -14% XP debt"; } else if (aj == 4) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "EL15"; document.form.ajds.value = "Range = 1500, +Success rate, +Hull repair, -21% XP debt"; } else if (aj == 5) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "EL25"; document.form.ajds.value = "Range = 1750, +Success rate, +Hull repair, -28% XP debt"; } else if (aj == 6) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "EL35"; document.form.ajds.value = "Range = 2000, +Success rate, +Hull repair, -35% XP debt"; } else if (aj == 7) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "EL45"; document.form.ajds.value = "Range = 2250, +Success rate, +Hull repair, -42% XP debt"; } document.form.sr.value = sr; document.form.su.value = su; document.form.aj.value = aj; document.form.ajnl.value = ajnl; document.form.ajsu.value = ajsu; } function incAL() { if (document.form.alnl.value == "MAX") { document.form.alnl.value = "7"; } el = eval(document.form.el.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); al = eval(document.form.al.value); alnl = eval(document.form.alnl.value); alsu = eval(document.form.alsu.value); if ( (al == 1) && (sr >= alnl) ) { al++; alsu += alnl; su += alnl; sr -= alnl; alnl = al; document.form.alrq.value = "EL5"; document.form.alds.value = "+Drain amount, Range = 1250"; } else if ( (al == 2) && (el >= 5) && (sr >= alnl) ) { al++; alsu += alnl; su += alnl; sr -= alnl; alnl = al; document.form.alrq.value = "EL15"; document.form.alds.value = "+Drain amount, Range = 1500, Enables Shield Leech "; } else if ( (al == 3) && (el >= 15) && (sr >= alnl) ) { al++; alsu += alnl; su += alnl; sr -= alnl; alnl = al; document.form.alrq.value = "EL25"; document.form.alds.value = "+Drain amount, Range = 1750"; } else if ( (al == 4) && (el >= 25) && (sr >= alnl) ) { al++; alsu += alnl; su += alnl; sr -= alnl; alnl = al; document.form.alrq.value = "EL35"; document.form.alds.value = "+Drain amount, Range = 2000, Enables Group Leech"; } else if ( (al == 5) && (el >= 35) && (sr >= alnl) ) { al++; alsu += alnl; su += alnl; sr -= alnl; alnl = al; document.form.alrq.value = "EL45"; document.form.alds.value = "+Drain amount, Range = 2250, Enables Shield Leeching Sphere"; } else if ( (al == 6) && (el >= 45) && (sr >= alnl) ) { al++; alsu += alnl; su += alnl; sr -= alnl; alnl = al; document.form.alrq.value = "MAX"; document.form.alds.value = "+Drain amount, Range = 2500, Enables Group Leeching Sphere"; } document.form.sr.value = sr; document.form.su.value = su; document.form.al.value = al; document.form.alnl.value = alnl; document.form.alsu.value = alsu; if (document.form.alnl.value == "7") { document.form.alnl.value = "MAX"; } } function decAL() { if (document.form.alnl.value == "MAX") { document.form.alnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); al = eval(document.form.al.value); alnl = eval(document.form.alnl.value); alsu = eval(document.form.alsu.value); if (al == 2) { al--; alnl = al; alsu -= alnl; su -= alnl; sr += alnl; document.form.alrq.value = "None"; document.form.alds.value = "Enables Shield Drain"; } else if (al == 3) { al--; alnl = al; alsu -= alnl; su -= alnl; sr += alnl; document.form.alrq.value = "EL5"; document.form.alds.value = "+Drain amount, Range = 1250"; } else if (al == 4) { al--; alnl = al; alsu -= alnl; su -= alnl; sr += alnl; document.form.alrq.value = "EL15"; document.form.alds.value = "+Drain amount, Range = 1500, Enables Shield Leech"; } else if (al == 5) { al--; alnl = al; alsu -= alnl; su -= alnl; sr += alnl; document.form.alrq.value = "EL25"; document.form.alds.value = "+Drain amount, Range = 1750"; } else if (al == 6) { al--; alnl = al; alsu -= alnl; su -= alnl; sr += alnl; document.form.alrq.value = "EL35"; document.form.alds.value = "+Drain amount, Range = 2000, Enables Group Leech"; } else if (al == 7) { al--; alnl = al; alsu -= alnl; su -= alnl; sr += alnl; document.form.alrq.value = "EL45"; document.form.alds.value = "+Drain amount, Range = 2250, Enables Shield Leeching Sphere"; } document.form.sr.value = sr; document.form.su.value = su; document.form.al.value = al; document.form.alnl.value = alnl; document.form.alsu.value = alsu; } // PASSIVE function incPV() { if (document.form.pvnl.value == "MAX") { document.form.pvnl.value = "7"; } el = eval(document.form.el.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); pv = eval(document.form.pv.value); pvnl = eval(document.form.pvnl.value); pvsu = eval(document.form.pvsu.value); if ( (pv == 0) && (ch >= 15) ){ pv++; pvnl++; document.form.pvrq.value = "None"; document.form.pvds.value = "-20% Warp activation energy"; } else if ( (pv == 1) && (sr >= pvnl) ) { pv++; pvsu += pvnl; su += pvnl; sr -= pvnl; pvnl = pv; document.form.pvrq.value = "EL5"; document.form.pvds.value = "-30% Warp activation energy"; } else if ( (pv == 2) && (el >= 5) && (sr >= pvnl) ) { pv++; pvsu += pvnl; su += pvnl; sr -= pvnl; pvnl = pv; document.form.pvrq.value = "EL15"; document.form.pvds.value = "-40% Warp activation energy, -10% Warp init & recov time"; } else if ( (pv == 3) && (el >= 15) && (sr >= pvnl) ) { pv++; pvsu += pvnl; su += pvnl; sr -= pvnl; pvnl = pv; document.form.pvrq.value = "EL25"; document.form.pvds.value = "-50% Warp activation energy, -15% Warp init & recov time"; } else if ( (pv == 4) && (el >= 25) && (sr >= pvnl) ) { pv++; pvsu += pvnl; su += pvnl; sr -= pvnl; pvnl = pv; document.form.pvrq.value = "EL35"; document.form.pvds.value = "-60% Warp activation energy, -20% Warp init & recov time, +70 speed"; } else if ( (pv == 5) && (el >= 35) && (sr >= pvnl) ) { pv++; pvsu += pvnl; su += pvnl; sr -= pvnl; pvnl = pv; document.form.pvrq.value = "EL45"; document.form.pvds.value = "-70% Warp activation energy, -25% Warp init & recov time, +100 speed, +400 warp"; } else if ( (pv == 6) && (el >= 45) && (sr >= pvnl) ) { pv++; pvsu += pvnl; su += pvnl; sr -= pvnl; pvnl = pv; document.form.pvrq.value = "MAX"; document.form.pvds.value = "-80% Warp activation energy, -30% Warp init & recov time, +130 speed, +700 warp, 50% chance warp in grav well"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pv.value = pv; document.form.pvnl.value = pvnl; document.form.pvsu.value = pvsu; if (document.form.pvnl.value == "7") { document.form.pvnl.value = "MAX"; } } function decPV() { if (document.form.pvnl.value == "MAX") { document.form.pvnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); pv = eval(document.form.pv.value); pvnl = eval(document.form.pvnl.value); pvsu = eval(document.form.pvsu.value); if (pv == 1) { pv--; pvnl--; document.form.pvrq.value = "L15"; document.form.pvds.value = ""; } else if (pv == 2) { pv--; pvnl = pv; pvsu -= pvnl; su -= pvnl; sr += pvnl; document.form.pvrq.value = "None"; document.form.pvds.value = "-20% Warp activation energy"; } else if (pv == 3) { pv--; pvnl = pv; pvsu -= pvnl; su -= pvnl; sr += pvnl; document.form.pvrq.value = "EL5"; document.form.pvds.value = "-30% Warp activation energy"; } else if (pv == 4) { pv--; pvnl = pv; pvsu -= pvnl; su -= pvnl; sr += pvnl; document.form.pvrq.value = "EL15"; document.form.pvds.value = "-40% Warp activation energy, -10% Warp init & recov time"; } else if (pv == 5) { pv--; pvnl = pv; pvsu -= pvnl; su -= pvnl; sr += pvnl; document.form.pvrq.value = "EL25"; document.form.pvds.value = "-50% Warp activation energy, -15% Warp init & recov time"; } else if (pv == 6) { pv--; pvnl = pv; pvsu -= pvnl; su -= pvnl; sr += pvnl; document.form.pvrq.value = "EL35"; document.form.pvds.value = "-60% Warp activation energy, -20% Warp init & recov time, +70 speed"; } else if (pv == 7) { pv--; pvnl = pv; pvsu -= pvnl; su -= pvnl; sr += pvnl; document.form.pvrq.value = "EL45"; document.form.pvds.value = "-70% Warp activation energy, -25% Warp init & recov time, +100 speed, +400 warp"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pv.value = pv; document.form.pvnl.value = pvnl; document.form.pvsu.value = pvsu; } function incPP() { if (document.form.ppnl.value == "MAX") { document.form.ppnl.value = "7"; } el = eval(document.form.el.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); pp = eval(document.form.pp.value); ppnl = eval(document.form.ppnl.value); ppsu = eval(document.form.ppsu.value); if (pp == 0) { pp++; ppnl++; document.form.pprq.value = "None"; document.form.ppds.value = "Enables Prospect"; } else if ( (pp == 1) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "EL5"; document.form.ppds.value = "-Energy and time, range = 1250"; } else if ( (pp == 2) && (el >= 5) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "EL15"; document.form.ppds.value = "-Energy and time, range = 1500"; } else if ( (pp == 3) && (el >= 15) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "EL25"; document.form.ppds.value = "-Energy and time, range = 1750"; } else if ( (pp == 4) && (el >= 25) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "EL35"; document.form.ppds.value = "-Energy and time, range = 2000"; } else if ( (pp == 5) && (el >= 35) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "EL45"; document.form.ppds.value = "-Energy and time, range = 2250"; } else if ( (pp == 6) && (el >= 45) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "MAX"; document.form.ppds.value = "-Energy and time, range = 2500"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pp.value = pp; document.form.ppnl.value = ppnl; document.form.ppsu.value = ppsu; if (document.form.ppnl.value == "7") { document.form.ppnl.value = "MAX"; } } function decPP() { if (document.form.ppnl.value == "MAX") { document.form.ppnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); pp = eval(document.form.pp.value); ppnl = eval(document.form.ppnl.value); ppsu = eval(document.form.ppsu.value); if (pp == 1) { pp--; ppnl--; document.form.pprq.value = "None"; document.form.ppds.value = ""; } else if (pp == 2) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "None"; document.form.ppds.value = "Enables Prospect"; } else if (pp == 3) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "EL5"; document.form.ppds.value = "-Energy and time, range = 1250"; } else if (pp == 4) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "EL15"; document.form.ppds.value = "-Energy and time, range = 1500"; } else if (pp == 5) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "EL25"; document.form.ppds.value = "-Energy and time, range = 1750"; } else if (pp == 6) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "EL35"; document.form.ppds.value = "-Energy and time, range = 2000"; } else if (pp == 7) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "EL45"; document.form.ppds.value = "-Energy and time, range = 2250"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pp.value = pp; document.form.ppnl.value = ppnl; document.form.ppsu.value = ppsu; } function incPS() { if (document.form.psnl.value == "MAX") { document.form.psnl.value = "7"; } el = eval(document.form.el.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); ps = eval(document.form.ps.value); psnl = eval(document.form.psnl.value); pssu = eval(document.form.pssu.value); if ( (ps == 0) && (ch >= 35) ) { ps++; psnl++; document.form.psrq.value = "None"; document.form.psds.value = "Range = 1000"; } else if ( (ps == 1) && (sr >= psnl) ) { ps++; pssu += psnl; su += psnl; sr -= psnl; psnl = ps; document.form.psrq.value = "EL5"; document.form.psds.value = "Range = 1250"; } else if ( (ps == 2) && (el >= 5) && (sr >= psnl) ) { ps++; pssu += psnl; su += psnl; sr -= psnl; psnl = ps; document.form.psrq.value = "EL15"; document.form.psds.value = "Range = 1500, Cloak detection"; } else if ( (ps == 3) && (el >= 15) && (sr >= psnl) ) { ps++; pssu += psnl; su += psnl; sr -= psnl; psnl = ps; document.form.psrq.value = "EL25"; document.form.psds.value = "Range = 1750, +Cloak detection chance"; } else if ( (ps == 4) && (el >= 25) && (sr >= psnl) ) { ps++; pssu += psnl; su += psnl; sr -= psnl; psnl = ps; document.form.psrq.value = "EL35"; document.form.psds.value = "Range = 2000, Group can see detected cloak"; } else if ( (ps == 5) && (el >= 35) && (sr >= psnl) ) { ps++; pssu += psnl; su += psnl; sr -= psnl; psnl = ps; document.form.psrq.value = "EL45"; document.form.psds.value = "Range = 2250, +Cloak detection chance"; } else if ( (ps == 6) && (el >= 45) && (sr >= psnl) ) { ps++; pssu += psnl; su += psnl; sr -= psnl; psnl = ps; document.form.psrq.value = "MAX"; document.form.psds.value = "Range = 2500, Scan info shared with group"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ps.value = ps; document.form.psnl.value = psnl; document.form.pssu.value = pssu; if (document.form.psnl.value == "7") { document.form.psnl.value = "MAX"; } } function decPS() { if (document.form.psnl.value == "MAX") { document.form.psnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ps = eval(document.form.ps.value); psnl = eval(document.form.psnl.value); pssu = eval(document.form.pssu.value); if (ps == 1) { ps--; psnl--; document.form.psrq.value = "L35"; document.form.psds.value = ""; } else if (ps == 2) { ps--; psnl = ps; pssu -= psnl; su -= psnl; sr += psnl; document.form.psrq.value = "None"; document.form.psds.value = "Range = 1000"; } else if (ps == 3) { ps--; psnl = ps; pssu -= psnl; su -= psnl; sr += psnl; document.form.psrq.value = "EL5"; document.form.psds.value = "Range = 1250"; } else if (ps == 4) { ps--; psnl = ps; pssu -= psnl; su -= psnl; sr += psnl; document.form.psrq.value = "EL15"; document.form.psds.value = "Range = 1500, Cloak detection"; } else if (ps == 5) { ps--; psnl = ps; pssu -= psnl; su -= psnl; sr += psnl; document.form.psrq.value = "EL25"; document.form.psds.value = "Range = 1750, +Cloak detection chance"; } else if (ps == 6) { ps--; psnl = ps; pssu -= psnl; su -= psnl; sr += psnl; document.form.psrq.value = "EL35"; document.form.psds.value = "Range = 2000, Group can see detected cloak"; } else if (ps == 7) { ps--; psnl = ps; pssu -= psnl; su -= psnl; sr += psnl; document.form.psrq.value = "EL45"; document.form.psds.value = "Range = 2250, +Cloak detection chance"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ps.value = ps; document.form.psnl.value = psnl; document.form.pssu.value = pssu; } // BUILD function incBD() { if (document.form.bdnl.value == "MAX") { document.form.bdnl.value = "7"; } tl = eval(document.form.tl.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); bd = eval(document.form.bd.value); bdnl = eval(document.form.bdnl.value); bdsu = eval(document.form.bdsu.value); if (bd == 0) { bd++; bdnl++; document.form.bdrq.value = "None"; document.form.bdds.value = "Analysis and manufacture of L1 devices"; } else if ( (bd == 1) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "TL5"; document.form.bdds.value = "Analysis and manufacture of L2 devices"; } else if ( (bd == 2) && (tl >= 5) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "TL15"; document.form.bdds.value = "Analysis and manufacture of L3 devices"; } else if ( (bd == 3) && (tl >= 15) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "TL25"; document.form.bdds.value = "Analysis and manufacture of L4 devices"; } else if ( (bd == 4) && (tl >= 25) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "TL35"; document.form.bdds.value = "Analysis and manufacture of L5 devices"; } else if ( (bd == 5) && (tl >= 35) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "TL45"; document.form.bdds.value = "Analysis and manufacture of L6 & L7 devices"; } else if ( (bd == 6) && (tl >= 45) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "MAX"; document.form.bdds.value = "Analysis and manufacture of L8 & L9 devices"; } document.form.sr.value = sr; document.form.su.value = su; document.form.bd.value = bd; document.form.bdnl.value = bdnl; document.form.bdsu.value = bdsu; if (document.form.bdnl.value == "7") { document.form.bdnl.value = "MAX"; } } function decBD() { if (document.form.bdnl.value == "MAX") { document.form.bdnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); bd = eval(document.form.bd.value); bdnl = eval(document.form.bdnl.value); bdsu = eval(document.form.bdsu.value); if ( (bd == 1) ) { bd--; bdnl--; document.form.bdrq.value = "None"; document.form.bdds.value = ""; } else if (bd == 2) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "None"; document.form.bdds.value = "Analysis and manufacture of L1 devices"; } else if (bd == 3) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "TL5"; document.form.bdds.value = "Analysis and manufacture of L2 devices"; } else if (bd == 4) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "TL15"; document.form.bdds.value = "Analysis and manufacture of L3 devices"; } else if (bd == 5) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "TL25"; document.form.bdds.value = "Analysis and manufacture of L4 devices"; } else if (bd == 6) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "TL35"; document.form.bdds.value = "Analysis and manufacture of L5 devices"; } else if (bd == 7) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "TL45"; document.form.bdds.value = "Analysis and manufacture of L6 & L7 devices"; } document.form.sr.value = sr; document.form.su.value = su; document.form.bd.value = bd; document.form.bdnl.value = bdnl; document.form.bdsu.value = bdsu; } function incBR() { if (document.form.brnl.value == "MAX") { document.form.brnl.value = "7"; } tl = eval(document.form.tl.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); br = eval(document.form.br.value); brnl = eval(document.form.brnl.value); brsu = eval(document.form.brsu.value); if ( (br == 0) && (ch >= 40) ) { br++; brnl++; document.form.brrq.value = "None"; document.form.brds.value = "Analysis and manufacture of L1 reactors"; } else if ( (br == 1) && (sr >= brnl) ) { br++; brsu += brnl; su += brnl; sr -= brnl; brnl = br; document.form.brrq.value = "TL5"; document.form.brds.value = "Analysis and manufacture of L2 reactors"; } else if ( (br == 2) && (tl >= 5) && (sr >= brnl) ) { br++; brsu += brnl; su += brnl; sr -= brnl; brnl = br; document.form.brrq.value = "TL15"; document.form.brds.value = "Analysis and manufacture of L3 reactors"; } else if ( (br == 3) && (tl >= 15) && (sr >= brnl) ) { br++; brsu += brnl; su += brnl; sr -= brnl; brnl = br; document.form.brrq.value = "TL25"; document.form.brds.value = "Analysis and manufacture of L4 reactors"; } else if ( (br == 4) && (tl >= 25) && (sr >= brnl) ) { br++; brsu += brnl; su += brnl; sr -= brnl; brnl = br; document.form.brrq.value = "TL35"; document.form.brds.value = "Analysis and manufacture of L5 reactors"; } else if ( (br == 5) && (tl >= 35) && (sr >= brnl) ) { br++; brsu += brnl; su += brnl; sr -= brnl; brnl = br; document.form.brrq.value = "TL45"; document.form.brds.value = "Analysis and manufacture of L6 & L7 reactors"; } else if ( (br == 6) && (tl >= 45) && (sr >= brnl) ) { br++; brsu += brnl; su += brnl; sr -= brnl; brnl = br; document.form.brrq.value = "MAX"; document.form.brds.value = "Analysis and manufacture of L8 & L9 reactors"; } document.form.sr.value = sr; document.form.su.value = su; document.form.br.value = br; document.form.brnl.value = brnl; document.form.brsu.value = brsu; if (document.form.brnl.value == "7") { document.form.brnl.value = "MAX"; } } function decBR() { if (document.form.brnl.value == "MAX") { document.form.brnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); br = eval(document.form.br.value); brnl = eval(document.form.brnl.value); brsu = eval(document.form.brsu.value); if ( (br == 1) ) { br--; brnl--; document.form.brrq.value = "L40"; document.form.brds.value = ""; } else if (br == 2) { br--; brnl = br; brsu -= brnl; su -= brnl; sr += brnl; document.form.brrq.value = "None"; document.form.brds.value = "Analysis and manufacture of L1 reactors"; } else if (br == 3) { br--; brnl = br; brsu -= brnl; su -= brnl; sr += brnl; document.form.brrq.value = "TL5"; document.form.brds.value = "Analysis and manufacture of L2 reactors"; } else if (br == 4) { br--; brnl = br; brsu -= brnl; su -= brnl; sr += brnl; document.form.brrq.value = "TL15"; document.form.brds.value = "Analysis and manufacture of L3 reactors"; } else if (br == 5) { br--; brnl = br; brsu -= brnl; su -= brnl; sr += brnl; document.form.brrq.value = "TL25"; document.form.brds.value = "Analysis and manufacture of L4 reactors"; } else if (br == 6) { br--; brnl = br; brsu -= brnl; su -= brnl; sr += brnl; document.form.brrq.value = "TL35"; document.form.brds.value = "Analysis and manufacture of L5 reactors"; } else if (br == 7) { br--; brnl = br; brsu -= brnl; su -= brnl; sr += brnl; document.form.brrq.value = "TL45"; document.form.brds.value = "Analysis and manufacture of L6 & L7 reactors"; } document.form.sr.value = sr; document.form.su.value = su; document.form.br.value = br; document.form.brnl.value = brnl; document.form.brsu.value = brsu; } // TECH function incTD() { if (document.form.tdnl.value == "MAX") { document.form.tdnl.value = "9"; } ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); td = eval(document.form.td.value); tdnl = eval(document.form.tdnl.value); tdsu = eval(document.form.tdsu.value); if ( (td == 1) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L20"; document.form.tdds.value = "Allows L2 Devices"; } else if ( (td == 2) && (ch >= 20) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L40"; document.form.tdds.value = "Allows L3 Devices"; } else if ( (td == 3) && (ch >= 40) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L60"; document.form.tdds.value = "Allows L4 Devices"; } else if ( (td == 4) && (ch >= 60) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L80"; document.form.tdds.value = "Allows L5 Devices"; } else if ( (td == 5) && (ch >= 80) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L100"; document.form.tdds.value = "Allows L6 Devices"; } else if ( (td == 6) && (ch >= 100) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L120"; document.form.tdds.value = "Allows L7 Devices"; } else if ( (td == 7) && (ch >= 120) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L140"; document.form.tdds.value = "Allows L8 Devices"; } else if ( (td == 8) && (ch >= 140) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "MAX"; document.form.tdds.value = "Allows L9 Devices"; } document.form.sr.value = sr; document.form.su.value = su; document.form.td.value = td; document.form.tdnl.value = tdnl; document.form.tdsu.value = tdsu; if (document.form.tdnl.value == "9") { document.form.tdnl.value = "MAX"; } } function decTD() { if (document.form.tdnl.value == "MAX") { document.form.tdnl.value = "9"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); td = eval(document.form.td.value); tdnl = eval(document.form.tdnl.value); tdsu = eval(document.form.tdsu.value); if (td == 2) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "None"; document.form.tdds.value = "Allows L1 Devices"; } else if (td == 3) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L20"; document.form.tdds.value = "Allows L2 Devices"; } else if (td == 4) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L40"; document.form.tdds.value = "Allows L3 Devices"; } else if (td == 5) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L60"; document.form.tdds.value = "Allows L4 Devices"; } else if (td == 6) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L80"; document.form.tdds.value = "Allows L5 Devices"; } else if (td == 7) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L100"; document.form.tdds.value = "Allows L6 Devices"; } else if (td == 8) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L120"; document.form.tdds.value = "Allows L7 Devices"; } else if (td == 9) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L140"; document.form.tdds.value = "Allows L8 Devices"; } document.form.sr.value = sr; document.form.su.value = su; document.form.td.value = td; document.form.tdnl.value = tdnl; document.form.tdsu.value = tdsu; } function incTE() { if (document.form.tenl.value == "MAX") { document.form.tenl.value = "8"; } ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); te = eval(document.form.te.value); tenl = eval(document.form.tenl.value); tesu = eval(document.form.tesu.value); if ( (te == 1) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L30"; document.form.teds.value = "Allows L2 Engines"; } else if ( (te == 2) && (ch >= 30) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L50"; document.form.teds.value = "Allows L3 Engines"; } else if ( (te == 3) && (ch >= 50) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L70"; document.form.teds.value = "Allows L4 Engines"; } else if ( (te == 4) && (ch >= 70) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L90"; document.form.teds.value = "Allows L5 Engines"; } else if ( (te == 5) && (ch >= 90) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L110"; document.form.teds.value = "Allows L6 Engines"; } else if ( (te == 6) && (ch >= 110) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L130"; document.form.teds.value = "Allows L7 Engines"; } else if ( (te == 7) && (ch >= 130) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "MAX"; document.form.teds.value = "Allows L8 Engines"; } document.form.sr.value = sr; document.form.su.value = su; document.form.te.value = te; document.form.tenl.value = tenl; document.form.tesu.value = tesu; if (document.form.tenl.value == "8") { document.form.tenl.value = "MAX"; } } function decTE() { if (document.form.tenl.value == "MAX") { document.form.tenl.value = "8"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); te = eval(document.form.te.value); tenl = eval(document.form.tenl.value); tesu = eval(document.form.tesu.value); if (te == 2) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "None"; document.form.teds.value = "Allows L1 Engines"; } else if (te == 3) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L30"; document.form.teds.value = "Allows L2 Engines"; } else if (te == 4) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L50"; document.form.teds.value = "Allows L3 Engines"; } else if (te == 5) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L70"; document.form.teds.value = "Allows L4 Engines"; } else if (te == 6) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L90"; document.form.teds.value = "Allows L5 Engines"; } else if (te == 7) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L110"; document.form.teds.value = "Allows L6 Engines"; } else if (te == 8) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L130"; document.form.teds.value = "Allows L7 Engines"; } document.form.sr.value = sr; document.form.su.value = su; document.form.te.value = te; document.form.tenl.value = tenl; document.form.tesu.value = tesu; } function incTR() { if (document.form.trnl.value == "MAX") { document.form.trnl.value = "9"; } ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); tr = eval(document.form.tr.value); trnl = eval(document.form.trnl.value); trsu = eval(document.form.trsu.value); if ( (tr == 1) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L20"; document.form.trds.value = "Allows L2 Reactors"; } else if ( (tr == 2) && (ch >= 20) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L40"; document.form.trds.value = "Allows L3 Reactors"; } else if ( (tr == 3) && (ch >= 40) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L60"; document.form.trds.value = "Allows L4 Reactors"; } else if ( (tr == 4) && (ch >= 60) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L80"; document.form.trds.value = "Allows L5 Reactors"; } else if ( (tr == 5) && (ch >= 80) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L100"; document.form.trds.value = "Allows L6 Reactors"; } else if ( (tr == 6) && (ch >= 100) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L120"; document.form.trds.value = "Allows L7 Reactors"; } else if ( (tr == 7) && (ch >= 120) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L140"; document.form.trds.value = "Allows L8 Reactors"; } else if ( (tr == 8) && (ch >= 140) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "MAX"; document.form.trds.value = "Allows L9 Reactors"; } document.form.sr.value = sr; document.form.su.value = su; document.form.tr.value = tr; document.form.trnl.value = trnl; document.form.trsu.value = trsu; if (document.form.trnl.value == "9") { document.form.trnl.value = "MAX"; } } function decTR() { if (document.form.trnl.value == "MAX") { document.form.trnl.value = "9"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); tr = eval(document.form.tr.value); trnl = eval(document.form.trnl.value); trsu = eval(document.form.trsu.value); if (tr == 2) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "None"; document.form.trds.value = "Allows L1 Reactors"; } else if (tr == 3) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L20"; document.form.trds.value = "Allows L2 Reactors"; } else if (tr == 4) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L40"; document.form.trds.value = "Allows L3 Reactors"; } else if (tr == 5) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L60"; document.form.trds.value = "Allows L4 Reactors"; } else if (tr == 6) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L80"; document.form.trds.value = "Allows L5 Reactors"; } else if (tr == 7) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L100"; document.form.trds.value = "Allows L6 Reactors"; } else if (tr == 8) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L120"; document.form.trds.value = "Allows L7 Reactors"; } else if (tr == 9) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L140"; document.form.trds.value = "Allows L8 Reactors"; } document.form.sr.value = sr; document.form.su.value = su; document.form.tr.value = tr; document.form.trnl.value = trnl; document.form.trsu.value = trsu; } function incTS() { if (document.form.tsnl.value == "MAX") { document.form.tsnl.value = "8"; } ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); ts = eval(document.form.ts.value); tsnl = eval(document.form.tsnl.value); tssu = eval(document.form.tssu.value); if ( (ts == 1) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L30"; document.form.tsds.value = "Allows L2 Shields"; } else if ( (ts == 2) && (ch >= 30) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L50"; document.form.tsds.value = "Allows L3 Shields"; } else if ( (ts == 3) && (ch >= 50) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L70"; document.form.tsds.value = "Allows L4 Shields"; } else if ( (ts == 4) && (ch >= 70) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L90"; document.form.tsds.value = "Allows L5 Shields"; } else if ( (ts == 5) && (ch >= 90) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L110"; document.form.tsds.value = "Allows L6 Shields"; } else if ( (ts == 6) && (ch >= 110) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L130"; document.form.tsds.value = "Allows L7 Shields"; } else if ( (ts == 7) && (ch >= 130) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "MAX"; document.form.tsds.value = "Allows L8 Shields"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ts.value = ts; document.form.tsnl.value = tsnl; document.form.tssu.value = tssu; if (document.form.tsnl.value == "8") { document.form.tsnl.value = "MAX"; } } function decTS() { if (document.form.tsnl.value == "MAX") { document.form.tsnl.value = "8"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ts = eval(document.form.ts.value); tsnl = eval(document.form.tsnl.value); tssu = eval(document.form.tssu.value); if (ts == 2) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "None"; document.form.tsds.value = "Allows L1 Shields"; } else if (ts == 3) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L30"; document.form.tsds.value = "Allows L2 Shields"; } else if (ts == 4) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L50"; document.form.tsds.value = "Allows L3 Shields"; } else if (ts == 5) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L70"; document.form.tsds.value = "Allows L4 Shields"; } else if (ts == 6) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L90"; document.form.tsds.value = "Allows L5 Shields"; } else if (ts == 7) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L110"; document.form.tsds.value = "Allows L6 Shields"; } else if (ts == 8) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L130"; document.form.tsds.value = "Allows L7 Shields"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ts.value = ts; document.form.tsnl.value = tsnl; document.form.tssu.value = tssu; } // RESET function reset() { for (i = 0; i < 9; i++) { decWB(); decWP(); decAO(); decAW(); decAN(); decAF(); decAJ(); decAL(); decPV(); decPP(); decPS(); decBD(); decBR(); decTD(); decTE(); decTR(); decTS(); } document.form.cl.value = 0; document.form.el.value = 0; document.form.tl.value = 0; document.form.ch.value = 0; document.form.st.value = 0; document.form.su.value = 0; document.form.sr.value = 0; document.form.sb.value = 0; upgrades(0); } // MAX SKILLS function maxWB() { for (i = 0; i < 9; i++) { incWB(); } } function maxWP() { for (i = 0; i < 9; i++) { incWP(); } } function maxAO() { for (i = 0; i < 9; i++) { incAO(); } } function maxAW() { for (i = 0; i < 9; i++) { incAW(); } } function maxAN() { for (i = 0; i < 9; i++) { incAN(); } } function maxAF() { for (i = 0; i < 9; i++) { incAF(); } } function maxAJ() { for (i = 0; i < 9; i++) { incAJ(); } } function maxAL() { for (i = 0; i < 9; i++) { incAL(); } } function maxPV() { for (i = 0; i < 9; i++) { incPV(); } } function maxPP() { for (i = 0; i < 9; i++) { incPP(); } } function maxPS() { for (i = 0; i < 9; i++) { incPS(); } } function maxBD() { for (i = 0; i < 9; i++) { incBD(); } } function maxBR() { for (i = 0; i < 9; i++) { incBR(); } } function maxTD() { for (i = 0; i < 9; i++) { incTD(); } } function maxTE() { for (i = 0; i < 9; i++) { incTE(); } } function maxTR() { for (i = 0; i < 9; i++) { incTR(); } } function maxTS() { for (i = 0; i < 9; i++) { incTS(); } } // MIN SKILLS function minWB() { for (i = 0; i < 9; i++) { decWB(); } } function minWP() { for (i = 0; i < 9; i++) { decWP(); } } function minAO() { for (i = 0; i < 9; i++) { decAO(); } } function minAW() { for (i = 0; i < 9; i++) { decAW(); } } function minAN() { for (i = 0; i < 9; i++) { decAN(); } } function minAF() { for (i = 0; i < 9; i++) { decAF();} } function minAJ() { for (i = 0; i < 9; i++) { decAJ(); } } function minAL() { for (i = 0; i < 9; i++) { decAL(); } } function minPV() { for (i = 0; i < 9; i++) { decPV(); } } function minPP() { for (i = 0; i < 9; i++) { decPP(); } } function minPS() { for (i = 0; i < 9; i++) { decPS(); } } function minBD() { for (i = 0; i < 9; i++) { decBD(); } } function minBR() { for (i = 0; i < 9; i++) { decBR(); } } function minTD() { for (i = 0; i < 9; i++) { decTD(); } } function minTE() { for (i = 0; i < 9; i++) { decTE(); } } function minTR() { for (i = 0; i < 9; i++) { decTR(); } } function minTS() { for (i = 0; i < 9; i++) { decTS(); } } // SAVE TO COOKIES expireDate = new Date; expireDate.setMonth(expireDate.getMonth() + 3) // expiration date is 3 months from now function save() { document.cookie = "JEcl=" + document.form.cl.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEel=" + document.form.el.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEtl=" + document.form.tl.value + ";expires=" + expireDate.toGMTString(); // document.cookie = "JEsb=" + document.form.sb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEwb=" + document.form.wb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEwp=" + document.form.wp.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEao=" + document.form.ao.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEaw=" + document.form.aw.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEan=" + document.form.an.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEaf=" + document.form.af.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEaj=" + document.form.aj.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEal=" + document.form.al.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEpv=" + document.form.pv.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEpp=" + document.form.pp.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEps=" + document.form.ps.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEbd=" + document.form.bd.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEbr=" + document.form.br.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEtd=" + document.form.td.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEte=" + document.form.te.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEtr=" + document.form.tr.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JEts=" + document.form.ts.value + ";expires=" + expireDate.toGMTString(); } // LOAD FROM COOKIES function load() { if (document.cookie != "") { thisCookie = document.cookie.split("; "); reset(); for (i = 0; i < thisCookie.length; i++) { if (thisCookie[i].split("=")[0] == "JEcl") { clCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < clCnt; j++) { incCL(); }} if (thisCookie[i].split("=")[0] == "JEel") { elCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < elCnt; j++) { incEL(); }} if (thisCookie[i].split("=")[0] == "JEtl") { tlCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < tlCnt; j++) { incTL(); }} /* if (thisCookie[i].split("=")[0] == "JEsb") { sbCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < sbCnt; j++) { incSB(); }} */ if (thisCookie[i].split("=")[0] == "JEwb") { wbCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (wbCnt - 1); j++) { incWB(); }} if (thisCookie[i].split("=")[0] == "JEwp") { wpCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < wpCnt; j++) { incWP(); }} if (thisCookie[i].split("=")[0] == "JEao") { aoCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < aoCnt; j++) { incAO(); }} if (thisCookie[i].split("=")[0] == "JEaw") { awCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < awCnt; j++) { incAW(); }} if (thisCookie[i].split("=")[0] == "JEan") { anCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < anCnt; j++) { incAN(); }} if (thisCookie[i].split("=")[0] == "JEaf") { afCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < afCnt; j++) { incAF(); }} if (thisCookie[i].split("=")[0] == "JEaj") { ajCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < ajCnt; j++) { incAJ(); }} if (thisCookie[i].split("=")[0] == "JEal") { alCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (alCnt - 1); j++) { incAL(); }} if (thisCookie[i].split("=")[0] == "JEpv") { pvCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < pvCnt; j++) { incPV(); }} if (thisCookie[i].split("=")[0] == "JEpp") { ppCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < ppCnt; j++) { incPP(); }} if (thisCookie[i].split("=")[0] == "JEps") { psCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < psCnt; j++) { incPS(); }} if (thisCookie[i].split("=")[0] == "JEbd") { bdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < bdCnt; j++) { incBD(); }} if (thisCookie[i].split("=")[0] == "JEbr") { brCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < brCnt; j++) { incBR(); }} if (thisCookie[i].split("=")[0] == "JEtd") { tdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tdCnt - 1); j++) { incTD(); }} if (thisCookie[i].split("=")[0] == "JEte") { teCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (teCnt - 1); j++) { incTE(); }} if (thisCookie[i].split("=")[0] == "JEtr") { trCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (trCnt - 1); j++) { incTR(); }} if (thisCookie[i].split("=")[0] == "JEts") { tsCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tsCnt - 1); j++) { incTS(); }} } } }