/********************************************************************* 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 Biorepression 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 = "Ensign"; document.form.hl.value = "18"; document.form.ws.value = "2"; document.form.dv.value = "1"; document.form.cg.value = "23"; } else if ( (ch >= 10) && (ch < 30) ) { document.form.rk.value = "Lieutenant"; document.form.hl.value = "70"; document.form.ws.value = "2"; document.form.dv.value = "2"; document.form.cg.value = "25"; } else if ( (ch >= 30) && (ch < 50) ) { document.form.rk.value = "Lt. Commander"; document.form.hl.value = "280"; document.form.ws.value = "3"; document.form.dv.value = "2"; document.form.cg.value = "27"; } else if ( (ch >= 50) && (ch < 75) ) { document.form.rk.value = "Commander"; document.form.hl.value = "1,100"; document.form.ws.value = "3"; document.form.dv.value = "3"; document.form.cg.value = "29"; } else if ( (ch >= 75) && (ch < 100) ) { document.form.rk.value = "Captain"; document.form.hl.value = "4,500"; document.form.ws.value = "4"; document.form.dv.value = "3"; document.form.cg.value = "31"; } else if ( (ch >= 100) && (ch < 135) ) { document.form.rk.value = "Commodore"; document.form.hl.value = "18,000"; document.form.ws.value = "4"; document.form.dv.value = "4"; document.form.cg.value = "33"; } else if ( (ch >= 135) && (ch < 150) ) { document.form.rk.value = "Admiral"; document.form.hl.value = "72,000"; document.form.ws.value = "5"; document.form.dv.value = "4"; document.form.cg.value = "35"; } } 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 = "9"; } 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 = "None"; document.form.wmds.value = "Allows L1 Missiles"; } else if ( (wm == 1) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL12"; document.form.wmds.value = "+25% Dmg, +Accuracy, Allows L2 Missiles"; } else if ( (wm == 2) && (cl >= 12) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL18"; document.form.wmds.value = "+50% Dmg, +Accuracy, Allows L3 Missiles"; } else if ( (wm == 3) && (cl >= 18) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL24"; document.form.wmds.value = "+75% Dmg, +Accuracy, Allows L4 Missiles"; } else if ( (wm == 4) && (cl >= 24) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL30"; document.form.wmds.value = "+100% Dmg, +Accuracy, Allows L5 Missiles"; } else if ( (wm == 5) && (cl >= 30) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL36"; document.form.wmds.value = "+125% Dmg, +Accuracy, Allows L6 Missiles"; } else if ( (wm == 6) && (cl >= 36) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL42"; document.form.wmds.value = "+150% Dmg, +Accuracy, Allows L7 Missiles"; } else if ( (wm == 7) && (cl >= 42) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "CL50"; document.form.wmds.value = "+175% Dmg, +Accuracy, Allows L8 Missiles"; } else if ( (wm == 8) && (cl >= 50) && (sr >= wmnl) ) { wm++; wmsu += wmnl; su += wmnl; sr -= wmnl; wmnl = wm; document.form.wmrq.value = "MAX"; document.form.wmds.value = "+200% Dmg, +Accuracy, Allows L9 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 == "9") { document.form.wmnl.value = "MAX"; } } function decWM() { if (document.form.wmnl.value == "MAX") { document.form.wmnl.value = "9"; } 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 = "None"; document.form.wmds.value = "Allows L1 Missiles"; } else if (wm == 3) { wm--; wmnl = wm; wmsu -= wmnl; su -= wmnl; sr += wmnl; document.form.wmrq.value = "CL12"; 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 = "CL18"; 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 = "CL24"; 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 = "CL30"; 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 = "CL36"; 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 = "CL42"; document.form.wmds.value = "+150% Dmg, +Accuracy, Allows L7 Missiles"; } else if (wm == 9) { wm--; wmnl = wm; wmsu -= wmnl; su -= wmnl; sr += wmnl; document.form.wmrq.value = "CL50"; 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; } function incWP() { if (document.form.wpnl.value == "MAX") { document.form.wpnl.value = "8"; } 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 = "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 = "None"; 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 incAE() { if (document.form.aenl.value == "MAX") { document.form.aenl.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); ae = eval(document.form.ae.value); aenl = eval(document.form.aenl.value); aesu = eval(document.form.aesu.value); if (ae == 0) { 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 = "CL35"; document.form.aeds.value = "+Skill power, Range = 6000, Enables Enrage"; } 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 = "+Skill power, Range = 6250, Enables Anger Group"; } 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 = "+Skill power, Range = 6500, Enables Enrage Group"; } 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 == 1) { ae--; aenl--; document.form.aerq.value = "None"; 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"; } else if (ae == 6) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "CL35"; document.form.aeds.value = "+Skill power, Range = 6000, Enables Enrage"; } else if (ae == 7) { ae--; aenl = ae; aesu -= aenl; su -= aenl; sr += aenl; document.form.aerq.value = "CL45"; document.form.aeds.value = "+Skill power, Range = 6250, Enables Anger Group"; } 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 incAK() { if (document.form.aknl.value == "MAX") { document.form.aknl.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); ak = eval(document.form.ak.value); aknl = eval(document.form.aknl.value); aksu = eval(document.form.aksu.value); if (ak == 0) { ak++; aknl++; document.form.akrq.value = "None"; document.form.akds.value = "Enables Hack Systems"; } else if ( (ak == 1) && (sr >= aknl) ) { ak++; aksu += aknl; su += aknl; sr -= aknl; aknl = ak; document.form.akrq.value = "CL5"; document.form.akds.value = "+Success rate, Range = 1250"; } else if ( (ak == 2) && (cl >= 5) && (sr >= aknl) ) { ak++; aksu += aknl; su += aknl; sr -= aknl; aknl = ak; document.form.akrq.value = "CL15"; document.form.akds.value = "+Sucess rate, Range = 1500, Enables Hack Weapons"; } else if ( (ak == 3) && (cl >= 15) && (sr >= aknl) ) { ak++; aksu += aknl; su += aknl; sr -= aknl; aknl = ak; document.form.akrq.value = "CL25"; document.form.akds.value = "+Sucess rate, Range = 1750"; } else if ( (ak == 4) && (cl >= 25) && (sr >= aknl) ) { ak++; aksu += aknl; su += aknl; sr -= aknl; aknl = ak; document.form.akrq.value = "CL35"; document.form.akds.value = "+Sucess rate, Range = 2000, Enables Multi-Hack"; } else if ( (ak == 5) && (cl >= 35) && (sr >= aknl) ) { ak++; aksu += aknl; su += aknl; sr -= aknl; aknl = ak; document.form.akrq.value = "CL45"; document.form.akds.value = "+Sucess rate, Range = 2250, Enables Area System Hack"; } else if ( (ak == 6) && (cl >= 45) && (sr >= aknl) ) { ak++; aksu += aknl; su += aknl; sr -= aknl; aknl = ak; document.form.akrq.value = "MAX"; document.form.akds.value = "+Sucess rate, Range = 2500, Enables Area Multi-Hack"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ak.value = ak; document.form.aknl.value = aknl; document.form.aksu.value = aksu; if (document.form.aknl.value == "7") { document.form.aknl.value = "MAX"; } } function decAK() { if (document.form.aknl.value == "MAX") { document.form.aknl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ak = eval(document.form.ak.value); aknl = eval(document.form.aknl.value); aksu = eval(document.form.aksu.value); if (ak == 1) { ak--; aknl--; document.form.akrq.value = "None"; document.form.akds.value = ""; } else if (ak == 2) { ak--; aknl = ak; aksu -= aknl; su -= aknl; sr += aknl; document.form.akrq.value = "None"; document.form.akds.value = "Enables Hack Systems"; } else if (ak == 3) { ak--; aknl = ak; aksu -= aknl; su -= aknl; sr += aknl; document.form.akrq.value = "CL5"; document.form.akds.value = "+Sucess rate, Range = 1250"; } else if (ak == 4) { ak--; aknl = ak; aksu -= aknl; su -= aknl; sr += aknl; document.form.akrq.value = "CL15"; document.form.akds.value = "+Sucess rate, Range = 1500, Enables Hack Weapons"; } else if (ak == 5) { ak--; aknl = ak; aksu -= aknl; su -= aknl; sr += aknl; document.form.akrq.value = "CL25"; document.form.akds.value = "+Sucess rate, Range = 1750"; } else if (ak == 6) { ak--; aknl = ak; aksu -= aknl; su -= aknl; sr += aknl; document.form.akrq.value = "CL35"; document.form.akds.value = "+Sucess rate, Range = 2000, Enables Multi-Hack"; } else if (ak == 7) { ak--; aknl = ak; aksu -= aknl; su -= aknl; sr += aknl; document.form.akrq.value = "CL45"; document.form.akds.value = "+Sucess rate, Range = 2250, Enables Area System Hack"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ak.value = ak; document.form.aknl.value = aknl; document.form.aksu.value = aksu; } function incAY() { if (document.form.aynl.value == "MAX") { document.form.aynl.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); ay = eval(document.form.ay.value); aynl = eval(document.form.aynl.value); aysu = eval(document.form.aysu.value); if (ay == 0) { ay++; aynl++; document.form.ayrq.value = "None"; document.form.ayds.value = "Enables Damage Tactics"; } else if ( (ay == 1) && (sr >= aynl) ) { ay++; aysu += aynl; su += aynl; sr -= aynl; aynl = ay; document.form.ayrq.value = "CL5"; document.form.ayds.value = "+Skill bonuses, Range = 5250"; } else if ( (ay == 2) && (cl >= 5) && (sr >= aynl) ) { ay++; aysu += aynl; su += aynl; sr -= aynl; aynl = ay; document.form.ayrq.value = "CL15"; document.form.ayds.value = "+Skill bonuses, Range = 5500, Enables Defense Tactics"; } else if ( (ay == 3) && (cl >= 15) && (sr >= aynl) ) { ay++; aysu += aynl; su += aynl; sr -= aynl; aynl = ay; document.form.ayrq.value = "CL25"; document.form.ayds.value = "+Skill bonuses, Range = 5750"; } else if ( (ay == 4) && (cl >= 25) && (sr >= aynl) ) { ay++; aysu += aynl; su += aynl; sr -= aynl; aynl = ay; document.form.ayrq.value = "CL35"; document.form.ayds.value = "+Skill bonuses, Range = 6000, Enables Firing Tactics"; } else if ( (ay == 5) && (cl >= 35) && (sr >= aynl) ) { ay++; aysu += aynl; su += aynl; sr -= aynl; aynl = ay; document.form.ayrq.value = "CL45"; document.form.ayds.value = "+Skill bonuses, Range = 6250"; } else if ( (ay == 6) && (cl >= 45) && (sr >= aynl) ) { ay++; aysu += aynl; su += aynl; sr -= aynl; aynl = ay; document.form.ayrq.value = "MAX"; document.form.ayds.value = "+Skill bonuses, Range = 6500, Enables Stealth Tactics"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ay.value = ay; document.form.aynl.value = aynl; document.form.aysu.value = aysu; if (document.form.aynl.value == "7") { document.form.aynl.value = "MAX"; } } function decAY() { if (document.form.aynl.value == "MAX") { document.form.aynl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ay = eval(document.form.ay.value); aynl = eval(document.form.aynl.value); aysu = eval(document.form.aysu.value); if (ay == 1) { ay--; aynl--; document.form.ayrq.value = "None"; document.form.ayds.value = ""; } else if (ay == 2) { ay--; aynl = ay; aysu -= aynl; su -= aynl; sr += aynl; document.form.ayrq.value = "None"; document.form.ayds.value = "Enables Damage Tactics"; } else if (ay == 3) { ay--; aynl = ay; aysu -= aynl; su -= aynl; sr += aynl; document.form.ayrq.value = "CL5"; document.form.ayds.value = "+Skill bonuses, Range = 5250"; } else if (ay == 4) { ay--; aynl = ay; aysu -= aynl; su -= aynl; sr += aynl; document.form.ayrq.value = "CL15"; document.form.ayds.value = "+Skill bonuses, Range = 5500, Enables Defense Tactics"; } else if (ay == 5) { ay--; aynl = ay; aysu -= aynl; su -= aynl; sr += aynl; document.form.ayrq.value = "CL25"; document.form.ayds.value = "+Skill bonuses, Range = 5750"; } else if (ay == 6) { ay--; aynl = ay; aysu -= aynl; su -= aynl; sr += aynl; document.form.ayrq.value = "CL35"; document.form.ayds.value = "+Skill bonuses, Range = 6000, Enables Firing Tactics"; } else if (ay == 7) { ay--; aynl = ay; aysu -= aynl; su -= aynl; sr += aynl; document.form.ayrq.value = "CL45"; document.form.ayds.value = "+Skill bonuses, Range = 6250"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ay.value = ay; document.form.aynl.value = aynl; document.form.aysu.value = aysu; } 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 incAB() { if (document.form.abnl.value == "MAX") { document.form.abnl.value = "7"; } cl = eval(document.form.cl.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); ab = eval(document.form.ab.value); abnl = eval(document.form.abnl.value); absu = eval(document.form.absu.value); if ( (ab == 1) && (sr >= abnl) ) { ab++; absu += abnl; su += abnl; sr -= abnl; abnl = ab; document.form.abrq.value = "CL5"; document.form.abds.value = "-Organic mob weapon firing rate, +Duration, Range = 1250"; } else if ( (ab == 2) && (cl >= 5) && (sr >= abnl) ) { ab++; absu += abnl; su += abnl; sr -= abnl; abnl = ab; document.form.abrq.value = "CL15"; document.form.abds.value = "Enables Biosuppress, Range = 1500"; } else if ( (ab == 3) && (cl >= 15) && (sr >= abnl) ) { ab++; absu += abnl; su += abnl; sr -= abnl; abnl = ab; document.form.abrq.value = "CL25"; document.form.abds.value = "-Organic mob weapon firing rate, -Mob skill use, +Duration, Range = 1750"; } else if ( (ab == 4) && (cl >= 25) && (sr >= abnl) ) { ab++; absu += abnl; su += abnl; sr -= abnl; abnl = ab; document.form.abrq.value = "CL35"; document.form.abds.value = "Enables Biorepression Sphere, Range = 2000"; } else if ( (ab == 5) && (cl >= 35) && (sr >= abnl) ) { ab++; absu += abnl; su += abnl; sr -= abnl; abnl = ab; document.form.abrq.value = "CL45"; document.form.abds.value = "Enables Biosuppression Sphere, Range = 2250"; } else if ( (ab == 6) && (cl >= 45) && (sr >= abnl) ) { ab++; absu += abnl; su += abnl; sr -= abnl; abnl = ab; document.form.abrq.value = "MAX"; document.form.abds.value = "Enables Biocessation, Range = 2500"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ab.value = ab; document.form.abnl.value = abnl; document.form.absu.value = absu; if (document.form.abnl.value == "7") { document.form.abnl.value = "MAX"; } } function decAB() { if (document.form.abnl.value == "MAX") { document.form.abnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ab = eval(document.form.ab.value); abnl = eval(document.form.abnl.value); absu = eval(document.form.absu.value); if (ab == 2) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "None"; document.form.abds.value = "Enables Biorepress"; } else if (ab == 3) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "CL5"; document.form.abds.value = "-Organic mob weapon firing rate, +Duration, Range = 1250"; } else if (ab == 4) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "CL15"; document.form.abds.value = "Enables Biosuppress, Range = 1500"; } else if (ab == 5) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "CL25"; document.form.abds.value = "-Organic mob weapon firing rate, -Mob skill use, +Duration, Range = 1750"; } else if (ab == 6) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "CL25"; document.form.abds.value = "Enables Biorepression Sphere, Range = 2000"; } else if (ab == 7) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "CL35"; document.form.abds.value = "Enables Biosuppression Sphere, Range = 2250"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ab.value = ab; document.form.abnl.value = abnl; document.form.absu.value = absu; } // PASSIVE function incPC() { if (document.form.pcnl.value == "MAX") { document.form.pcnl.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); pc = eval(document.form.pc.value); pcnl = eval(document.form.pcnl.value); pcsu = eval(document.form.pcsu.value); if ( (pc == 0) && (ch >= 20) ) { 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 = "MAX"; document.form.pcds.value = "+50% 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 == "5") { document.form.pcnl.value = "MAX"; } } function decPC() { if (document.form.pcnl.value == "MAX") { document.form.pcnl.value = "5"; } 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 = "L20"; 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"; } 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 = "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); pd = eval(document.form.pd.value); pdnl = eval(document.form.pdnl.value); pdsu = eval(document.form.pdsu.value); if ( (pd == 0) && (ch >= 25) ) { 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 = "MAX"; document.form.pdds.value = "-40% 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 == "5") { document.form.pdnl.value = "MAX"; } } function decPD() { if (document.form.pdnl.value == "MAX") { document.form.pdnl.value = "5"; } 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 = "L25"; 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"; } 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; } function incPN() { if (document.form.pnnl.value == "MAX") { document.form.pnnl.value = "5"; } tl = eval(document.form.tl.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); pn = eval(document.form.pn.value); pnnl = eval(document.form.pnnl.value); pnsu = eval(document.form.pnsu.value); if ( (pn == 0) && (ch >= 25) ) { pn++; pnnl++; document.form.pnrq.value = "None"; document.form.pnds.value = "+Funds when buying"; } else if ( (pn == 1) && (sr >= pnnl) ) { pn++; pnsu += pnnl; su += pnnl; sr -= pnnl; pnnl = pn; document.form.pnrq.value = "TL5"; document.form.pnds.value = "+Skill power"; } else if ( (pn == 2) && (tl >= 5) && (sr >= pnnl) ) { pn++; pnsu += pnnl; su += pnnl; sr -= pnnl; pnnl = pn; document.form.pnrq.value = "TL15"; document.form.pnds.value = "-Prices when buying"; } else if ( (pn == 3) && (tl >= 15) && (sr >= pnnl) ) { pn++; pnsu += pnnl; su += pnnl; sr -= pnnl; pnnl = pn; document.form.pnrq.value = "TL25"; document.form.pnds.value = "+Skill power"; } else if ( (pn == 4) && (tl >= 25) && (sr >= pnnl) ) { pn++; pnsu += pnnl; su += pnnl; sr -= pnnl; pnnl = pn; document.form.pnrq.value = "MAX"; document.form.pnds.value = "-Cost of manufacturing and refining"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pn.value = pn; document.form.pnnl.value = pnnl; document.form.pnsu.value = pnsu; if (document.form.pnnl.value == "5") { document.form.pnnl.value = "MAX"; } } function decPN() { if (document.form.pnnl.value == "MAX") { document.form.pnnl.value = "5"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); pn = eval(document.form.pn.value); pnnl = eval(document.form.pnnl.value); pnsu = eval(document.form.pnsu.value); if (pn == 1) { pn--; pnnl--; document.form.pnrq.value = "L25"; document.form.pnds.value = ""; } else if (pn == 2) { pn--; pnnl = pn; pnsu -= pnnl; su -= pnnl; sr += pnnl; document.form.pnrq.value = "None"; document.form.pnds.value = "+Funds when buying"; } else if (pn == 3) { pn--; pnnl = pn; pnsu -= pnnl; su -= pnnl; sr += pnnl; document.form.pnrq.value = "TL5"; document.form.pnds.value = "+Skill power"; } else if (pn == 4) { pn--; pnnl = pn; pnsu -= pnnl; su -= pnnl; sr += pnnl; document.form.pnrq.value = "TL15"; document.form.pnds.value = "-Prices when buying"; } else if (pn == 5) { pn--; pnnl = pn; pnsu -= pnnl; su -= pnnl; sr += pnnl; document.form.pnrq.value = "TL25"; document.form.pnds.value = "+Skill power"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pn.value = pn; document.form.pnnl.value = pnnl; document.form.pnsu.value = pnsu; } // BUILD function incBE() { if (document.form.benl.value == "MAX") { document.form.benl.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); be = eval(document.form.be.value); benl = eval(document.form.benl.value); besu = eval(document.form.besu.value); if ( (be == 0) && (ch >= 45) ) { be++; benl++; document.form.berq.value = "None"; document.form.beds.value = "Analysis and manufacture of L1 engines"; } else if ( (be == 1) && (sr >= benl) ) { be++; besu += benl; su += benl; sr -= benl; benl = be; document.form.berq.value = "TL5"; document.form.beds.value = "Analysis and manufacture of L2 engines"; } else if ( (be == 2) && (tl >= 5) && (sr >= benl) ) { be++; besu += benl; su += benl; sr -= benl; benl = be; document.form.berq.value = "TL15"; document.form.beds.value = "Analysis and manufacture of L3 engines"; } else if ( (be == 3) && (tl >= 15) && (sr >= benl) ) { be++; besu += benl; su += benl; sr -= benl; benl = be; document.form.berq.value = "TL25"; document.form.beds.value = "Analysis and manufacture of L4 engines"; } else if ( (be == 4) && (tl >= 25) && (sr >= benl) ) { be++; besu += benl; su += benl; sr -= benl; benl = be; document.form.berq.value = "TL35"; document.form.beds.value = "Analysis and manufacture of L5 engines"; } else if ( (be == 5) && (tl >= 35) && (sr >= benl) ) { be++; besu += benl; su += benl; sr -= benl; benl = be; document.form.berq.value = "TL45"; document.form.beds.value = "Analysis and manufacture of L6 & L7 engines"; } else if ( (be == 6) && (tl >= 45) && (sr >= benl) ) { be++; besu += benl; su += benl; sr -= benl; benl = be; document.form.berq.value = "MAX"; document.form.beds.value = "Analysis and manufacture of L8 & L9 engines"; } document.form.sr.value = sr; document.form.su.value = su; document.form.be.value = be; document.form.benl.value = benl; document.form.besu.value = besu; if (document.form.benl.value == "7") { document.form.benl.value = "MAX"; } } function decBE() { if (document.form.benl.value == "MAX") { document.form.benl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); be = eval(document.form.be.value); benl = eval(document.form.benl.value); besu = eval(document.form.besu.value); if (be == 1) { be--; benl--; document.form.berq.value = "L45"; document.form.beds.value = ""; } else if (be == 2) { be--; benl = be; besu -= benl; su -= benl; sr += benl; document.form.berq.value = "None"; document.form.beds.value = "Analysis and manufacture of L1 engines"; } else if (be == 3) { be--; benl = be; besu -= benl; su -= benl; sr += benl; document.form.berq.value = "TL5"; document.form.beds.value = "Analysis and manufacture of L2 engines"; } else if (be == 4) { be--; benl = be; besu -= benl; su -= benl; sr += benl; document.form.berq.value = "TL15"; document.form.beds.value = "Analysis and manufacture of L3 engines"; } else if (be == 5) { be--; benl = be; besu -= benl; su -= benl; sr += benl; document.form.berq.value = "TL25"; document.form.beds.value = "Analysis and manufacture of L4 engines"; } else if (be == 6) { be--; benl = be; besu -= benl; su -= benl; sr += benl; document.form.berq.value = "TL35"; document.form.beds.value = "Analysis and manufacture of L5 engines"; } else if (be == 7) { be--; benl = be; besu -= benl; su -= benl; sr += benl; document.form.berq.value = "TL45"; document.form.beds.value = "Analysis and manufacture of L6 & L7 engines"; } document.form.sr.value = sr; document.form.su.value = su; document.form.be.value = be; document.form.benl.value = benl; document.form.besu.value = besu; } 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) ) { 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 = "None"; 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 = "9"; } 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 = "L20"; document.form.teds.value = "Allows L2 Engines"; } else if ( (te == 2) && (ch >= 20) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L40"; document.form.teds.value = "Allows L3 Engines"; } else if ( (te == 3) && (ch >= 40) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L60"; document.form.teds.value = "Allows L4 Engines"; } else if ( (te == 4) && (ch >= 60) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L80"; document.form.teds.value = "Allows L5 Engines"; } else if ( (te == 5) && (ch >= 80) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L100"; document.form.teds.value = "Allows L6 Engines"; } else if ( (te == 6) && (ch >= 100) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L120"; document.form.teds.value = "Allows L7 Engines"; } else if ( (te == 7) && (ch >= 120) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L140"; document.form.teds.value = "Allows L8 Engines"; } else if ( (te == 8) && (ch >= 140) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "MAX"; document.form.teds.value = "Allows L9 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 == "9") { document.form.tenl.value = "MAX"; } } function decTE() { if (document.form.tenl.value == "MAX") { document.form.tenl.value = "9"; } 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 = "L20"; document.form.teds.value = "Allows L2 Engines"; } else if (te == 4) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L40"; document.form.teds.value = "Allows L3 Engines"; } else if (te == 5) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L60"; document.form.teds.value = "Allows L4 Engines"; } else if (te == 6) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L80"; document.form.teds.value = "Allows L5 Engines"; } else if (te == 7) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L100"; document.form.teds.value = "Allows L6 Engines"; } else if (te == 8) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L120"; document.form.teds.value = "Allows L7 Engines"; } else if (te == 9) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L140"; 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; } function incTR() { if (document.form.trnl.value == "MAX") { document.form.trnl.value = "8"; } 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 = "L30"; document.form.trds.value = "Allows L2 Reactors"; } else if ( (tr == 2) && (ch >= 30) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L50"; document.form.trds.value = "Allows L3 Reactors"; } else if ( (tr == 3) && (ch >= 50) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L70"; document.form.trds.value = "Allows L4 Reactors"; } else if ( (tr == 4) && (ch >= 70) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L90"; document.form.trds.value = "Allows L5 Reactors"; } else if ( (tr == 5) && (ch >= 90) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L110"; document.form.trds.value = "Allows L6 Reactors"; } else if ( (tr == 6) && (ch >= 110) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "L130"; document.form.trds.value = "Allows L7 Reactors"; } else if ( (tr == 7) && (ch >= 130) && (sr >= trnl) ) { tr++; trsu += trnl; su += trnl; sr -= trnl; trnl = tr; document.form.trrq.value = "MAX"; 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; if (document.form.trnl.value == "8") { document.form.trnl.value = "MAX"; } } function decTR() { if (document.form.trnl.value == "MAX") { document.form.trnl.value = "8"; } 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 = "L30"; document.form.trds.value = "Allows L2 Reactors"; } else if (tr == 4) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L50"; document.form.trds.value = "Allows L3 Reactors"; } else if (tr == 5) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L70"; document.form.trds.value = "Allows L4 Reactors"; } else if (tr == 6) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L90"; document.form.trds.value = "Allows L5 Reactors"; } else if (tr == 7) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L110"; document.form.trds.value = "Allows L6 Reactors"; } else if (tr == 8) { tr--; trnl = tr; trsu -= trnl; su -= trnl; sr += trnl; document.form.trrq.value = "L130"; document.form.trds.value = "Allows L7 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(); decAK(); decAY(); decAQ(); decAB(); decPC(); decPD(); decPN(); decBE(); 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 maxAK() { for (i = 0; i < 9; i++) { incAK(); } } function maxAY() { for (i = 0; i < 9; i++) { incAY(); } } function maxAQ() { for (i = 0; i < 9; i++) { incAQ(); } } function maxAB() { for (i = 0; i < 9; i++) { incAB(); } } function maxPC() { for (i = 0; i < 9; i++) { incPC(); } } function maxPD() { for (i = 0; i < 9; i++) { incPD(); } } function maxPN() { for (i = 0; i < 9; i++) { incPN(); } } function maxBE() { for (i = 0; i < 9; i++) { incBE(); } } 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 minAK() { for (i = 0; i < 9; i++) { decAK(); } } function minAY() { for (i = 0; i < 9; i++) { decAY(); } } function minAQ() { for (i = 0; i < 9; i++) { decAQ(); } } function minAB() { for (i = 0; i < 9; i++) { decAB(); } } function minPC() { for (i = 0; i < 9; i++) { decPC(); } } function minPD() { for (i = 0; i < 9; i++) { decPD(); } } function minPN() { for (i = 0; i < 9; i++) { decPN(); } } function minBE() { for (i = 0; i < 9; i++) { decBE(); } } 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 = "TWcl=" + document.form.cl.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWel=" + document.form.el.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWtl=" + document.form.tl.value + ";expires=" + expireDate.toGMTString(); // document.cookie = "JEsb=" + document.form.sb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWwb=" + document.form.wb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWwm=" + document.form.wm.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWwp=" + document.form.wp.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWae=" + document.form.ae.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWak=" + document.form.ak.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWay=" + document.form.ay.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWaq=" + document.form.aq.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWab=" + document.form.ab.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWpc=" + document.form.pc.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWpd=" + document.form.pd.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWpn=" + document.form.pn.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWbe=" + document.form.be.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWbw=" + document.form.bw.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWtd=" + document.form.td.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWte=" + document.form.te.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWtr=" + document.form.tr.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TWts=" + 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] == "TWcl") { clCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < clCnt; j++) { incCL(); }} if (thisCookie[i].split("=")[0] == "TWel") { elCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < elCnt; j++) { incEL(); }} if (thisCookie[i].split("=")[0] == "TWtl") { 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] == "TWwb") { wbCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (wbCnt - 1); j++) { incWB(); }} if (thisCookie[i].split("=")[0] == "TWwm") { wmCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < wmCnt; j++) { incWM(); }} if (thisCookie[i].split("=")[0] == "TWwp") { wpCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < wpCnt; j++) { incWP(); }} if (thisCookie[i].split("=")[0] == "TWae") { aeCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < aeCnt; j++) { incAE(); }} if (thisCookie[i].split("=")[0] == "TWak") { akCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < akCnt; j++) { incAK(); }} if (thisCookie[i].split("=")[0] == "TWay") { ayCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < ayCnt; j++) { incAY(); }} if (thisCookie[i].split("=")[0] == "TWaq") { aqCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < aqCnt; j++) { incAQ(); }} if (thisCookie[i].split("=")[0] == "TWab") { abCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (abCnt - 1); j++) { incAB(); }} if (thisCookie[i].split("=")[0] == "TWpc") { pcCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < pcCnt; j++) { incPC(); }} if (thisCookie[i].split("=")[0] == "TWpd") { pdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < pdCnt; j++) { incPD(); }} if (thisCookie[i].split("=")[0] == "TWpn") { pnCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < pnCnt; j++) { incPN(); }} if (thisCookie[i].split("=")[0] == "TWbe") { beCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < beCnt; j++) { incBE(); }} if (thisCookie[i].split("=")[0] == "TWbw") { bwCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < bwCnt; j++) { incBW(); }} if (thisCookie[i].split("=")[0] == "TWtd") { tdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tdCnt - 1); j++) { incTD(); }} if (thisCookie[i].split("=")[0] == "TWte") { teCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (teCnt - 1); j++) { incTE(); }} if (thisCookie[i].split("=")[0] == "TWtr") { trCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (trCnt - 1); j++) { incTR(); }} if (thisCookie[i].split("=")[0] == "TWts") { tsCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tsCnt - 1); j++) { incTS(); }} } } }