/********************************************************************* Update Log 1/9/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 Energy 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 - Added fastback functions for CL/EL/TL which were missing 11/18/02 - Corrected function upgrades(ch), all classes incorrectly showing data for JE 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 = "J'nai"; document.form.hl.value = "16"; document.form.ws.value = "2"; document.form.dv.value = "1"; document.form.cg.value = "18"; } else if ( (ch >= 10) && (ch < 30) ) { document.form.rk.value = "D'nai"; document.form.hl.value = "65"; document.form.ws.value = "2"; document.form.dv.value = "2"; document.form.cg.value = "20"; } else if ( (ch >= 30) && (ch < 50) ) { document.form.rk.value = "U'nai"; document.form.hl.value = "260"; document.form.ws.value = "3"; document.form.dv.value = "2"; document.form.cg.value = "22"; } else if ( (ch >= 50) && (ch < 75) ) { document.form.rk.value = "Lai'shao"; document.form.hl.value = "1,000"; document.form.ws.value = "3"; document.form.dv.value = "3"; document.form.cg.value = "24"; } else if ( (ch >= 75) && (ch < 100) ) { document.form.rk.value = "Dai'shao"; document.form.hl.value = "4,100"; document.form.ws.value = "4"; document.form.dv.value = "3"; document.form.cg.value = "26"; } else if ( (ch >= 100) && (ch < 135) ) { document.form.rk.value = "Ten'shao"; document.form.hl.value = "16,500"; document.form.ws.value = "4"; document.form.dv.value = "4"; document.form.cg.value = "28"; } else if ( (ch >= 135) && (ch < 150) ) { document.form.rk.value = "Ken'shao"; document.form.hl.value = "66,000"; document.form.ws.value = "5"; document.form.dv.value = "4"; 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 incWM() { if (document.form.wmnl.value == "MAX") { document.form.wmnl.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); wm = eval(document.form.wm.value); wmnl = eval(document.form.wmnl.value); wmsu = eval(document.form.wmsu.value); if ( (wm == 0) && (ch >= 20) ) { wm++; wmnl++; document.form.wmrq.value = "CL7"; document.form.wmds.value = "Allows L1 Missiles"; } else if ( (wm == 1) && (cl >= 7) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL14"; document.form.wmds.value = "+25% Dmg, +Accuracy, Allows L2 Missiles"; } else if ( (wm == 2) && (cl >= 14) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL21"; document.form.wmds.value = "+50% Dmg, +Accuracy, Allows L3 Missiles"; } else if ( (wm == 3) && (cl >= 21) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL28"; document.form.wmds.value = "+75% Dmg, +Accuracy, Allows L4 Missiles"; } else if ( (wm == 4) && (cl >= 28) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL35"; document.form.wmds.value = "+100% Dmg, +Accuracy, Allows L5 Missiles"; } else if ( (wm == 5) && (cl >= 35) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL42"; document.form.wmds.value = "+125% Dmg, +Accuracy, Allows L6 Missiles"; } else if ( (wm == 6) && (cl >= 42) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL49"; document.form.wmds.value = "+150% Dmg, +Accuracy, Allows L7 Missiles"; } else if ( (wm == 7) && (cl >= 49) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "MAX"; document.form.wmds.value = "+175% Dmg, +Accuracy, Allows L8 Missiles"; } document.form.sr.value = sr; document.form.su.value = su; document.form.wm.value = wm; document.form.wmnl.value = wmnl; document.form.wmsu.value = wmsu; if (document.form.wmnl.value == "8") { document.form.wmnl.value = "MAX"; } } function decWM() { if (document.form.wmnl.value == "MAX") { document.form.wmnl.value = "8"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); wm = eval(document.form.wm.value); wmnl = eval(document.form.wmnl.value); wmsu = eval(document.form.wmsu.value); if (wm == 1) { wm--; wmnl--; document.form.wmrq.value = "L20"; document.form.wmds.value = ""; } else if (wm == 2) { wm--; wmnl = wm; wmsu -= wmnl; su -= wmnl; sr += wmnl; document.form.wmrq.value = "CL7"; document.form.wmds.value = "Allows L1 Missiles"; } else if (wm == 3) { wm--; wmnl = wm; wmsu -= wmnl; su -= wmnl; sr += wmnl; document.form.wmrq.value = "CL14"; document.form.wmds.value = "+25% Dmg, +Accuracy, Allows L2 Missiles"; } else if (wm == 4) { wm--; wmnl = wm; wmsu -= wmnl; su -= wmnl; sr += wmnl; document.form.wmrq.value = "CL21"; document.form.wmds.value = "+50% Dmg, +Accuracy, Allows L3 Missiles"; } else if (wm == 5) { wm--; wmnl = wm; wmsu -= wmnl; su -= wmnl; sr += wmnl; document.form.wmrq.value = "CL28"; document.form.wmds.value = "+75% Dmg, +Accuracy, Allows L4 Missiles"; } else if (wm == 6) { wm--; wmnl = wm; wmsu -= wmnl; su -= wmnl; sr += wmnl; document.form.wmrq.value = "CL35"; document.form.wmds.value = "+100% Dmg, +Accuracy, Allows L5 Missiles"; } else if (wm == 7) { wm--; wmnl = wm; wmsu -= wmnl; su -= wmnl; sr += wmnl; document.form.wmrq.value = "CL42"; document.form.wmds.value = "+125% Dmg, +Accuracy, Allows L6 Missiles"; } else if (wm == 8) { wm--; wmnl = wm; wmsu -= wmnl; su -= wmnl; sr += wmnl; document.form.wmrq.value = "CL49"; document.form.wmds.value = "+150% Dmg, +Accuracy, Allows L7 Missiles"; } document.form.sr.value = sr; document.form.su.value = su; document.form.wm.value = wm; document.form.wmnl.value = wmnl; document.form.wmsu.value = wmsu; } 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 >= 11) ) { 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 = "L11"; 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 = "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); ao = eval(document.form.ao.value); aonl = eval(document.form.aonl.value); aosu = eval(document.form.aosu.value); if ( (ao == 0) && (ch >= 10) ) { 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 = "MAX"; document.form.aods.value = "Cloak time = 3 sec, Enables Combat 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 == "5") { document.form.aonl.value = "MAX"; } } function decAO() { if (document.form.aonl.value == "MAX") { document.form.aonl.value = "5"; } 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 = "L10"; 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"; } 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 incAF() { if (document.form.afnl.value == "MAX") { document.form.afnl.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); af = eval(document.form.af.value); afnl = eval(document.form.afnl.value); afsu = eval(document.form.afsu.value); if (af == 0) { 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 = "EL35"; document.form.afds.value = "Range = 6200, Enables Teleport Friendly"; } else if ( (af == 5) && (el >= 35) && (sr >= afnl) ) { af++; afsu += afnl; su += afnl; sr -= afnl; afnl = af; document.form.afrq.value = "EL45"; document.form.afds.value = "Range = 6500, Enables Directional Teleport"; } else if ( (af == 6) && (el >= 45) && (sr >= afnl) ) { af++; afsu += afnl; su += afnl; sr -= afnl; afnl = af; document.form.afrq.value = "MAX"; document.form.afds.value = "Range = 6800, Enables Area Teleport"; } 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 == "7") { document.form.afnl.value = "MAX"; } } function decAF() { if (document.form.afnl.value == "MAX") { document.form.afnl.value = "7"; } 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 = "None"; 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"; } else if (af == 6) { af--; afnl = af; afsu -= afnl; su -= afnl; sr += afnl; document.form.afrq.value = "EL35"; document.form.afds.value = "Range = 6200, Enables Teleport Friendly"; } else if (af == 7) { af--; afnl = af; afsu -= afnl; su -= afnl; sr += afnl; document.form.afrq.value = "EL45"; document.form.afds.value = "Range = 6500, Enables Directional Teleport"; } 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 incAP() { if (document.form.apnl.value == "MAX") { document.form.apnl.value = "7"; } cl = eval(document.form.cl.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); ap = eval(document.form.ap.value); apnl = eval(document.form.apnl.value); apsu = eval(document.form.apsu.value); if (ap == 0) { ap++; apnl++; document.form.aprq.value = "None"; document.form.apds.value = "Enables Psionic Barrier"; } else if ( (ap == 1) && (sr >= apnl) ) { ap++; apsu += apnl; su += apnl; sr -= apnl; apnl = ap; document.form.aprq.value = "CL5"; document.form.apds.value = "Shield absorb = 60 dmg, Range = 2750"; } else if ( (ap == 2) && (cl >= 5) && (sr >= apnl) ) { ap++; apsu += apnl; su += apnl; sr -= apnl; apnl = ap; document.form.aprq.value = "CL15"; document.form.apds.value = "Range = 3000, Enables Lesser Psionic Shield"; } else if ( (ap == 3) && (cl >= 15) && (sr >= apnl) ) { ap++; apsu += apnl; su += apnl; sr -= apnl; apnl = ap; document.form.aprq.value = "CL25"; document.form.apds.value = "+Shield absorb, Range = 3250"; } else if ( (ap == 4) && (cl >= 25) && (sr >= apnl) ) { ap++; apsu += apnl; su += apnl; sr -= apnl; apnl = ap; document.form.aprq.value = "CL35"; document.form.apds.value = "Range = 3500, Enables Psionic Shield"; } else if ( (ap == 5) && (cl >= 35) && (sr >= apnl) ) { ap++; apsu += apnl; su += apnl; sr -= apnl; apnl = ap; document.form.aprq.value = "CL45"; document.form.apds.value = "Range = 3750, Enables Greater Psionic Shield"; } else if ( (ap == 6) && (cl >= 45) && (sr >= apnl) ) { ap++; apsu += apnl; su += apnl; sr -= apnl; apnl = ap; document.form.aprq.value = "MAX"; document.form.apds.value = "Range = 4000, Enables Psionic Invulnerability"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ap.value = ap; document.form.apnl.value = apnl; document.form.apsu.value = apsu; if (document.form.apnl.value == "7") { document.form.apnl.value = "MAX"; } } function decAP() { if (document.form.apnl.value == "MAX") { document.form.apnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ap = eval(document.form.ap.value); apnl = eval(document.form.apnl.value); apsu = eval(document.form.apsu.value); if (ap == 1) { ap--; apnl--; document.form.aprq.value = "None"; document.form.apds.value = ""; } else if (ap == 2) { ap--; apnl = ap; apsu -= apnl; su -= apnl; sr += apnl; document.form.aprq.value = "None"; document.form.apds.value = "Enables Psionic Barrier"; } else if (ap == 3) { ap--; apnl = ap; apsu -= apnl; su -= apnl; sr += apnl; document.form.aprq.value = "CL5"; document.form.apds.value = "Shield absorb = 60 dmg, Range = 2750"; } else if (ap == 4) { ap--; apnl = ap; apsu -= apnl; su -= apnl; sr += apnl; document.form.aprq.value = "CL15"; document.form.apds.value = "Range = 3000, Enables Lesser Psionic Shield"; } else if (ap == 5) { ap--; apnl = ap; apsu -= apnl; su -= apnl; sr += apnl; document.form.aprq.value = "CL25"; document.form.apds.value = "+Shield absorb, Range = 3250"; } else if (ap == 6) { ap--; apnl = ap; apsu -= apnl; su -= apnl; sr += apnl; document.form.aprq.value = "CL35"; document.form.apds.value = "Range = 3500, Enables Psionic Shield"; } else if (ap == 7) { ap--; apnl = ap; apsu -= apnl; su -= apnl; sr += apnl; document.form.aprq.value = "CL45"; document.form.apds.value = "Range = 3750, Enables Greater Psionic Shield"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ap.value = ap; document.form.apnl.value = apnl; document.form.apsu.value = apsu; } function incAQ() { if (document.form.aqnl.value == "MAX") { document.form.aqnl.value = "7"; } cl = eval(document.form.cl.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); aq = eval(document.form.aq.value); aqnl = eval(document.form.aqnl.value); aqsu = eval(document.form.aqsu.value); if ( (aq == 0) && (ch >= 20) ) { aq++; aqnl++; document.form.aqrq.value = "None"; document.form.aqds.value = "Enables Regenerate Equipment"; } else if ( (aq == 1) && (sr >= aqnl) ) { aq++; aqsu += aqnl; su += aqnl; sr -= aqnl; aqnl = aq; document.form.aqrq.value = "CL5"; document.form.aqds.value = "+Repair rate"; } else if ( (aq == 2) && (cl >= 5) && (sr >= aqnl) ) { aq++; aqsu += aqnl; su += aqnl; sr -= aqnl; aqnl = aq; document.form.aqrq.value = "CL15"; document.form.aqds.value = "+Repair rate, Enables Repair Equipment"; } else if ( (aq == 3) && (cl >= 15) && (sr >= aqnl) ) { aq++; aqsu += aqnl; su += aqnl; sr -= aqnl; aqnl = aq; document.form.aqrq.value = "CL25"; document.form.aqds.value = "+Repair rate, Range = 3250"; } else if ( (aq == 4) && (cl >= 25) && (sr >= aqnl) ) { aq++; aqsu += aqnl; su += aqnl; sr -= aqnl; aqnl = aq; document.form.aqrq.value = "CL35"; document.form.aqds.value = "+Repair rate, Range = 3500, Enables Combat Equipment Repair"; } else if ( (aq == 5) && (cl >= 35) && (sr >= aqnl) ) { aq++; aqsu += aqnl; su += aqnl; sr -= aqnl; aqnl = aq; document.form.aqrq.value = "CL45"; document.form.aqds.value = "+Repair rate, Range = 3750, Enables Area Equipment Repair"; } else if ( (aq == 6) && (cl >= 45) && (sr >= aqnl) ) { aq++; aqsu += aqnl; su += aqnl; sr -= aqnl; aqnl = aq; document.form.aqrq.value = "MAX"; document.form.aqds.value = "+Repair rate, Range = 4000, Enables Improved Area Repair"; } document.form.sr.value = sr; document.form.su.value = su; document.form.aq.value = aq; document.form.aqnl.value = aqnl; document.form.aqsu.value = aqsu; if (document.form.aqnl.value == "7") { document.form.aqnl.value = "MAX"; } } function decAQ() { if (document.form.aqnl.value == "MAX") { document.form.aqnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); aq = eval(document.form.aq.value); aqnl = eval(document.form.aqnl.value); aqsu = eval(document.form.aqsu.value); if (aq == 1) { aq--; aqnl--; document.form.aqrq.value = "L20"; document.form.aqds.value = ""; } else if (aq == 2) { aq--; aqnl = aq; aqsu -= aqnl; su -= aqnl; sr += aqnl; document.form.aqrq.value = "None"; document.form.aqds.value = "Enables Regenerate Equipment"; } else if (aq == 3) { aq--; aqnl = aq; aqsu -= aqnl; su -= aqnl; sr += aqnl; document.form.aqrq.value = "CL5"; document.form.aqds.value = "+Repair rate"; } else if (aq == 4) { aq--; aqnl = aq; aqsu -= aqnl; su -= aqnl; sr += aqnl; document.form.aqrq.value = "CL15"; document.form.aqds.value = "+Repair rate, Enables Repair Equipment"; } else if (aq == 5) { aq--; aqnl = aq; aqsu -= aqnl; su -= aqnl; sr += aqnl; document.form.aqrq.value = "CL25"; document.form.aqds.value = "+Repair rate, Range = 3250"; } else if (aq == 6) { aq--; aqnl = aq; aqsu -= aqnl; su -= aqnl; sr += aqnl; document.form.aqrq.value = "CL35"; document.form.aqds.value = "+Repair rate, Range = 3500, Enables Combat Equipment Repair"; } else if (aq == 7) { aq--; aqnl = aq; aqsu -= aqnl; su -= aqnl; sr += aqnl; document.form.aqrq.value = "CL45"; document.form.aqds.value = "+Repair rate, Range = 3750, Enables Area Equipment Repair"; } document.form.sr.value = sr; document.form.su.value = su; document.form.aq.value = aq; document.form.aqnl.value = aqnl; document.form.aqsu.value = aqsu; } function incAU() { if (document.form.aunl.value == "MAX") { document.form.aunl.value = "7"; } cl = eval(document.form.cl.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); au = eval(document.form.au.value); aunl = eval(document.form.aunl.value); ausu = eval(document.form.ausu.value); if (au == 0) { au++; aunl++; document.form.aurq.value = "None"; document.form.auds.value = "Enables Summon Enemy"; } else if ( (au == 1) && (sr >= aunl) ) { au++; ausu += aunl; su += aunl; sr -= aunl; aunl = au; document.form.aurq.value = "CL5"; document.form.auds.value = "Range = 5250"; } else if ( (au == 2) && (cl >= 5) && (sr >= aunl) ) { au++; ausu += aunl; su += aunl; sr -= aunl; aunl = au; document.form.aurq.value = "CL15"; document.form.auds.value = "Range = 5500, Enables Summon Friend"; } else if ( (au == 3) && (cl >= 15) && (sr >= aunl) ) { au++; ausu += aunl; su += aunl; sr -= aunl; aunl = au; document.form.aurq.value = "CL25"; document.form.auds.value = "Range = 5750"; } else if ( (au == 4) && (cl >= 25) && (sr >= aunl) ) { au++; ausu += aunl; su += aunl; sr -= aunl; aunl = au; document.form.aurq.value = "CL35"; document.form.auds.value = "Range = 6000, Enables Summon Group"; } else if ( (au == 5) && (cl >= 35) && (sr >= aunl) ) { au++; ausu += aunl; su += aunl; sr -= aunl; aunl = au; document.form.aurq.value = "CL45"; document.form.auds.value = "Range = 6250, Enables Summon Enemy Group"; } else if ( (au == 6) && (cl >= 45) && (sr >= aunl) ) { au++; ausu += aunl; su += aunl; sr -= aunl; aunl = au; document.form.aurq.value = "MAX"; document.form.auds.value = "Range = 6500, Enables Return Friend"; } document.form.sr.value = sr; document.form.su.value = su; document.form.au.value = au; document.form.aunl.value = aunl; document.form.ausu.value = ausu; if (document.form.aunl.value == "7") { document.form.aunl.value = "MAX"; } } function decAU() { if (document.form.aunl.value == "MAX") { document.form.aunl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); au = eval(document.form.au.value); aunl = eval(document.form.aunl.value); ausu = eval(document.form.ausu.value); if (au == 1) { au--; aunl--; document.form.aurq.value = "None"; document.form.auds.value = ""; } else if (au == 2) { au--; aunl = au; ausu -= aunl; su -= aunl; sr += aunl; document.form.aurq.value = "None"; document.form.auds.value = "Enables Summon Enemy"; } else if (au == 3) { au--; aunl = au; ausu -= aunl; su -= aunl; sr += aunl; document.form.aurq.value = "CL5"; document.form.auds.value = "Range = 5250"; } else if (au == 4) { au--; aunl = au; ausu -= aunl; su -= aunl; sr += aunl; document.form.aurq.value = "CL15"; document.form.auds.value = "Range = 5500, Enables Summon Friend"; } else if (au == 5) { au--; aunl = au; ausu -= aunl; su -= aunl; sr += aunl; document.form.aurq.value = "CL25"; document.form.auds.value = "Range = 5750"; } else if (au == 6) { au--; aunl = au; ausu -= aunl; su -= aunl; sr += aunl; document.form.aurq.value = "CL35"; document.form.auds.value = "Range = 6000, Enables Summon Group"; } else if (au == 7) { au--; aunl = au; ausu -= aunl; su -= aunl; sr += aunl; document.form.aurq.value = "CL45"; document.form.auds.value = "Range = 6250, Enables Summon Enemy Group"; } document.form.sr.value = sr; document.form.su.value = su; document.form.au.value = au; document.form.aunl.value = aunl; document.form.ausu.value = ausu; } function incAE() { if (document.form.aenl.value == "MAX") { document.form.aenl.value = "7"; } cl = eval(document.form.cl.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); ae = eval(document.form.ae.value); aenl = eval(document.form.aenl.value); aesu = eval(document.form.aesu.value); if ( (ae == 1) && (sr >= aenl) ) { ae++; aesu += aenl; su += aenl; sr -= aenl; aenl = ae; document.form.aerq.value = "CL5"; document.form.aeds.value = "+Drain amount, Range = 1250"; } else if ( (ae == 2) && (cl >= 5) && (sr >= aenl) ) { ae++; aesu += aenl; su += aenl; sr -= aenl; aenl = ae; document.form.aerq.value = "CL15"; document.form.aeds.value = "+Drain amount, Range = 1500, Enables Energy Leech"; } else if ( (ae == 3) && (cl >= 15) && (sr >= aenl) ) { ae++; aesu += aenl; su += aenl; sr -= aenl; aenl = ae; document.form.aerq.value = "CL25"; document.form.aeds.value = "+Drain amount, Range = 1750"; } else if ( (ae == 4) && (cl >= 25) && (sr >= aenl) ) { ae++; aesu += aenl; su += aenl; sr -= aenl; aenl = ae; document.form.aerq.value = "CL35"; document.form.aeds.value = "+Drain amount, Range = 2000, Enables Render Energy"; } else if ( (ae == 5) && (cl >= 35) && (sr >= aenl) ) { ae++; aesu += aenl; su += aenl; sr -= aenl; aenl = ae; document.form.aerq.value = "CL45"; document.form.aeds.value = "+Drain amount, Range = 2250, Enables Energy Leeching Sphere"; } else if ( (ae == 6) && (cl >= 45) && (sr >= aenl) ) { ae++; aesu += aenl; su += aenl; sr -= aenl; aenl = ae; document.form.aerq.value = "MAX"; document.form.aeds.value = "+Drain amount, Range = 2500, Enables Render Engery Sphere"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ae.value = ae; document.form.aenl.value = aenl; document.form.aesu.value = aesu; if (document.form.aenl.value == "7") { document.form.aenl.value = "MAX"; } } function decAE() { if (document.form.aenl.value == "MAX") { document.form.aenl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ae = eval(document.form.ae.value); aenl = eval(document.form.aenl.value); aesu = eval(document.form.aesu.value); if (ae == 2) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "None"; document.form.aeds.value = "Enables Energy Drain"; } else if (ae == 3) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "CL5"; document.form.aeds.value = "+Drain amount, Range = 1250"; } else if (ae == 4) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "CL15"; document.form.aeds.value = "+Drain amount, Range = 1500, Enables Energy Leech"; } else if (ae == 5) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "CL25"; document.form.aeds.value = "+Drain amount, Range = 1750"; } else if (ae == 6) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "CL25"; document.form.aeds.value = "+Drain amount, Range = 2000, Enables Render Energy"; } else if (ae == 7) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "CL35"; document.form.aeds.value = "+Drain amount, Range = 2250, Enables Energy Leeching Sphere"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ae.value = ae; document.form.aenl.value = aenl; document.form.aesu.value = aesu; } // PASSIVE function incPC() { if (document.form.pcnl.value == "MAX") { document.form.pcnl.value = "7"; } cl = eval(document.form.cl.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); pc = eval(document.form.pc.value); pcnl = eval(document.form.pcnl.value); pcsu = eval(document.form.pcsu.value); if (pc == 0) { pc++; pcnl++; document.form.pcrq.value = "None"; document.form.pcds.value = "+10% Critical strike chance"; } else if ( (pc == 1) && (sr >= pcnl) ) { pc++; pcsu += pcnl; su += pcnl; sr -= pcnl; pcnl = pc; document.form.pcrq.value = "CL5"; document.form.pcds.value = "+20% Critical strike chance"; } else if ( (pc == 2) && (cl >= 5) && (sr >= pcnl) ) { pc++; pcsu += pcnl; su += pcnl; sr -= pcnl; pcnl = pc; document.form.pcrq.value = "CL15"; document.form.pcds.value = "+30% Critical strike chance"; } else if ( (pc == 3) && (cl >= 15) && (sr >= pcnl) ) { pc++; pcsu += pcnl; su += pcnl; sr -= pcnl; pcnl = pc; document.form.pcrq.value = "CL25"; document.form.pcds.value = "+40% Critical strike chance"; } else if ( (pc == 4) && (cl >= 25) && (sr >= pcnl) ) { pc++; pcsu += pcnl; su += pcnl; sr -= pcnl; pcnl = pc; document.form.pcrq.value = "CL35"; document.form.pcds.value = "+50% Critical strike chance"; } else if ( (pc == 5) && (cl >= 35) && (sr >= pcnl) ) { pc++; pcsu += pcnl; su += pcnl; sr -= pcnl; pcnl = pc; document.form.pcrq.value = "CL45"; document.form.pcds.value = "+60% Critical strike chance"; } else if ( (pc == 6) && (cl >= 45) && (sr >= pcnl) ) { pc++; pcsu += pcnl; su += pcnl; sr -= pcnl; pcnl = pc; document.form.pcrq.value = "MAX"; document.form.pcds.value = "+70% Critical strike chance"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pc.value = pc; document.form.pcnl.value = pcnl; document.form.pcsu.value = pcsu; if (document.form.pcnl.value == "7") { document.form.pcnl.value = "MAX"; } } function decPC() { if (document.form.pcnl.value == "MAX") { document.form.pcnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); pc = eval(document.form.pc.value); pcnl = eval(document.form.pcnl.value); pcsu = eval(document.form.pcsu.value); if (pc == 1) { pc--; pcnl--; document.form.pcrq.value = "None"; document.form.pcds.value = ""; } else if (pc == 2) { pc--; pcnl = pc; pcsu -= pcnl; su -= pcnl; sr += pcnl; document.form.pcrq.value = "None"; document.form.pcds.value = "+10% Critical strike chance"; } else if (pc == 3) { pc--; pcnl = pc; pcsu -= pcnl; su -= pcnl; sr += pcnl; document.form.pcrq.value = "CL5"; document.form.pcds.value = "+20% Critical strike chance"; } else if (pc == 4) { pc--; pcnl = pc; pcsu -= pcnl; su -= pcnl; sr += pcnl; document.form.pcrq.value = "CL15"; document.form.pcds.value = "+30% Critical strike chance"; } else if (pc == 5) { pc--; pcnl = pc; pcsu -= pcnl; su -= pcnl; sr += pcnl; document.form.pcrq.value = "CL25"; document.form.pcds.value = "+40% Critical strike chance"; } else if (pc == 6) { pc--; pcnl = pc; pcsu -= pcnl; su -= pcnl; sr += pcnl; document.form.pcrq.value = "CL35"; document.form.pcds.value = "+50% Critical strike chance"; } else if (pc == 7) { pc--; pcnl = pc; pcsu -= pcnl; su -= pcnl; sr += pcnl; document.form.pcrq.value = "CL45"; document.form.pcds.value = "+60% Critical strike chance"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pc.value = pc; document.form.pcnl.value = pcnl; document.form.pcsu.value = pcsu; } 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 >= 40) ) { 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 = "L40"; 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) && (ch >= 30) ) { 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 = "L30"; 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 incBW() { if (document.form.bwnl.value == "MAX") { document.form.bwnl.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); bw = eval(document.form.bw.value); bwnl = eval(document.form.bwnl.value); bwsu = eval(document.form.bwsu.value); if ( (bw == 0) && (ch >= 25) ) { bw++; bwnl++; document.form.bwrq.value = "None"; document.form.bwds.value = "Analysis and manufacture of L1 weapons"; } else if ( (bw == 1) && (sr >= bwnl) ) { bw++; bwsu += bwnl; su += bwnl; sr -= bwnl; bwnl = bw; document.form.bwrq.value = "TL5"; document.form.bwds.value = "Analysis and manufacture of L2 weapons"; } else if ( (bw == 2) && (tl >= 5) && (sr >= bwnl) ) { bw++; bwsu += bwnl; su += bwnl; sr -= bwnl; bwnl = bw; document.form.bwrq.value = "TL15"; document.form.bwds.value = "Analysis and manufacture of L3 weapons"; } else if ( (bw == 3) && (tl >= 15) && (sr >= bwnl) ) { bw++; bwsu += bwnl; su += bwnl; sr -= bwnl; bwnl = bw; document.form.bwrq.value = "TL25"; document.form.bwds.value = "Analysis and manufacture of L4 weapons"; } else if ( (bw == 4) && (tl >= 25) && (sr >= bwnl) ) { bw++; bwsu += bwnl; su += bwnl; sr -= bwnl; bwnl = bw; document.form.bwrq.value = "TL35"; document.form.bwds.value = "Analysis and manufacture of L5 weapons"; } else if ( (bw == 5) && (tl >= 35) && (sr >= bwnl) ) { bw++; bwsu += bwnl; su += bwnl; sr -= bwnl; bwnl = bw; document.form.bwrq.value = "TL45"; document.form.bwds.value = "Analysis and manufacture of L6 & L7 weapons"; } else if ( (bw == 6) && (tl >= 45) && (sr >= bwnl) ) { bw++; bwsu += bwnl; su += bwnl; sr -= bwnl; bwnl = bw; document.form.bwrq.value = "MAX"; document.form.bwds.value = "Analysis and manufacture of L8 & L9 weapons"; } document.form.sr.value = sr; document.form.su.value = su; document.form.bw.value = bw; document.form.bwnl.value = bwnl; document.form.bwsu.value = bwsu; if (document.form.bwnl.value == "7") { document.form.bwnl.value = "MAX"; } } function decBW() { if (document.form.bwnl.value == "MAX") { document.form.bwnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); bw = eval(document.form.bw.value); bwnl = eval(document.form.bwnl.value); bwsu = eval(document.form.bwsu.value); if (bw == 1) { bw--; bwnl--; document.form.bwrq.value = "L25"; document.form.bwds.value = ""; } else if (bw == 2) { bw--; bwnl = bw; bwsu -= bwnl; su -= bwnl; sr += bwnl; document.form.bwrq.value = "None"; document.form.bwds.value = "Analysis and manufacture of L1 weapons"; } else if (bw == 3) { bw--; bwnl = bw; bwsu -= bwnl; su -= bwnl; sr += bwnl; document.form.bwrq.value = "TL5"; document.form.bwds.value = "Analysis and manufacture of L2 weapons"; } else if (bw == 4) { bw--; bwnl = bw; bwsu -= bwnl; su -= bwnl; sr += bwnl; document.form.bwrq.value = "TL15"; document.form.bwds.value = "Analysis and manufacture of L3 weapons"; } else if (bw == 5) { bw--; bwnl = bw; bwsu -= bwnl; su -= bwnl; sr += bwnl; document.form.bwrq.value = "TL25"; document.form.bwds.value = "Analysis and manufacture of L4 weapons"; } else if (bw == 6) { bw--; bwnl = bw; bwsu -= bwnl; su -= bwnl; sr += bwnl; document.form.bwrq.value = "TL35"; document.form.bwds.value = "Analysis and manufacture of L5 weapons"; } else if (bw == 7) { bw--; bwnl = bw; bwsu -= bwnl; su -= bwnl; sr += bwnl; document.form.bwrq.value = "TL45"; document.form.bwds.value = "Analysis and manufacture of L6 & L7 weapons"; } document.form.sr.value = sr; document.form.su.value = su; document.form.bw.value = bw; document.form.bwnl.value = bwnl; document.form.bwsu.value = bwsu; } // 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(); decWM(); decWP(); decAO(); decAF(); decAP(); decAQ(); decAU(); decAE(); decPC(); decPS(); decBD(); decBW(); 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 maxWM() { for (i = 0; i < 9; i++) { incWM(); } } function maxWP() { for (i = 0; i < 9; i++) { incWP(); } } function maxAO() { for (i = 0; i < 9; i++) { incAO(); } } function maxAF() { for (i = 0; i < 9; i++) { incAF(); } } function maxAP() { for (i = 0; i < 9; i++) { incAP(); } } function maxAQ() { for (i = 0; i < 9; i++) { incAQ(); } } function maxAU() { for (i = 0; i < 9; i++) { incAU(); } } function maxAE() { for (i = 0; i < 9; i++) { incAE(); } } function maxPC() { for (i = 0; i < 9; i++) { incPC(); } } function maxPS() { for (i = 0; i < 9; i++) { incPS(); } } function maxBD() { for (i = 0; i < 9; i++) { incBD(); } } function maxBW() { for (i = 0; i < 9; i++) { incBW(); } } 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 minWM() { for (i = 0; i < 9; i++) { decWM(); } } function minWP() { for (i = 0; i < 9; i++) { decWP(); } } function minAO() { for (i = 0; i < 9; i++) { decAO(); } } function minAF() { for (i = 0; i < 9; i++) { decAF(); } } function minAP() { for (i = 0; i < 9; i++) { decAP(); } } function minAQ() { for (i = 0; i < 9; i++) { decAQ(); } } function minAU() { for (i = 0; i < 9; i++) { decAU(); } } function minAE() { for (i = 0; i < 9; i++) { decAE(); } } function minPC() { for (i = 0; i < 9; i++) { decPC(); } } function minPS() { for (i = 0; i < 9; i++) { decPS(); } } function minBD() { for (i = 0; i < 9; i++) { decBD(); } } function minBW() { for (i = 0; i < 9; i++) { decBW(); } } 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 = "JWcl=" + document.form.cl.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWel=" + document.form.el.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWtl=" + document.form.tl.value + ";expires=" + expireDate.toGMTString(); // document.cookie = "JEsb=" + document.form.sb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWwb=" + document.form.wb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWwm=" + document.form.wm.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWwp=" + document.form.wp.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWao=" + document.form.ao.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWaf=" + document.form.af.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWap=" + document.form.ap.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWaq=" + document.form.aq.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWau=" + document.form.au.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWae=" + document.form.ae.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWpc=" + document.form.pc.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWps=" + document.form.ps.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWbd=" + document.form.bd.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWbw=" + document.form.bw.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWtd=" + document.form.td.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWte=" + document.form.te.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWtr=" + document.form.tr.value + ";expires=" + expireDate.toGMTString(); document.cookie = "JWts=" + 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] == "JWcl") { clCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < clCnt; j++) { incCL(); }} if (thisCookie[i].split("=")[0] == "JWel") { elCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < elCnt; j++) { incEL(); }} if (thisCookie[i].split("=")[0] == "JWtl") { 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] == "JWwb") { wbCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (wbCnt - 1); j++) { incWB(); }} if (thisCookie[i].split("=")[0] == "JWwm") { wmCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < wmCnt; j++) { incWM(); }} if (thisCookie[i].split("=")[0] == "JWwp") { wpCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < wpCnt; j++) { incWP(); }} if (thisCookie[i].split("=")[0] == "JWao") { aoCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < aoCnt; j++) { incAO(); }} if (thisCookie[i].split("=")[0] == "JWaf") { afCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < afCnt; j++) { incAF(); }} if (thisCookie[i].split("=")[0] == "JWap") { apCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < apCnt; j++) { incAP(); }} if (thisCookie[i].split("=")[0] == "JWaq") { aqCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < aqCnt; j++) { incAQ(); }} if (thisCookie[i].split("=")[0] == "JWau") { auCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < auCnt; j++) { incAU(); }} if (thisCookie[i].split("=")[0] == "JWae") { aeCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (aeCnt - 1); j++) { incAE(); }} if (thisCookie[i].split("=")[0] == "JWpc") { pcCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < pcCnt; j++) { incPC(); }} if (thisCookie[i].split("=")[0] == "JWps") { psCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < psCnt; j++) { incPS(); }} if (thisCookie[i].split("=")[0] == "JWbd") { bdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < bdCnt; j++) { incBD(); }} if (thisCookie[i].split("=")[0] == "JWbw") { bwCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < bwCnt; j++) { incBW(); }} if (thisCookie[i].split("=")[0] == "JWtd") { tdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tdCnt - 1); j++) { incTD(); }} if (thisCookie[i].split("=")[0] == "JWte") { teCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (teCnt - 1); j++) { incTE(); }} if (thisCookie[i].split("=")[0] == "JWtr") { trCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (trCnt - 1); j++) { incTR(); }} if (thisCookie[i].split("=")[0] == "JWts") { tsCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tsCnt - 1); j++) { incTS(); }} } } }