/********************************************************************* 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 Repulsor Field 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 = "Inceptor"; document.form.hl.value = "13"; 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 = "Librorum"; document.form.hl.value = "50"; document.form.ws.value = "2"; document.form.dv.value = "2"; document.form.cg.value = "20"; } else if ( (ch >= 30) && (ch < 50) ) { document.form.rk.value = "Savant"; document.form.hl.value = "210"; 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 = "Pedagogue"; document.form.hl.value = "850"; document.form.ws.value = "3"; document.form.dv.value = "3"; document.form.cg.value = "24"; } else if ( (ch >= 75) && (ch < 100) ) { document.form.rk.value = "Doctrinaire"; document.form.hl.value = "3,400"; document.form.ws.value = "3"; document.form.dv.value = "4"; document.form.cg.value = "26"; } else if ( (ch >= 100) && (ch < 135) ) { document.form.rk.value = "Magister"; document.form.hl.value = "13,500"; document.form.ws.value = "4"; document.form.dv.value = "4"; document.form.cg.value = "28"; } else if ( (ch >= 135) && (ch < 150) ) { document.form.rk.value = "Magister Magna"; document.form.hl.value = "54,000"; document.form.ws.value = "4"; document.form.dv.value = "5"; 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 incAG() { if (document.form.agnl.value == "MAX") { document.form.agnl.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); 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 = "MAX"; document.form.agds.value = "+Skill power, Range = 6000, Enables 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 == "5") { document.form.agnl.value = "MAX"; } } function decAG() { if (document.form.agnl.value == "MAX") { document.form.agnl.value = "5"; } 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"; } 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 incAJ() { if (document.form.ajnl.value == "MAX") { document.form.ajnl.value = "7"; } el = eval(document.form.el.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); aj = eval(document.form.aj.value); ajnl = eval(document.form.ajnl.value); ajsu = eval(document.form.ajsu.value); if ( (aj == 0) && (ch >= 20) ){ aj++; ajnl++; document.form.ajrq.value = "None"; document.form.ajds.value = "Enables Jumpstart"; } else if ( (aj == 1) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "EL5"; document.form.ajds.value = "Range = 1250, +Success rate, +Hull repair, -14% XP debt"; } else if ( (aj == 2) && (el >= 5) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "EL15"; document.form.ajds.value = "Range = 1500, +Success rate, +Hull repair, -21% XP debt"; } else if ( (aj == 3) && (el >= 15) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "EL25"; document.form.ajds.value = "Range = 1750, +Success rate, +Hull repair, -28% XP debt"; } else if ( (aj == 4) && (el >= 25) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "EL35"; document.form.ajds.value = "Range = 2000, +Success rate, +Hull repair, -35% XP debt"; } else if ( (aj == 5) && (el >= 35) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "EL45"; document.form.ajds.value = "Range = 2250, +Success rate, +Hull repair, -42% XP debt"; } else if ( (aj == 6) && (el >= 45) && (sr >= ajnl) ) { aj++; ajsu += ajnl; su += ajnl; sr -= ajnl; ajnl = aj; document.form.ajrq.value = "MAX"; document.form.ajds.value = "Range = 2500, +Success rate, +Hull repair, -49% XP debt"; } document.form.sr.value = sr; document.form.su.value = su; document.form.aj.value = aj; document.form.ajnl.value = ajnl; document.form.ajsu.value = ajsu; if (document.form.ajnl.value == "7") { document.form.ajnl.value = "MAX"; } } function decAJ() { if (document.form.ajnl.value == "MAX") { document.form.ajnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); aj = eval(document.form.aj.value); ajnl = eval(document.form.ajnl.value); ajsu = eval(document.form.ajsu.value); if (aj == 1) { aj--; ajnl--; document.form.ajrq.value = "L20"; document.form.ajds.value = ""; } else if (aj == 2) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "None"; document.form.ajds.value = "Enables Jumpstart"; } else if (aj == 3) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "EL5"; document.form.ajds.value = "Range = 1250, +Success rate, +Hull repair, -14% XP debt"; } else if (aj == 4) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "EL15"; document.form.ajds.value = "Range = 1500, +Success rate, +Hull repair, -21% XP debt"; } else if (aj == 5) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "EL25"; document.form.ajds.value = "Range = 1750, +Success rate, +Hull repair, -28% XP debt"; } else if (aj == 6) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "EL35"; document.form.ajds.value = "Range = 2000, +Success rate, +Hull repair, -35% XP debt"; } else if (aj == 7) { aj--; ajnl = aj; ajsu -= ajnl; su -= ajnl; sr += ajnl; document.form.ajrq.value = "EL45"; document.form.ajds.value = "Range = 2250, +Success rate, +Hull repair, -42% XP debt"; } document.form.sr.value = sr; document.form.su.value = su; document.form.aj.value = aj; document.form.ajnl.value = ajnl; document.form.ajsu.value = ajsu; } function incAM() { if (document.form.amnl.value == "MAX") { document.form.amnl.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); am = eval(document.form.am.value); amnl = eval(document.form.amnl.value); amsu = eval(document.form.amsu.value); if ( (am == 0) && (ch >= 15) ){ am++; amnl++; document.form.amrq.value = "None"; document.form.amds.value = "Enables Intimidate"; } else if ( (am == 1) && (sr >= amnl) ) { am++; amsu += amnl; su += amnl; sr -= amnl; amnl = am; document.form.amrq.value = "CL5"; document.form.amds.value = "+Skill power, Range = 2750"; } else if ( (am == 2) && (cl >= 5) && (sr >= amnl) ) { am++; amsu += amnl; su += amnl; sr -= amnl; amnl = am; document.form.amrq.value = "CL15"; document.form.amds.value = "+Skill power, Range = 3000, Enables Scare"; } else if ( (am == 3) && (cl >= 15) && (sr >= amnl) ) { am++; amsu += amnl; su += amnl; sr -= amnl; amnl = am; document.form.amrq.value = "CL25"; document.form.amds.value = "+Skill power, Range = 3250"; } else if ( (am == 4) && (cl >= 25) && (sr >= amnl) ) { am++; amsu += amnl; su += amnl; sr -= amnl; amnl = am; document.form.amrq.value = "CL35"; document.form.amds.value = "+Skill power, Range = 3500, Enables Terrify"; } else if ( (am == 5) && (cl >= 35) && (sr >= amnl) ) { am++; amsu += amnl; su += amnl; sr -= amnl; amnl = am; document.form.amrq.value = "CL45"; document.form.amds.value = "+Skill power, Range = 3750, Enables Area Intimidation"; } else if ( (am == 6) && (cl >= 45) && (sr >= amnl) ) { am++; amsu += amnl; su += amnl; sr -= amnl; amnl = am; document.form.amrq.value = "MAX"; document.form.amds.value = "+Skill power, Range = 4000, Enables Area Terrify"; } document.form.sr.value = sr; document.form.su.value = su; document.form.am.value = am; document.form.amnl.value = amnl; document.form.amsu.value = amsu; if (document.form.amnl.value == "7") { document.form.amnl.value = "MAX"; } } function decAM() { if (document.form.amnl.value == "MAX") { document.form.amnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); am = eval(document.form.am.value); amnl = eval(document.form.amnl.value); amsu = eval(document.form.amsu.value); if (am == 1) { am--; amnl--; document.form.amrq.value = "L15"; document.form.amds.value = ""; } else if (am == 2) { am--; amnl = am; amsu -= amnl; su -= amnl; sr += amnl; document.form.amrq.value = "None"; document.form.amds.value = "Enables Intimidate"; } else if (am == 3) { am--; amnl = am; amsu -= amnl; su -= amnl; sr += amnl; document.form.amrq.value = "CL5"; document.form.amds.value = "+Skill power, Range = 2750"; } else if (am == 4) { am--; amnl = am; amsu -= amnl; su -= amnl; sr += amnl; document.form.amrq.value = "CL15"; document.form.amds.value = "+Skill power, Range = 3000, Enables Scare"; } else if (am == 5) { am--; amnl = am; amsu -= amnl; su -= amnl; sr += amnl; document.form.amrq.value = "CL25"; document.form.amds.value = "+Skill power, Range = 3250"; } else if (am == 6) { am--; amnl = am; amsu -= amnl; su -= amnl; sr += amnl; document.form.amrq.value = "CL35"; document.form.amds.value = "+Skill power, Range = 3500, Enables Terrify"; } else if (am == 7) { am--; amnl = am; amsu -= amnl; su -= amnl; sr += amnl; document.form.amrq.value = "CL45"; document.form.amds.value = "+Skill power, Range = 3750, Enables Area Intimidation"; } document.form.sr.value = sr; document.form.su.value = su; document.form.am.value = am; document.form.amnl.value = amnl; document.form.amsu.value = amsu; } function incAW() { if (document.form.awnl.value == "MAX") { document.form.awnl.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); aw = eval(document.form.aw.value); awnl = eval(document.form.awnl.value); awsu = eval(document.form.awsu.value); if ( (aw == 0) && (ch >= 6) ){ aw++; awnl++; document.form.awrq.value = "None"; document.form.awds.value = "Enables Power Down"; } else if ( (aw == 1) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "CL5"; document.form.awds.value = "+Success rate"; } else if ( (aw == 2) && (cl >= 5) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "CL15"; document.form.awds.value = "+Success rate, Enables Advanced Power Down"; } else if ( (aw == 3) && (cl >= 15) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "CL25"; document.form.awds.value = "+Success rate"; } else if ( (aw == 4) && (cl >= 25) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "CL35"; document.form.awds.value = "+Success rate, Enables Advanced Power Down 2"; } else if ( (aw == 5) && (cl >= 35) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "CL45"; document.form.awds.value = "+Success rate, Enables Advanced Power Down 3"; } else if ( (aw == 6) && (cl >= 45) && (sr >= awnl) ) { aw++; awsu += awnl; su += awnl; sr -= awnl; awnl = aw; document.form.awrq.value = "MAX"; document.form.awds.value = "+Success rate, Enables Advanced Power Down 4"; } document.form.sr.value = sr; document.form.su.value = su; document.form.aw.value = aw; document.form.awnl.value = awnl; document.form.awsu.value = awsu; if (document.form.awnl.value == "7") { document.form.awnl.value = "MAX"; } } function decAW() { if (document.form.awnl.value == "MAX") { document.form.awnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); aw = eval(document.form.aw.value); awnl = eval(document.form.awnl.value); awsu = eval(document.form.awsu.value); if (aw == 1) { aw--; awnl--; document.form.awrq.value = "L6"; document.form.awds.value = ""; } else if (aw == 2) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "None"; document.form.awds.value = "Enables Power Down"; } else if (aw == 3) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "CL5"; document.form.awds.value = "+Success rate"; } else if (aw == 4) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "CL15"; document.form.awds.value = "+Success rate, Enables Advanced Power Down"; } else if (aw == 5) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "CL25"; document.form.awds.value = "+Success rate"; } else if (aw == 6) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "CL35"; document.form.awds.value = "+Success rate, Enables Advanced Power Down 2"; } else if (aw == 7) { aw--; awnl = aw; awsu -= awnl; su -= awnl; sr += awnl; document.form.awrq.value = "CL45"; document.form.awds.value = "+Success rate, Enables Advanced Power Down 3"; } document.form.sr.value = sr; document.form.su.value = su; document.form.aw.value = aw; document.form.awnl.value = awnl; document.form.awsu.value = awsu; } function incAI() { if (document.form.ainl.value == "MAX") { document.form.ainl.value = "7"; } el = eval(document.form.el.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); ai = eval(document.form.ai.value); ainl = eval(document.form.ainl.value); aisu = eval(document.form.aisu.value); if ( (ai == 1) && (sr >= ainl) ) { ai++; aisu += ainl; su += ainl; sr -= ainl; ainl = ai; document.form.airq.value = "EL5"; document.form.aids.value = "+Max feedback amount, and duration"; } else if ( (ai == 2) && (el >= 5) && (sr >= ainl) ) { ai++; aisu += ainl; su += ainl; sr -= ainl; ainl = ai; document.form.airq.value = "EL15"; document.form.aids.value = "+Max feedback amount, feedback amount, and duration, Enables Impact Repulsor"; } else if ( (ai == 3) && (el >= 15) && (sr >= ainl) ) { ai++; aisu += ainl; su += ainl; sr -= ainl; ainl = ai; document.form.airq.value = "EL25"; document.form.aids.value = "+Max feedback amount, and duration"; } else if ( (ai == 4) && (el >= 25) && (sr >= ainl) ) { ai++; aisu += ainl; su += ainl; sr -= ainl; ainl = ai; document.form.airq.value = "EL35"; document.form.aids.value = "+Max feedback amount, feedback amount, and duration, Enables Plasma Repulsor"; } else if ( (ai == 5) && (el >= 35) && (sr >= ainl) ) { ai++; aisu += ainl; su += ainl; sr -= ainl; ainl = ai; document.form.airq.value = "EL45"; document.form.aids.value = "+Max feedback amount, feedback amount, and duration, Enables Emp Repulsor"; } else if ( (ai == 6) && (el >= 45) && (sr >= ainl) ) { ai++; aisu += ainl; su += ainl; sr -= ainl; ainl = ai; document.form.airq.value = "MAX"; document.form.aids.value = "+Max feedback amount, feedback amount, and duration, Enables Damage Repulsor"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ai.value = ai; document.form.ainl.value = ainl; document.form.aisu.value = aisu; if (document.form.ainl.value == "7") { document.form.ainl.value = "MAX"; } } function decAI() { if (document.form.ainl.value == "MAX") { document.form.ainl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ai = eval(document.form.ai.value); ainl = eval(document.form.ainl.value); aisu = eval(document.form.aisu.value); if (ai == 2) { ai--; ainl = ai; aisu -= ainl; su -= ainl; sr += ainl; document.form.airq.value = "None"; document.form.aids.value = "Enables Energy Repulsor"; } else if (ai == 3) { ai--; ainl = ai; aisu -= ainl; su -= ainl; sr += ainl; document.form.airq.value = "EL5"; document.form.aids.value = "+Max feedback amount, and duration"; } else if (ai == 4) { ai--; ainl = ai; aisu -= ainl; su -= ainl; sr += ainl; document.form.airq.value = "EL15"; document.form.aids.value = "+Max feedback amount, feedback amount, and duration, Enables Impact Repulsor"; } else if (ai == 5) { ai--; ainl = ai; aisu -= ainl; su -= ainl; sr += ainl; document.form.airq.value = "EL25"; document.form.aids.value = "+Max feedback amount, and duration"; } else if (ai == 6) { ai--; ainl = ai; aisu -= ainl; su -= ainl; sr += ainl; document.form.airq.value = "EL25"; document.form.aids.value = "+Max feedback amount, feedback amount, and duration, Enables Plasma Repulsor"; } else if (ai == 7) { ai--; ainl = ai; aisu -= ainl; su -= ainl; sr += ainl; document.form.airq.value = "EL35"; document.form.aids.value = "+Max feedback amount, feedback amount, and duration, Enables Emp Repulsor"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ai.value = ai; document.form.ainl.value = ainl; document.form.aisu.value = aisu; } // 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 >= 45) ) { 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 = "L45"; 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 incPP() { if (document.form.ppnl.value == "MAX") { document.form.ppnl.value = "7"; } el = eval(document.form.el.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); pp = eval(document.form.pp.value); ppnl = eval(document.form.ppnl.value); ppsu = eval(document.form.ppsu.value); if (pp == 0) { pp++; ppnl++; document.form.pprq.value = "None"; document.form.ppds.value = "Enables Prospect"; } else if ( (pp == 1) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "EL5"; document.form.ppds.value = "-Energy and time, range = 1250"; } else if ( (pp == 2) && (el >= 5) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "EL15"; document.form.ppds.value = "-Energy and time, range = 1500"; } else if ( (pp == 3) && (el >= 15) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "EL25"; document.form.ppds.value = "-Energy and time, range = 1750"; } else if ( (pp == 4) && (el >= 25) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "EL35"; document.form.ppds.value = "-Energy and time, range = 2000"; } else if ( (pp == 5) && (el >= 35) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "EL45"; document.form.ppds.value = "-Energy and time, range = 2250"; } else if ( (pp == 6) && (el >= 45) && (sr >= ppnl) ) { pp++; ppsu += ppnl; su += ppnl; sr -= ppnl; ppnl = pp; document.form.pprq.value = "MAX"; document.form.ppds.value = "-Energy and time, range = 2500"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pp.value = pp; document.form.ppnl.value = ppnl; document.form.ppsu.value = ppsu; if (document.form.ppnl.value == "7") { document.form.ppnl.value = "MAX"; } } function decPP() { if (document.form.ppnl.value == "MAX") { document.form.ppnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); pp = eval(document.form.pp.value); ppnl = eval(document.form.ppnl.value); ppsu = eval(document.form.ppsu.value); if (pp == 1) { pp--; ppnl--; document.form.pprq.value = "None"; document.form.ppds.value = ""; } else if (pp == 2) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "None"; document.form.ppds.value = "Enables Prospect"; } else if (pp == 3) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "EL5"; document.form.ppds.value = "-Energy and time, range = 1250"; } else if (pp == 4) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "EL15"; document.form.ppds.value = "-Energy and time, range = 1500"; } else if (pp == 5) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "EL25"; document.form.ppds.value = "-Energy and time, range = 1750"; } else if (pp == 6) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "EL35"; document.form.ppds.value = "-Energy and time, range = 2000"; } else if (pp == 7) { pp--; ppnl = pp; ppsu -= ppnl; su -= ppnl; sr += ppnl; document.form.pprq.value = "EL45"; document.form.ppds.value = "-Energy and time, range = 2250"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pp.value = pp; document.form.ppnl.value = ppnl; document.form.ppsu.value = ppsu; } function incPS() { if (document.form.psnl.value == "MAX") { document.form.psnl.value = "5"; } el = eval(document.form.el.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); ps = eval(document.form.ps.value); psnl = eval(document.form.psnl.value); pssu = eval(document.form.pssu.value); if ( (ps == 0) && (ch >= 40) ) { ps++; psnl++; document.form.psrq.value = "None"; document.form.psds.value = "Range = 1000"; } else if ( (ps == 1) && (sr >= psnl) ) { ps++; pssu += psnl; su += psnl; sr -= psnl; psnl = ps; document.form.psrq.value = "EL5"; document.form.psds.value = "Range = 1250"; } else if ( (ps == 2) && (el >= 5) && (sr >= psnl) ) { ps++; pssu += psnl; su += psnl; sr -= psnl; psnl = ps; document.form.psrq.value = "EL15"; document.form.psds.value = "Range = 1500, Cloak detection"; } else if ( (ps == 3) && (el >= 15) && (sr >= psnl) ) { ps++; pssu += psnl; su += psnl; sr -= psnl; psnl = ps; document.form.psrq.value = "EL25"; document.form.psds.value = "Range = 1750, +Cloak detection chance"; } else if ( (ps == 4) && (el >= 25) && (sr >= psnl) ) { ps++; pssu += psnl; su += psnl; sr -= psnl; psnl = ps; document.form.psrq.value = "MAX"; document.form.psds.value = "Range = 2000, Group can see detected cloak"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ps.value = ps; document.form.psnl.value = psnl; document.form.pssu.value = pssu; if (document.form.psnl.value == "5") { document.form.psnl.value = "MAX"; } } function decPS() { if (document.form.psnl.value == "MAX") { document.form.psnl.value = "5"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ps = eval(document.form.ps.value); psnl = eval(document.form.psnl.value); pssu = eval(document.form.pssu.value); if (ps == 1) { ps--; psnl--; document.form.psrq.value = "L40"; document.form.psds.value = ""; } else if (ps == 2) { ps--; psnl = ps; pssu -= psnl; su -= psnl; sr += psnl; document.form.psrq.value = "None"; document.form.psds.value = "Range = 1000"; } else if (ps == 3) { ps--; psnl = ps; pssu -= psnl; su -= psnl; sr += psnl; document.form.psrq.value = "EL5"; document.form.psds.value = "Range = 1250"; } else if (ps == 4) { ps--; psnl = ps; pssu -= psnl; su -= psnl; sr += psnl; document.form.psrq.value = "EL15"; document.form.psds.value = "Range = 1500, Cloak detection"; } else if (ps == 5) { ps--; psnl = ps; pssu -= psnl; su -= psnl; sr += psnl; document.form.psrq.value = "EL25"; document.form.psds.value = "Range = 1750, +Cloak detection chance"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ps.value = ps; document.form.psnl.value = psnl; document.form.pssu.value = pssu; } // BUILD function incBD() { if (document.form.bdnl.value == "MAX") { document.form.bdnl.value = "7"; } tl = eval(document.form.tl.value); ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); bd = eval(document.form.bd.value); bdnl = eval(document.form.bdnl.value); bdsu = eval(document.form.bdsu.value); if ( (bd == 0) ) { bd++; bdnl++; document.form.bdrq.value = "None"; document.form.bdds.value = "Analysis and manufacture of L1 devices"; } else if ( (bd == 1) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "TL5"; document.form.bdds.value = "Analysis and manufacture of L2 devices"; } else if ( (bd == 2) && (tl >= 5) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "TL15"; document.form.bdds.value = "Analysis and manufacture of L3 devices"; } else if ( (bd == 3) && (tl >= 15) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "TL25"; document.form.bdds.value = "Analysis and manufacture of L4 devices"; } else if ( (bd == 4) && (tl >= 25) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "TL35"; document.form.bdds.value = "Analysis and manufacture of L5 devices"; } else if ( (bd == 5) && (tl >= 35) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "TL45"; document.form.bdds.value = "Analysis and manufacture of L6 & L7 devices"; } else if ( (bd == 6) && (tl >= 45) && (sr >= bdnl) ) { bd++; bdsu += bdnl; su += bdnl; sr -= bdnl; bdnl = bd; document.form.bdrq.value = "MAX"; document.form.bdds.value = "Analysis and manufacture of L8 & L9 devices"; } document.form.sr.value = sr; document.form.su.value = su; document.form.bd.value = bd; document.form.bdnl.value = bdnl; document.form.bdsu.value = bdsu; if (document.form.bdnl.value == "7") { document.form.bdnl.value = "MAX"; } } function decBD() { if (document.form.bdnl.value == "MAX") { document.form.bdnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); bd = eval(document.form.bd.value); bdnl = eval(document.form.bdnl.value); bdsu = eval(document.form.bdsu.value); if ( (bd == 1) ) { bd--; bdnl--; document.form.bdrq.value = "None"; document.form.bdds.value = ""; } else if (bd == 2) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "None"; document.form.bdds.value = "Analysis and manufacture of L1 devices"; } else if (bd == 3) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "TL5"; document.form.bdds.value = "Analysis and manufacture of L2 devices"; } else if (bd == 4) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "TL15"; document.form.bdds.value = "Analysis and manufacture of L3 devices"; } else if (bd == 5) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "TL25"; document.form.bdds.value = "Analysis and manufacture of L4 devices"; } else if (bd == 6) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "TL35"; document.form.bdds.value = "Analysis and manufacture of L5 devices"; } else if (bd == 7) { bd--; bdnl = bd; bdsu -= bdnl; su -= bdnl; sr += bdnl; document.form.bdrq.value = "TL45"; document.form.bdds.value = "Analysis and manufacture of L6 & L7 devices"; } document.form.sr.value = sr; document.form.su.value = su; document.form.bd.value = bd; document.form.bdnl.value = bdnl; document.form.bdsu.value = bdsu; } function incBS() { if (document.form.bsnl.value == "MAX") { document.form.bsnl.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); bs = eval(document.form.bs.value); bsnl = eval(document.form.bsnl.value); bssu = eval(document.form.bssu.value); if ( (bs == 0) && (ch >= 35) ) { bs++; bsnl++; document.form.bsrq.value = "None"; document.form.bsds.value = "Analysis and manufacture of L1 shields"; } else if ( (bs == 1) && (sr >= bsnl) ) { bs++; bssu += bsnl; su += bsnl; sr -= bsnl; bsnl = bs; document.form.bsrq.value = "TL5"; document.form.bsds.value = "Analysis and manufacture of L2 shields"; } else if ( (bs == 2) && (tl >= 5) && (sr >= bsnl) ) { bs++; bssu += bsnl; su += bsnl; sr -= bsnl; bsnl = bs; document.form.bsrq.value = "TL15"; document.form.bsds.value = "Analysis and manufacture of L3 shields"; } else if ( (bs == 3) && (tl >= 15) && (sr >= bsnl) ) { bs++; bssu += bsnl; su += bsnl; sr -= bsnl; bsnl = bs; document.form.bsrq.value = "TL25"; document.form.bsds.value = "Analysis and manufacture of L4 shields"; } else if ( (bs == 4) && (tl >= 25) && (sr >= bsnl) ) { bs++; bssu += bsnl; su += bsnl; sr -= bsnl; bsnl = bs; document.form.bsrq.value = "TL35"; document.form.bsds.value = "Analysis and manufacture of L5 shields"; } else if ( (bs == 5) && (tl >= 35) && (sr >= bsnl) ) { bs++; bssu += bsnl; su += bsnl; sr -= bsnl; bsnl = bs; document.form.bsrq.value = "TL 45"; document.form.bsds.value = "Analysis and manufacture of L6 & L7 shields"; } else if ( (bs == 6) && (tl >= 45) && (sr >= bsnl) ) { bs++; bssu += bsnl; su += bsnl; sr -= bsnl; bsnl = bs; document.form.bsrq.value = "MAX"; document.form.bsds.value = "Analysis and manufacture of L8 & L9 shields"; } document.form.sr.value = sr; document.form.su.value = su; document.form.bs.value = bs; document.form.bsnl.value = bsnl; document.form.bssu.value = bssu; if (document.form.bsnl.value == "7") { document.form.bsnl.value = "MAX"; } } function decBS() { if (document.form.bsnl.value == "MAX") { document.form.bsnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); bs = eval(document.form.bs.value); bsnl = eval(document.form.bsnl.value); bssu = eval(document.form.bssu.value); if (bs == 1) { bs--; bsnl--; document.form.bsrq.value = "L35"; document.form.bsds.value = ""; } else if (bs == 2) { bs--; bsnl = bs; bssu -= bsnl; su -= bsnl; sr += bsnl; document.form.bsrq.value = "None"; document.form.bsds.value = "Analysis and manufacture of L1 shields"; } else if (bs == 3) { bs--; bsnl = bs; bssu -= bsnl; su -= bsnl; sr += bsnl; document.form.bsrq.value = "TL5"; document.form.bsds.value = "Analysis and manufacture of L2 shields"; } else if (bs == 4) { bs--; bsnl = bs; bssu -= bsnl; su -= bsnl; sr += bsnl; document.form.bsrq.value = "TL15"; document.form.bsds.value = "Analysis and manufacture of L3 shields"; } else if (bs == 5) { bs--; bsnl = bs; bssu -= bsnl; su -= bsnl; sr += bsnl; document.form.bsrq.value = "TL25"; document.form.bsds.value = "Analysis and manufacture of L4 shields"; } else if (bs == 6) { bs--; bsnl = bs; bssu -= bsnl; su -= bsnl; sr += bsnl; document.form.bsrq.value = "TL35"; document.form.bsds.value = "Analysis and manufacture of L5 shields"; } else if (bs == 7) { bs--; bsnl = bs; bssu -= bsnl; su -= bsnl; sr += bsnl; document.form.bsrq.value = "TL45"; document.form.bsds.value = "Analysis and manufacture of L6 & L7 shields"; } document.form.sr.value = sr; document.form.su.value = su; document.form.bs.value = bs; document.form.bsnl.value = bsnl; document.form.bssu.value = bssu; } // TECH function incTD() { if (document.form.tdnl.value == "MAX") { document.form.tdnl.value = "9"; } ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); td = eval(document.form.td.value); tdnl = eval(document.form.tdnl.value); tdsu = eval(document.form.tdsu.value); if ( (td == 1) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L20"; document.form.tdds.value = "Allows L2 Devices"; } else if ( (td == 2) && (ch >= 20) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L40"; document.form.tdds.value = "Allows L3 Devices"; } else if ( (td == 3) && (ch >= 40) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L60"; document.form.tdds.value = "Allows L4 Devices"; } else if ( (td == 4) && (ch >= 60) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L80"; document.form.tdds.value = "Allows L5 Devices"; } else if ( (td == 5) && (ch >= 80) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L100"; document.form.tdds.value = "Allows L6 Devices"; } else if ( (td == 6) && (ch >= 100) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L120"; document.form.tdds.value = "Allows L7 Devices"; } else if ( (td == 7) && (ch >= 120) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "L140"; document.form.tdds.value = "Allows L8 Devices"; } else if ( (td == 8) && (ch >= 140) && (sr >= tdnl) ) { td++; tdsu += tdnl; su += tdnl; sr -= tdnl; tdnl = td; document.form.tdrq.value = "MAX"; document.form.tdds.value = "Allows L9 Devices"; } document.form.sr.value = sr; document.form.su.value = su; document.form.td.value = td; document.form.tdnl.value = tdnl; document.form.tdsu.value = tdsu; if (document.form.tdnl.value == "9") { document.form.tdnl.value = "MAX"; } } function decTD() { if (document.form.tdnl.value == "MAX") { document.form.tdnl.value = "9"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); td = eval(document.form.td.value); tdnl = eval(document.form.tdnl.value); tdsu = eval(document.form.tdsu.value); if (td == 2) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "None"; document.form.tdds.value = "Allows L1 Devices"; } else if (td == 3) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L20"; document.form.tdds.value = "Allows L2 Devices"; } else if (td == 4) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L40"; document.form.tdds.value = "Allows L3 Devices"; } else if (td == 5) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L60"; document.form.tdds.value = "Allows L4 Devices"; } else if (td == 6) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L80"; document.form.tdds.value = "Allows L5 Devices"; } else if (td == 7) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L100"; document.form.tdds.value = "Allows L6 Devices"; } else if (td == 8) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L120"; document.form.tdds.value = "Allows L7 Devices"; } else if (td == 9) { td--; tdnl = td; tdsu -= tdnl; su -= tdnl; sr += tdnl; document.form.tdrq.value = "L140"; document.form.tdds.value = "Allows L8 Devices"; } document.form.sr.value = sr; document.form.su.value = su; document.form.td.value = td; document.form.tdnl.value = tdnl; document.form.tdsu.value = tdsu; } function incTE() { if (document.form.tenl.value == "MAX") { document.form.tenl.value = "8"; } ch = eval(document.form.ch.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); te = eval(document.form.te.value); tenl = eval(document.form.tenl.value); tesu = eval(document.form.tesu.value); if ( (te == 1) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L30"; document.form.teds.value = "Allows L2 Engines"; } else if ( (te == 2) && (ch >= 30) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L50"; document.form.teds.value = "Allows L3 Engines"; } else if ( (te == 3) && (ch >= 50) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L70"; document.form.teds.value = "Allows L4 Engines"; } else if ( (te == 4) && (ch >= 70) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L90"; document.form.teds.value = "Allows L5 Engines"; } else if ( (te == 5) && (ch >= 90) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L110"; document.form.teds.value = "Allows L6 Engines"; } else if ( (te == 6) && (ch >= 110) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "L130"; document.form.teds.value = "Allows L7 Engines"; } else if ( (te == 7) && (ch >= 130) && (sr >= tenl) ) { te++; tesu += tenl; su += tenl; sr -= tenl; tenl = te; document.form.terq.value = "MAX"; document.form.teds.value = "Allows L8 Engines"; } document.form.sr.value = sr; document.form.su.value = su; document.form.te.value = te; document.form.tenl.value = tenl; document.form.tesu.value = tesu; if (document.form.tenl.value == "8") { document.form.tenl.value = "MAX"; } } function decTE() { if (document.form.tenl.value == "MAX") { document.form.tenl.value = "8"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); te = eval(document.form.te.value); tenl = eval(document.form.tenl.value); tesu = eval(document.form.tesu.value); if (te == 2) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "None"; document.form.teds.value = "Allows L1 Engines"; } else if (te == 3) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L30"; document.form.teds.value = "Allows L2 Engines"; } else if (te == 4) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L50"; document.form.teds.value = "Allows L3 Engines"; } else if (te == 5) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L70"; document.form.teds.value = "Allows L4 Engines"; } else if (te == 6) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L90"; document.form.teds.value = "Allows L5 Engines"; } else if (te == 7) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L110"; document.form.teds.value = "Allows L6 Engines"; } else if (te == 8) { te--; tenl = te; tesu -= tenl; su -= tenl; sr += tenl; document.form.terq.value = "L130"; document.form.teds.value = "Allows L7 Engines"; } document.form.sr.value = sr; document.form.su.value = su; document.form.te.value = te; document.form.tenl.value = tenl; document.form.tesu.value = tesu; } function incTR() { if (document.form.trnl.value == "MAX") { document.form.trnl.value = "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(); decAG(); decAJ(); decAM(); decAW(); decAI(); decPC(); decPP(); decPS(); decBD(); decBS(); 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 maxAG() { for (i = 0; i < 9; i++) { incAG(); } } function maxAJ() { for (i = 0; i < 9; i++) { incAJ(); } } function maxAM() { for (i = 0; i < 9; i++) { incAM(); } } function maxAW() { for (i = 0; i < 9; i++) { incAW(); } } function maxAI() { for (i = 0; i < 9; i++) { incAI(); } } function maxPC() { for (i = 0; i < 9; i++) { incPC(); } } function maxPP() { for (i = 0; i < 9; i++) { incPP(); } } function maxPS() { for (i = 0; i < 9; i++) { incPS(); } } function maxBD() { for (i = 0; i < 9; i++) { incBD(); } } function maxBS() { for (i = 0; i < 9; i++) { incBS(); } } 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 minAG() { for (i = 0; i < 9; i++) { decAG(); } } function minAJ() { for (i = 0; i < 9; i++) { decAJ(); } } function minAM() { for (i = 0; i < 9; i++) { decAM(); } } function minAW() { for (i = 0; i < 9; i++) { decAW(); } } function minAI() { for (i = 0; i < 9; i++) { decAI(); } } function minPC() { for (i = 0; i < 9; i++) { decPC(); } } function minPP() { for (i = 0; i < 9; i++) { decPP(); } } function minPS() { for (i = 0; i < 9; i++) { decPS(); } } function minBD() { for (i = 0; i < 9; i++) { decBD(); } } function minBS() { for (i = 0; i < 9; i++) { decBS(); } } 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 = "PEcl=" + document.form.cl.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEel=" + document.form.el.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEtl=" + document.form.tl.value + ";expires=" + expireDate.toGMTString(); // document.cookie = "JEsb=" + document.form.sb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEwb=" + document.form.wb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEwm=" + document.form.wm.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEwp=" + document.form.wp.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEag=" + document.form.ag.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEaj=" + document.form.aj.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEam=" + document.form.am.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEaw=" + document.form.aw.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEai=" + document.form.ai.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEpc=" + document.form.pc.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEpp=" + document.form.pp.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEps=" + document.form.ps.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEbd=" + document.form.bd.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEbs=" + document.form.bs.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEtd=" + document.form.td.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEte=" + document.form.te.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEtr=" + document.form.tr.value + ";expires=" + expireDate.toGMTString(); document.cookie = "PEts=" + 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] == "PEcl") { clCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < clCnt; j++) { incCL(); }} if (thisCookie[i].split("=")[0] == "PEel") { elCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < elCnt; j++) { incEL(); }} if (thisCookie[i].split("=")[0] == "PEtl") { 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] == "PEwb") { wbCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (wbCnt - 1); j++) { incWB(); }} if (thisCookie[i].split("=")[0] == "PEwm") { wmCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < wmCnt; j++) { incWM(); }} if (thisCookie[i].split("=")[0] == "PEwp") { wpCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < wpCnt; j++) { incWP(); }} if (thisCookie[i].split("=")[0] == "PEag") { agCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < agCnt; j++) { incAG(); }} if (thisCookie[i].split("=")[0] == "PEaj") { ajCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < ajCnt; j++) { incAJ(); }} if (thisCookie[i].split("=")[0] == "PEam") { amCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < amCnt; j++) { incAM(); }} if (thisCookie[i].split("=")[0] == "PEaw") { awCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < awCnt; j++) { incAW(); }} if (thisCookie[i].split("=")[0] == "PEai") { aiCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (aiCnt - 1); j++) { incAI(); }} if (thisCookie[i].split("=")[0] == "PEpc") { pcCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < pcCnt; j++) { incPC(); }} if (thisCookie[i].split("=")[0] == "PEpp") { ppCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < ppCnt; j++) { incPP(); }} if (thisCookie[i].split("=")[0] == "PEps") { psCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < psCnt; j++) { incPS(); }} if (thisCookie[i].split("=")[0] == "PEbd") { bdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < bdCnt; j++) { incBD(); }} if (thisCookie[i].split("=")[0] == "PEbs") { bsCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < bsCnt; j++) { incBS(); }} if (thisCookie[i].split("=")[0] == "PEtd") { tdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tdCnt - 1); j++) { incTD(); }} if (thisCookie[i].split("=")[0] == "PEte") { teCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (teCnt - 1); j++) { incTE(); }} if (thisCookie[i].split("=")[0] == "PEtr") { trCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (trCnt - 1); j++) { incTR(); }} if (thisCookie[i].split("=")[0] == "PEts") { tsCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tsCnt - 1); j++) { incTS(); }} } } }