/********************************************************************* 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/6/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 Sap skill from 11/20/02 patch. 11/20/02 - Cost and Req show "MAX" for all skills at highest level - Added reset call in load() to clear data so load doesn't add on to previously recalled data. 11/19/02 - 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 = "Legionnaire"; document.form.hl.value = "20"; 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 = "Centurion"; document.form.hl.value = "80"; document.form.ws.value = "3"; document.form.dv.value = "1"; document.form.cg.value = "20"; } else if ( (ch >= 30) && (ch < 50) ) { document.form.rk.value = "Lancearate"; document.form.hl.value = "320"; 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 = "Praefect"; document.form.hl.value = "1,300"; document.form.ws.value = "4"; document.form.dv.value = "2"; document.form.cg.value = "24"; } else if ( (ch >= 75) && (ch < 100) ) { document.form.rk.value = "Legate"; document.form.hl.value = "5,100"; document.form.ws.value = "5"; document.form.dv.value = "2"; document.form.cg.value = "26"; } else if ( (ch >= 100) && (ch < 135) ) { document.form.rk.value = "Consul"; document.form.hl.value = "20,500"; document.form.ws.value = "5"; document.form.dv.value = "3"; document.form.cg.value = "28"; } else if ( (ch >= 135) && (ch < 150) ) { document.form.rk.value = "Proconsul"; document.form.hl.value = "82,000"; document.form.ws.value = "6"; document.form.dv.value = "3"; 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 = "8"; } 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) && (cl >= 7) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL14"; document.form.wbds.value = "+25% Dmg, +Accuracy, Allows L2 Beams"; } else if ( (wb == 2) && (cl >= 14) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL21"; document.form.wbds.value = "+50% Dmg, +Accuracy, Allows L3 Beams"; } else if ( (wb == 3) && (cl >= 21) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL28"; document.form.wbds.value = "+75% Dmg, +Accuracy, Allows L4 Beams"; } else if ( (wb == 4) && (cl >= 28) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL35"; document.form.wbds.value = "+100% Dmg, +Accuracy, Allows L5 Beams"; } else if ( (wb == 5) && (cl >= 35) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL42"; document.form.wbds.value = "+125% Dmg, +Accuracy, Allows L6 Beams"; } else if ( (wb == 6) && (cl >= 42) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "CL49"; document.form.wbds.value = "+150% Dmg, +Accuracy, Allows L7 Beams"; } else if ( (wb == 7) && (cl >= 49) && (sr >= wbnl) ) { wb++; wbsu += wbnl; su += wbnl; sr -= wbnl; wbnl = wb; document.form.wbrq.value = "MAX"; 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; if (document.form.wbnl.value == "8") { document.form.wbnl.value = "MAX"; } } function decWB() { if (document.form.wbnl.value == "MAX") { document.form.wbnl.value = "8"; } 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 = "CL7"; document.form.wbds.value = "Allows L1 Beams"; } else if (wb == 3) { wb--; wbnl = wb; wbsu -= wbnl; su -= wbnl; sr += wbnl; document.form.wbrq.value = "CL14"; 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 = "CL21"; 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 = "CL28"; 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 = "CL35"; 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 = "CL42"; 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 = "CL49"; document.form.wbds.value = "+150% Dmg, +Accuracy, Allows L7 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); 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) { 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 = "None"; 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 = "9"; } cl = eval(document.form.cl.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) { wp++; wpnl++; document.form.wprq.value = "None"; document.form.wpds.value = "Allows L1 Projectiles"; } else if ( (wp == 1) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL12"; document.form.wpds.value = "+25% Dmg, +Accuracy, Allows L2 Projectiles"; } else if ( (wp == 2) && (cl >= 12) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL18"; document.form.wpds.value = "+50% Dmg, +Accuracy, Allows L3 Projectiles"; } else if ( (wp == 3) && (cl >= 18) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL24"; document.form.wpds.value = "+75% Dmg, +Accuracy, Allows L4 Projectiles"; } else if ( (wp == 4) && (cl >= 24) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL30"; document.form.wpds.value = "+100% Dmg, +Accuracy, Allows L5 Projectiles"; } else if ( (wp == 5) && (cl >= 30) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL36"; document.form.wpds.value = "+125% Dmg, +Accuracy, Allows L6 Projectiles"; } else if ( (wp == 6) && (cl >= 36) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL42"; document.form.wpds.value = "+150% Dmg, +Accuracy, Allows L7 Projectiles"; } else if ( (wp == 7) && (cl >= 42) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "CL50"; document.form.wpds.value = "+175% Dmg, +Accuracy, Allows L8 Projectiles"; } else if ( (wp == 8) && (cl >= 50) && (sr >= wpnl) ) { wp++; wpsu += wpnl; su += wpnl; sr -= wpnl; wpnl = wp; document.form.wprq.value = "MAX"; document.form.wpds.value = "+200% Dmg, +Accuracy, Allows L9 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 == "9") { document.form.wpnl.value = "MAX"; } } function decWP() { if (document.form.wpnl.value == "MAX") { document.form.wpnl.value = "9"; } 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 = "None"; document.form.wpds.value = ""; } else if (wp == 2) { wp--; wpnl = wp; wpsu -= wpnl; su -= wpnl; sr += wpnl; document.form.wprq.value = "None"; document.form.wpds.value = "Allows L1 Projectiles"; } else if (wp == 3) { wp--; wpnl = wp; wpsu -= wpnl; su -= wpnl; sr += wpnl; document.form.wprq.value = "CL12"; 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 = "CL18"; 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 = "CL24"; 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 = "CL30"; 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 = "CL36"; 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 = "CL42"; document.form.wpds.value = "+150% Dmg, +Accuracy, Allows L7 Projectiles"; } else if (wp == 9) { wp--; wpnl = wp; wpsu -= wpnl; su -= wpnl; sr += wpnl; document.form.wprq.value = "CL50"; 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; } // ACTIVE function incAE() { if (document.form.aenl.value == "MAX") { document.form.aenl.value = "5"; } cl = eval(document.form.cl.value); ch = eval(document.form.ch.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 == 0) && (ch >= 35) ){ ae++; aenl++; document.form.aerq.value = "None"; document.form.aeds.value = "Enables Anger"; } else if ( (ae == 1) && (sr >= aenl) ) { ae++; aesu += aenl; su += aenl; sr -= aenl; aenl = ae; document.form.aerq.value = "CL5"; document.form.aeds.value = "+Skill power, Range = 5250"; } 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 = "+Skill power, Range = 5500, Enables Cause Aggression"; } 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 = "+Skill power, Range = 5750"; } else if ( (ae == 4) && (cl >= 25) && (sr >= aenl) ) { ae++; aesu += aenl; su += aenl; sr -= aenl; aenl = ae; document.form.aerq.value = "MAX"; document.form.aeds.value = "+Skill power, Range = 6000, Enables Enrage"; } 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 == "5") { document.form.aenl.value = "MAX"; } } function decAE() { if (document.form.aenl.value == "MAX") { document.form.aenl.value = "5"; } 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) { ae--; aenl--; document.form.aerq.value = "L35"; document.form.aeds.value = ""; } else if (ae == 2) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "None"; document.form.aeds.value = "Enables Anger"; } else if (ae == 3) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "CL5"; document.form.aeds.value = "+Skill power, Range = 5250"; } else if (ae == 4) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "CL15"; document.form.aeds.value = "+Skill power, Range = 5500, Enables Cause Aggression"; } else if (ae == 5) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "CL25"; document.form.aeds.value = "+Skill power, Range = 5750"; } 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; } function incAG() { if (document.form.agnl.value == "MAX") { document.form.agnl.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); ag = eval(document.form.ag.value); agnl = eval(document.form.agnl.value); agsu = eval(document.form.agsu.value); if (ag == 0) { ag++; agnl++; document.form.agrq.value = "None"; document.form.agds.value = "Enables Mass Field"; } else if ( (ag == 1) && (sr >= agnl) ) { ag++; agsu += agnl; su += agnl; sr -= agnl; agnl = ag; document.form.agrq.value = "CL5"; document.form.agds.value = "+Skill power, Range = 5250"; } else if ( (ag == 2) && (cl >= 5) && (sr >= agnl) ) { ag++; agsu += agnl; su += agnl; sr -= agnl; agnl = ag; document.form.agrq.value = "CL15"; document.form.agds.value = "+Skill power, Range = 5500, Enables Gravity Field"; } else if ( (ag == 3) && (cl >= 15) && (sr >= agnl) ) { ag++; agsu += agnl; su += agnl; sr -= agnl; agnl = ag; document.form.agrq.value = "CL25"; document.form.agds.value = "+Skill power, Range = 5750"; } else if ( (ag == 4) && (cl >= 25) && (sr >= agnl) ) { ag++; agsu += agnl; su += agnl; sr -= agnl; agnl = ag; document.form.agrq.value = "CL35"; document.form.agds.value = "+Skill power, Range = 6000, Enables Immobilization Field"; } else if ( (ag == 5) && (cl >= 35) && (sr >= agnl) ) { ag++; agsu += agnl; su += agnl; sr -= agnl; agnl = ag; document.form.agrq.value = "CL45"; document.form.agds.value = "+Skill power, Range = 6250, Enables Area Mass Field"; } else if ( (ag == 6) && (cl >= 45) && (sr >= agnl) ) { ag++; agsu += agnl; su += agnl; sr -= agnl; agnl = ag; document.form.agrq.value = "MAX"; document.form.agds.value = "+Skill power, Range = 6500, Enables Area Immobilization Field"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ag.value = ag; document.form.agnl.value = agnl; document.form.agsu.value = agsu; if (document.form.agnl.value == "7") { document.form.agnl.value = "MAX"; } } function decAG() { if (document.form.agnl.value == "MAX") { document.form.agnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ag = eval(document.form.ag.value); agnl = eval(document.form.agnl.value); agsu = eval(document.form.agsu.value); if (ag == 1) { ag--; agnl--; document.form.agrq.value = "None"; document.form.agds.value = ""; } else if (ag == 2) { ag--; agnl = ag; agsu -= agnl; su -= agnl; sr += agnl; document.form.agrq.value = "None"; document.form.agds.value = "Enables Mass Field"; } else if (ag == 3) { ag--; agnl = ag; agsu -= agnl; su -= agnl; sr += agnl; document.form.agrq.value = "CL5"; document.form.agds.value = "+Skill power, Range = 5250"; } else if (ag == 4) { ag--; agnl = ag; agsu -= agnl; su -= agnl; sr += agnl; document.form.agrq.value = "CL15"; document.form.agds.value = "+Skill power, Range = 5500, Enables Gravity Field"; } else if (ag == 5) { ag--; agnl = ag; agsu -= agnl; su -= agnl; sr += agnl; document.form.agrq.value = "CL25"; document.form.agds.value = "+Skill power, Range = 5750"; } else if (ag == 6) { ag--; agnl = ag; agsu -= agnl; su -= agnl; sr += agnl; document.form.agrq.value = "CL35"; document.form.agds.value = "+Skill power, Range = 6000, Enables Immobilization Field"; } else if (ag == 7) { ag--; agnl = ag; agsu -= agnl; su -= agnl; sr += agnl; document.form.agrq.value = "CL45"; document.form.agds.value = "+Skill power, Range = 6250, Enables Area Mass Field"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ag.value = ag; document.form.agnl.value = agnl; document.form.agsu.value = agsu; } 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 incAT() { if (document.form.atnl.value == "MAX") { document.form.atnl.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); at = eval(document.form.at.value); atnl = eval(document.form.atnl.value); atsu = eval(document.form.atsu.value); if ( (at == 0) && (ch >= 40) ) { at++; atnl++; document.form.atrq.value = "None"; document.form.atds.value = "Enables Self Destruct I"; } else if ( (at == 1) && (sr >= atnl) ) { at++; atsu += atnl; su += atnl; sr -= atnl; atnl = at; document.form.atrq.value = "CL5"; document.form.atds.value = "+Dmg, Dmg radius = 1250"; } else if ( (at == 2) && (cl >= 5) && (sr >= atnl) ) { at++; atsu += atnl; su += atnl; sr -= atnl; atnl = at; document.form.atrq.value = "CL15"; document.form.atds.value = "Dmg radius = 1500, Enables Self Destruct II"; } else if ( (at == 3) && (cl >= 15) && (sr >= atnl) ) { at++; atsu += atnl; su += atnl; sr -= atnl; atnl = at; document.form.atrq.value = "CL25"; document.form.atds.value = "+Dmg, Dmg radius = 1750"; } else if ( (at == 4) && (cl >= 25) && (sr >= atnl) ) { at++; atsu += atnl; su += atnl; sr -= atnl; atnl = at; document.form.atrq.value = "CL35"; document.form.atds.value = "Dmg radius = 2000, Enables Self Destruct III"; } else if ( (at == 5) && (cl >= 35) && (sr >= atnl) ) { at++; atsu += atnl; su += atnl; sr -= atnl; atnl = at; document.form.atrq.value = "CL45"; document.form.atds.value = "Dmg radius = 2250, Enables Self Destruct IV"; } else if ( (at == 6) && (cl >= 45) && (sr >= atnl) ) { at++; atsu += atnl; su += atnl; sr -= atnl; atnl = at; document.form.atrq.value = "MAX"; document.form.atds.value = "Dmg radius = 2500, Enables Self Destruct V"; } document.form.sr.value = sr; document.form.su.value = su; document.form.at.value = at; document.form.atnl.value = atnl; document.form.atsu.value = atsu; if (document.form.atnl.value == "7") { document.form.atnl.value = "MAX"; } } function decAT() { if (document.form.atnl.value == "MAX") { document.form.atnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); at = eval(document.form.at.value); atnl = eval(document.form.atnl.value); atsu = eval(document.form.atsu.value); if (at == 1) { at--; atnl--; document.form.atrq.value = "L40"; document.form.atds.value = ""; } else if (at == 2) { at--; atnl = at; atsu -= atnl; su -= atnl; sr += atnl; document.form.atrq.value = "None"; document.form.atds.value = "Enables Self Destruct I"; } else if (at == 3) { at--; atnl = at; atsu -= atnl; su -= atnl; sr += atnl; document.form.atrq.value = "CL5"; document.form.atds.value = "+Dmg, Dmg radius = 1250"; } else if (at == 4) { at--; atnl = at; atsu -= atnl; su -= atnl; sr += atnl; document.form.atrq.value = "CL15"; document.form.atds.value = "Dmg radius = 1500, Enables Self Destruct II"; } else if (at == 5) { at--; atnl = at; atsu -= atnl; su -= atnl; sr += atnl; document.form.atrq.value = "CL25"; document.form.atds.value = "+Dmg, Dmg radius = 1750"; } else if (at == 6) { at--; atnl = at; atsu -= atnl; su -= atnl; sr += atnl; document.form.atrq.value = "CL35"; document.form.atds.value = "Dmg radius = 2000, Enables Self Destruct III"; } else if (at == 7) { at--; atnl = at; atsu -= atnl; su -= atnl; sr += atnl; document.form.atrq.value = "CL45"; document.form.atds.value = "Dmg radius = 2250, Enables Self Destruct IV"; } document.form.sr.value = sr; document.form.su.value = su; document.form.at.value = at; document.form.atnl.value = atnl; document.form.atsu.value = atsu; } function incAV() { if (document.form.avnl.value == "MAX") { document.form.avnl.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); av = eval(document.form.av.value); avnl = eval(document.form.avnl.value); avsu = eval(document.form.avsu.value); if (av == 0) { av++; avnl++; document.form.avrq.value = "None"; document.form.avds.value = "Enables Shield Ram"; } else if ( (av == 1) && (sr >= avnl) ) { av++; avsu += avnl; su += avnl; sr -= avnl; avnl = av; document.form.avrq.value = "CL5"; document.form.avds.value = "Range = 1250"; } else if ( (av == 2) && (cl >= 5) && (sr >= avnl) ) { av++; avsu += avnl; su += avnl; sr -= avnl; avnl = av; document.form.avrq.value = "CL15"; document.form.avds.value = "Range = 1500, Enables Shield Spike"; } else if ( (av == 3) && (cl >= 15) && (sr >= avnl) ) { av++; avsu += avnl; su += avnl; sr -= avnl; avnl = av; document.form.avrq.value = "CL25"; document.form.avds.value = "Range = 1750"; } else if ( (av == 4) && (cl >= 25) && (sr >= avnl) ) { av++; avsu += avnl; su += avnl; sr -= avnl; avnl = av; document.form.avrq.value = "CL35"; document.form.avds.value = "Range = 2000, Enables Shield Burn"; } else if ( (av == 5) && (cl >= 35) && (sr >= avnl) ) { av++; avsu += avnl; su += avnl; sr -= avnl; avnl = av; document.form.avrq.value = "CL45"; document.form.avds.value = "Range = 2250, Enables Shield Flare"; } else if ( (av == 6) && (cl >= 45) && (sr >= avnl) ) { av++; avsu += avnl; su += avnl; sr -= avnl; avnl = av; document.form.avrq.value = "MAX"; document.form.avds.value = "Range = 2500, Enables Shield Nova"; } document.form.sr.value = sr; document.form.su.value = su; document.form.av.value = av; document.form.avnl.value = avnl; document.form.avsu.value = avsu; if (document.form.avnl.value == "7") { document.form.avnl.value = "MAX"; } } function decAV() { if (document.form.avnl.value == "MAX") { document.form.avnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); av = eval(document.form.av.value); avnl = eval(document.form.avnl.value); avsu = eval(document.form.avsu.value); if (av == 1) { av--; avnl--; document.form.avrq.value = "None"; document.form.avds.value = ""; } else if (av == 2) { av--; avnl = av; avsu -= avnl; su -= avnl; sr += avnl; document.form.avrq.value = "None"; document.form.avds.value = "Enables Shield Ram"; } else if (av == 3) { av--; avnl = av; avsu -= avnl; su -= avnl; sr += avnl; document.form.avrq.value = "CL5"; document.form.avds.value = "Range = 1250"; } else if (av == 4) { av--; avnl = av; avsu -= avnl; su -= avnl; sr += avnl; document.form.avrq.value = "CL15"; document.form.avds.value = "Range = 1500, Enables Shield Spike"; } else if (av == 5) { av--; avnl = av; avsu -= avnl; su -= avnl; sr += avnl; document.form.avrq.value = "CL25"; document.form.avds.value = "Range = 1750"; } else if (av == 6) { av--; avnl = av; avsu -= avnl; su -= avnl; sr += avnl; document.form.avrq.value = "CL35"; document.form.avds.value = "Range = 2000, Enables Shield Burn"; } else if (av == 7) { av--; avnl = av; avsu -= avnl; su -= avnl; sr += avnl; document.form.avrq.value = "CL45"; document.form.avds.value = "Range = 2250, Enables Shield Flare"; } document.form.sr.value = sr; document.form.su.value = su; document.form.av.value = av; document.form.avnl.value = avnl; document.form.avsu.value = avsu; } function incAS() { if (document.form.asnl.value == "MAX") { document.form.asnl.value = "7"; } cl = eval(document.form.cl.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); as = eval(document.form.as.value); asnl = eval(document.form.asnl.value); assu = eval(document.form.assu.value); if ( (as == 1) && (sr >= asnl) ) { as++; assu += asnl; su += asnl; sr -= asnl; asnl = as; document.form.asrq.value = "CL5"; document.form.asds.value = "+Drain amount, Range = 1250"; } else if ( (as == 2) && (cl >= 5) && (sr >= asnl) ) { as++; assu += asnl; su += asnl; sr -= asnl; asnl = as; document.form.asrq.value = "CL15"; document.form.asds.value = "Range = 1500, Enables Shield Transfer"; } else if ( (as == 3) && (cl >= 15) && (sr >= asnl) ) { as++; assu += asnl; su += asnl; sr -= asnl; asnl = as; document.form.asrq.value = "CL25"; document.form.asds.value = "+Drain amount, +Transfer amount, Range = 1750"; } else if ( (as == 4) && (cl >= 25) && (sr >= asnl) ) { as++; assu += asnl; su += asnl; sr -= asnl; asnl = as; document.form.asrq.value = "CL35"; document.form.asds.value = "Range = 2000, Enables Group Sap"; } else if ( (as == 5) && (cl >= 35) && (sr >= asnl) ) { as++; assu += asnl; su += asnl; sr -= asnl; asnl = as; document.form.asrq.value = "CL45"; document.form.asds.value = "Range = 2250, Enables Sapping Sphere"; } else if ( (as == 6) && (cl >= 45) && (sr >= asnl) ) { as++; assu += asnl; su += asnl; sr -= asnl; asnl = as; document.form.asrq.value = "MAX"; document.form.asds.value = "Range = 2500, Enables Group Sapping Sphere"; } document.form.sr.value = sr; document.form.su.value = su; document.form.as.value = as; document.form.asnl.value = asnl; document.form.assu.value = assu; if (document.form.asnl.value == "7") { document.form.asnl.value = "MAX"; } } function decAS() { if (document.form.asnl.value == "MAX") { document.form.asnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); as = eval(document.form.as.value); asnl = eval(document.form.asnl.value); assu = eval(document.form.assu.value); if (as == 2) { as--; asnl = as; assu -= asnl; su -= asnl; sr += asnl; document.form.asrq.value = "None"; document.form.asds.value = "Enable Shield Sap"; } else if (as == 3) { as--; asnl = as; assu -= asnl; su -= asnl; sr += asnl; document.form.asrq.value = "CL5"; document.form.asds.value = "+Drain amount, Range = 1250"; } else if (as == 4) { as--; asnl = as; assu -= asnl; su -= asnl; sr += asnl; document.form.asrq.value = "CL15"; document.form.asds.value = "Range = 1500, Enables Shield Transfer"; } else if (as == 5) { as--; asnl = as; assu -= asnl; su -= asnl; sr += asnl; document.form.asrq.value = "CL25"; document.form.asds.value = "+Drain amount, +Transfer amount, Range = 1750"; } else if (as == 6) { as--; asnl = as; assu -= asnl; su -= asnl; sr += asnl; document.form.asrq.value = "CL25"; document.form.asds.value = "Range = 2000, Enables Group Sap"; } else if (as == 7) { as--; asnl = as; assu -= asnl; su -= asnl; sr += asnl; document.form.asrq.value = "CL35"; document.form.asds.value = "Range = 2250, Enables Sapping Sphere"; } document.form.sr.value = sr; document.form.su.value = su; document.form.as.value = as; document.form.asnl.value = asnl; document.form.assu.value = assu; } // PASSIVE function incPT() { if (document.form.ptnl.value == "MAX") { document.form.ptnl.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); pt = eval(document.form.pt.value); ptnl = eval(document.form.ptnl.value); ptsu = eval(document.form.ptsu.value); if ( (pt == 0) && (ch >= 10) ){ pt++; ptnl++; document.form.ptrq.value = "None"; document.form.ptds.value = "+Projectile accuracy, 3 sec linger"; } else if ( (pt == 1) && (sr >= ptnl) ) { pt++; ptsu += ptnl; su += ptnl; sr -= ptnl; ptnl = pt; document.form.ptrq.value = "CL5"; document.form.ptds.value = "+Projectile accuracy, 6 sec linger"; } else if ( (pt == 2) && (cl >= 5) && (sr >= ptnl) ) { pt++; ptsu += ptnl; su += ptnl; sr -= ptnl; ptnl = pt; document.form.ptrq.value = "CL15"; document.form.ptds.value = "+Projectile accuracy, +13 dmg resist, 9 sec linger"; } else if ( (pt == 3) && (cl >= 15) && (sr >= ptnl) ) { pt++; ptsu += ptnl; su += ptnl; sr -= ptnl; ptnl = pt; document.form.ptrq.value = "CL25"; document.form.ptds.value = "+Weapon accuracy, +Dmg resist, 12 sec linger"; } else if ( (pt == 4) && (cl >= 25) && (sr >= ptnl) ) { pt++; ptsu += ptnl; su += ptnl; sr -= ptnl; ptnl = pt; document.form.ptrq.value = "CL35"; document.form.ptds.value = "+Weapon and beam accuracy, +Dmg resist, 15 sec linger"; } else if ( (pt == 5) && (cl >= 35) && (sr >= ptnl) ) { pt++; ptsu += ptnl; su += ptnl; sr -= ptnl; ptnl = pt; document.form.ptrq.value = "CL45"; document.form.ptds.value = "+Weapon accuracy, +Dmg resist, +Reactor recharge, 18 sec linger"; } else if ( (pt == 6) && (cl >= 45) && (sr >= ptnl) ) { pt++; ptsu += ptnl; su += ptnl; sr -= ptnl; ptnl = pt; document.form.ptrq.value = "MAX"; document.form.ptds.value = "+All previous bonuses, +Shield regen, 21 sec linger"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pt.value = pt; document.form.ptnl.value = ptnl; document.form.ptsu.value = ptsu; if (document.form.ptnl.value == "7") { document.form.ptnl.value = "MAX"; } } function decPT() { if (document.form.ptnl.value == "MAX") { document.form.ptnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); pt = eval(document.form.pt.value); ptnl = eval(document.form.ptnl.value); ptsu = eval(document.form.ptsu.value); if (pt == 1) { pt--; ptnl--; document.form.ptrq.value = "L10"; document.form.ptds.value = ""; } else if (pt == 2) { pt--; ptnl = pt; ptsu -= ptnl; su -= ptnl; sr += ptnl; document.form.ptrq.value = "None"; document.form.ptds.value = "+Projectile accuracy, 3 sec linger"; } else if (pt == 3) { pt--; ptnl = pt; ptsu -= ptnl; su -= ptnl; sr += ptnl; document.form.ptrq.value = "CL5"; document.form.ptds.value = "+Projectile accuracy, 6 sec linger"; } else if (pt == 4) { pt--; ptnl = pt; ptsu -= ptnl; su -= ptnl; sr += ptnl; document.form.ptrq.value = "CL15"; document.form.ptds.value = "+Projectile accuracy, +13 dmg resist, 9 sec linger"; } else if (pt == 5) { pt--; ptnl = pt; ptsu -= ptnl; su -= ptnl; sr += ptnl; document.form.ptrq.value = "CL25"; document.form.ptds.value = "+Weapon accuracy, +Dmg resist, 12 sec linger"; } else if (pt == 6) { pt--; ptnl = pt; ptsu -= ptnl; su -= ptnl; sr += ptnl; document.form.ptrq.value = "CL35"; document.form.ptds.value = "+Weapon and beam accuracy, +Dmg resist, 15 sec linger"; } else if (pt == 7) { pt--; ptnl = pt; ptsu -= ptnl; su -= ptnl; sr += ptnl; document.form.ptrq.value = "CL45"; document.form.ptds.value = "+Weapon accuracy, +Dmg resist, +Reactor recharge, 18 sec linger"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pt.value = pt; document.form.ptnl.value = ptnl; document.form.ptsu.value = ptsu; } 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) && (ch >= 10) ) { 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 = "L10"; 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 incPD() { if (document.form.pdnl.value == "MAX") { document.form.pdnl.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); pd = eval(document.form.pd.value); pdnl = eval(document.form.pdnl.value); pdsu = eval(document.form.pdsu.value); if ( (pd == 0) && (ch >= 9) ) { pd++; pdnl++; document.form.pdrq.value = "None"; document.form.pdds.value = "-20% Hull damage"; } else if ( (pd == 1) && (sr >= pdnl) ) { pd++; pdsu += pdnl; su += pdnl; sr -= pdnl; pdnl = pd; document.form.pdrq.value = "CL5"; document.form.pdds.value = "-25% Hull damage"; } else if ( (pd == 2) && (cl >= 5) && (sr >= pdnl) ) { pd++; pdsu += pdnl; su += pdnl; sr -= pdnl; pdnl = pd; document.form.pdrq.value = "CL15"; document.form.pdds.value = "-30% Hull damage"; } else if ( (pd == 3) && (cl >= 15) && (sr >= pdnl) ) { pd++; pdsu += pdnl; su += pdnl; sr -= pdnl; pdnl = pd; document.form.pdrq.value = "CL25"; document.form.pdds.value = "-35% Hull damage"; } else if ( (pd == 4) && (cl >= 25) && (sr >= pdnl) ) { pd++; pdsu += pdnl; su += pdnl; sr -= pdnl; pdnl = pd; document.form.pdrq.value = "CL35"; document.form.pdds.value = "-40% Hull damage"; } else if ( (pd == 5) && (cl >= 35) && (sr >= pdnl) ) { pd++; pdsu += pdnl; su += pdnl; sr -= pdnl; pdnl = pd; document.form.pdrq.value = "CL45"; document.form.pdds.value = "-45% Hull damage"; } else if ( (pd == 6) && (cl >= 45) && (sr >= pdnl) ) { pd++; pdsu += pdnl; su += pdnl; sr -= pdnl; pdnl = pd; document.form.pdrq.value = "MAX"; document.form.pdds.value = "-50% Hull damage"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pd.value = pd; document.form.pdnl.value = pdnl; document.form.pdsu.value = pdsu; if (document.form.pdnl.value == "7") { document.form.pdnl.value = "MAX"; } } function decPD() { if (document.form.pdnl.value == "MAX") { document.form.pdnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); pd = eval(document.form.pd.value); pdnl = eval(document.form.pdnl.value); pdsu = eval(document.form.pdsu.value); if (pd == 1) { pd--; pdnl--; document.form.pdrq.value = "L9"; document.form.pdds.value = ""; } else if (pd == 2) { pd--; pdnl = pd; pdsu -= pdnl; su -= pdnl; sr += pdnl; document.form.pdrq.value = "None"; document.form.pdds.value = "-20% Hull Damage"; } else if (pd == 3) { pd--; pdnl = pd; pdsu -= pdnl; su -= pdnl; sr += pdnl; document.form.pdrq.value = "CL5"; document.form.pdds.value = "-25% Hull Damage"; } else if (pd == 4) { pd--; pdnl = pd; pdsu -= pdnl; su -= pdnl; sr += pdnl; document.form.pdrq.value = "CL15"; document.form.pdds.value = "-30% Hull Damage"; } else if (pd == 5) { pd--; pdnl = pd; pdsu -= pdnl; su -= pdnl; sr += pdnl; document.form.pdrq.value = "CL25"; document.form.pdds.value = "-35% Hull Damage"; } else if (pd == 6) { pd--; pdnl = pd; pdsu -= pdnl; su -= pdnl; sr += pdnl; document.form.pdrq.value = "CL35"; document.form.pdds.value = "-40% Hull Damage"; } else if (pd == 7) { pd--; pdnl = pd; pdsu -= pdnl; su -= pdnl; sr += pdnl; document.form.pdrq.value = "CL45"; document.form.pdds.value = "-45% Hull Damage"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pd.value = pd; document.form.pdnl.value = pdnl; document.form.pdsu.value = pdsu; } // BUILD 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 >= 10) ) { 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 = "L10"; 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 = "8"; } 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 = "L30"; document.form.tdds.value = "Allows L2 Devices"; } else if ( (td == 2) && (ch >= 30) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L50"; document.form.tdds.value = "Allows L3 Devices"; } else if ( (td == 3) && (ch >= 50) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L70"; document.form.tdds.value = "Allows L4 Devices"; } else if ( (td == 4) && (ch >= 70) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L90"; document.form.tdds.value = "Allows L5 Devices"; } else if ( (td == 5) && (ch >= 90) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L110"; document.form.tdds.value = "Allows L6 Devices"; } else if ( (td == 6) && (ch >= 110) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L130"; document.form.tdds.value = "Allows L7 Devices"; } else if ( (td == 7) && (ch >= 130) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "MAX"; 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; if (document.form.tdnl.value == "8") { document.form.tdnl.value = "MAX"; } } function decTD() { if (document.form.tdnl.value == "MAX") { document.form.tdnl.value = "8"; } 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 = "L30"; document.form.tdds.value = "Allows L2 Devices"; } else if (td == 4) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L50"; document.form.tdds.value = "Allows L3 Devices"; } else if (td == 5) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L70"; document.form.tdds.value = "Allows L4 Devices"; } else if (td == 6) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L90"; document.form.tdds.value = "Allows L5 Devices"; } else if (td == 7) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L110"; document.form.tdds.value = "Allows L6 Devices"; } else if (td == 8) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L130"; document.form.tdds.value = "Allows L7 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 = "9"; } 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 = "L20"; document.form.tsds.value = "Allows L2 Shields"; } else if ( (ts == 2) && (ch >= 20) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L40"; document.form.tsds.value = "Allows L3 Shields"; } else if ( (ts == 3) && (ch >= 40) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L60"; document.form.tsds.value = "Allows L4 Shields"; } else if ( (ts == 4) && (ch >= 60) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L80"; document.form.tsds.value = "Allows L5 Shields"; } else if ( (ts == 5) && (ch >= 80) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L100"; document.form.tsds.value = "Allows L6 Shields"; } else if ( (ts == 6) && (ch >= 100) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L120"; document.form.tsds.value = "Allows L7 Shields"; } else if ( (ts == 7) && (ch >= 120) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "L140"; document.form.tsds.value = "Allows L8 Shields"; } else if ( (ts == 8) && (ch >= 140) && (sr >= tsnl) ) { ts++; tssu += tsnl; su += tsnl; sr -= tsnl; tsnl = ts; document.form.tsrq.value = "MAX"; document.form.tsds.value = "Allows L9 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 == "9") { document.form.tsnl.value = "MAX"; } } function decTS() { if (document.form.tsnl.value == "MAX") { document.form.tsnl.value = "9"; } 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 = "L20"; document.form.tsds.value = "Allows L2 Shields"; } else if (ts == 4) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L40"; document.form.tsds.value = "Allows L3 Shields"; } else if (ts == 5) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L60"; document.form.tsds.value = "Allows L4 Shields"; } else if (ts == 6) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L80"; document.form.tsds.value = "Allows L5 Shields"; } else if (ts == 7) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L100"; document.form.tsds.value = "Allows L6 Shields"; } else if (ts == 8) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L120"; document.form.tsds.value = "Allows L7 Shields"; } else if (ts == 9) { ts--; tsnl = ts; tssu -= tsnl; su -= tsnl; sr += tsnl; document.form.tsrq.value = "L140"; 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; } // RESET function reset() { for (i = 0; i < 9; i++) { decWB(); decWM(); decWP(); decAE(); decAG(); decAQ(); decAT(); decAV(); decAS(); decPT(); decPC(); decPD(); 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 maxAE() { for (i = 0; i < 9; i++) { incAE(); } } function maxAG() { for (i = 0; i < 9; i++) { incAG(); } } function maxAQ() { for (i = 0; i < 9; i++) { incAQ(); } } function maxAT() { for (i = 0; i < 9; i++) { incAT(); } } function maxAV() { for (i = 0; i < 9; i++) { incAV(); } } function maxAS() { for (i = 0; i < 9; i++) { incAS(); } } function maxPT() { for (i = 0; i < 9; i++) { incPT(); } } function maxPC() { for (i = 0; i < 9; i++) { incPC(); } } function maxPD() { for (i = 0; i < 9; i++) { incPD(); } } 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 minAE() { for (i = 0; i < 9; i++) { decAE(); } } function minAG() { for (i = 0; i < 9; i++) { decAG(); } } function minAQ() { for (i = 0; i < 9; i++) { decAQ(); } } function minAT() { for (i = 0; i < 9; i++) { decAT(); } } function minAV() { for (i = 0; i < 9; i++) { decAV(); } } function minAS() { for (i = 0; i < 9; i++) { decAS(); } } function minPT() { for (i = 0; i < 9; i++) { decPT(); } } function minPC() { for (i = 0; i < 9; i++) { decPC(); } } function minPD() { for (i = 0; i < 9; i++) { decPD(); } } 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 = "PWcl=" + document.form.cl.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWel=" + document.form.el.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWtl=" + document.form.tl.value + ";expires=" + expireDate.toGMTString(); // document.cookie = "JEsb=" + document.form.sb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWwb=" + document.form.wb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWwm=" + document.form.wm.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWwp=" + document.form.wp.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWae=" + document.form.ae.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWag=" + document.form.ag.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWaq=" + document.form.aq.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWat=" + document.form.at.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWav=" + document.form.av.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWas=" + document.form.as.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWpt=" + document.form.pt.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWpc=" + document.form.pc.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWpd=" + document.form.pd.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWbw=" + document.form.bw.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWtd=" + document.form.td.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWte=" + document.form.te.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWtr=" + document.form.tr.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PWts=" + 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] == "PWcl") { clCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < clCnt; j++) { incCL(); }} if (thisCookie[i].split("=")[0] == "PWel") { elCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < elCnt; j++) { incEL(); }} if (thisCookie[i].split("=")[0] == "PWtl") { 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] == "PWwb") { wbCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (wbCnt - 1); j++) { incWB(); }} if (thisCookie[i].split("=")[0] == "PWwm") { wmCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < wmCnt; j++) { incWM(); }} if (thisCookie[i].split("=")[0] == "PWwp") { wpCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < wpCnt; j++) { incWP(); }} if (thisCookie[i].split("=")[0] == "PWae") { aeCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < aeCnt; j++) { incAE(); }} if (thisCookie[i].split("=")[0] == "PWag") { agCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < agCnt; j++) { incAG(); }} if (thisCookie[i].split("=")[0] == "PWaq") { aqCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < aqCnt; j++) { incAQ(); }} if (thisCookie[i].split("=")[0] == "PWat") { atCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < atCnt; j++) { incAT(); }} if (thisCookie[i].split("=")[0] == "PWav") { avCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < avCnt; j++) { incAV(); }} if (thisCookie[i].split("=")[0] == "PWas") { asCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (asCnt - 1); j++) { incAS(); }} if (thisCookie[i].split("=")[0] == "PWpt") { ptCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < ptCnt; j++) { incPT(); }} if (thisCookie[i].split("=")[0] == "PWpc") { pcCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < pcCnt; j++) { incPC(); }} if (thisCookie[i].split("=")[0] == "PWpd") { pdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < pdCnt; j++) { incPD(); }} if (thisCookie[i].split("=")[0] == "PWbw") { bwCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < bwCnt; j++) { incBW(); }} if (thisCookie[i].split("=")[0] == "PWtd") { tdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tdCnt - 1); j++) { incTD(); }} if (thisCookie[i].split("=")[0] == "PWte") { teCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (teCnt - 1); j++) { incTE(); }} if (thisCookie[i].split("=")[0] == "PWtr") { trCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (trCnt - 1); j++) { incTR(); }} if (thisCookie[i].split("=")[0] == "PWts") { tsCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tsCnt - 1); j++) { incTS(); }} } } }