/********************************************************************* Update Log 1/9/03 - Added functions for bonus skills gained through quests, etc. 1/4/03 - Changed CL requirement (from 48 to 50) for lvl 9 weapon skill. 12/6/02 - Changed text for minimum conditions to only show level requirement. 11/21/02 - Modified decrease CL/EL/TL functions with the correct condition comparison between skill point total and points used. - Added functions for Shield Charging 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 = "Prentice"; document.form.hl.value = "13"; document.form.ws.value = "1"; document.form.dv.value = "2"; document.form.cg.value = "28"; } else if ( (ch >= 10) && (ch < 30) ) { document.form.rk.value = "Journeyman"; document.form.hl.value = "50"; document.form.ws.value = "1"; document.form.dv.value = "3"; document.form.cg.value = "30"; } else if ( (ch >= 30) && (ch < 50) ) { document.form.rk.value = "Agent"; document.form.hl.value = "210"; document.form.ws.value = "2"; document.form.dv.value = "3"; document.form.cg.value = "32"; } else if ( (ch >= 50) && (ch < 75) ) { document.form.rk.value = "Emptor"; document.form.hl.value = "850"; document.form.ws.value = "2"; document.form.dv.value = "4"; document.form.cg.value = "34"; } else if ( (ch >= 75) && (ch < 100) ) { document.form.rk.value = "Guildsman"; document.form.hl.value = "3,500"; document.form.ws.value = "3"; document.form.dv.value = "4"; document.form.cg.value = "36"; } else if ( (ch >= 100) && (ch < 135) ) { document.form.rk.value = "Magnate"; document.form.hl.value = "14,000"; document.form.ws.value = "3"; document.form.dv.value = "5"; document.form.cg.value = "38"; } else if ( (ch >= 135) && (ch < 150) ) { document.form.rk.value = "Merchant Prince"; document.form.hl.value = "56,000"; document.form.ws.value = "4"; document.form.dv.value = "5"; document.form.cg.value = "40"; } } 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; } // ACTIVE function incAB() { if (document.form.abnl.value == "MAX") { document.form.abnl.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); ab = eval(document.form.ab.value); abnl = eval(document.form.abnl.value); absu = eval(document.form.absu.value); if ( (ab == 0) && (ch >= 11) ) { ab++; abnl++; document.form.abrq.value = "None"; document.form.abds.value = "Enables Befriend"; } else if ( (ab == 1) && (sr >= abnl) ) { ab++; absu += abnl; su += abnl; sr -= abnl; abnl = ab; document.form.abrq.value = "CL5"; document.form.abds.value = "+Success Rate, Range = 5250"; } 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 = "+Success Rate, Range = 5500, Enables Improved Befriend"; } 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 = "+Success Rate, Range = 5750"; } 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 = "+Success Rate, Range = 6000, Enables Entrance"; } 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 = "+Success Rate, Range = 6250, Enables Soothe"; } 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 = "+Success Rate, Range = 6500, Enables Area Soothe"; } 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 == 1) { ab--; abnl--; document.form.abrq.value = "L11"; document.form.abds.value = ""; } else if (ab == 2) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "None"; document.form.abds.value = "Enables Befriend"; } else if (ab == 3) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "CL5"; document.form.abds.value = "+Success Rate, Range = 5250"; } else if (ab == 4) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "CL15"; document.form.abds.value = "+Success Rate, Range = 5500, Enables Improved Befriend"; } else if (ab == 5) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "CL25"; document.form.abds.value = "+Success Rate, Range = 5750"; } else if (ab == 6) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "CL35"; document.form.abds.value = "+Success Rate, Range = 6000, Enables Entrance"; } else if (ab == 7) { ab--; abnl = ab; absu -= abnl; su -= abnl; sr += abnl; document.form.abrq.value = "CL45"; document.form.abds.value = "+Success Rate, Range = 6250, Enables Soothe"; } 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; } function incAH() { if (document.form.ahnl.value == "MAX") { document.form.ahnl.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); ah = eval(document.form.ah.value); ahnl = eval(document.form.ahnl.value); ahsu = eval(document.form.ahsu.value); if ( (ah == 0) && (ch >= 25) ) { ah++; ahnl++; document.form.ahrq.value = "None"; document.form.ahds.value = "Enables Patch Hull"; } else if ( (ah == 1) && (sr >= ahnl) ) { ah++; ahsu += ahnl; su += ahnl; sr -= ahnl; ahnl = ah; document.form.ahrq.value = "CL5"; document.form.ahds.value = "+Repair Rate"; } else if ( (ah == 2) && (cl >= 5) && (sr >= ahnl) ) { ah++; ahsu += ahnl; su += ahnl; sr -= ahnl; ahnl = ah; document.form.ahrq.value = "CL15"; document.form.ahds.value = "Enables Repair Hull"; } else if ( (ah == 3) && (cl >= 15) && (sr >= ahnl) ) { ah++; ahsu += ahnl; su += ahnl; sr -= ahnl; ahnl = ah; document.form.ahrq.value = "CL25"; document.form.ahds.value = "+Repair Rate, Range = 3250"; } else if ( (ah == 4) && (cl >= 25) && (sr >= ahnl) ) { ah++; ahsu += ahnl; su += ahnl; sr -= ahnl; ahnl = ah; document.form.ahrq.value = "CL35"; document.form.ahds.value = "+Repair Rate, Range = 3500, Enables Combat Hull Repair"; } else if ( (ah == 5) && (cl >= 35) && (sr >= ahnl) ) { ah++; ahsu += ahnl; su += ahnl; sr -= ahnl; ahnl = ah; document.form.ahrq.value = "CL45"; document.form.ahds.value = "+Repair Rate, Range = 3750, Enables Area Hull Repair"; } else if ( (ah == 6) && (cl >= 45) && (sr >= ahnl) ) { ah++; ahsu += ahnl; su += ahnl; sr -= ahnl; ahnl = ah; document.form.ahrq.value = "MAX"; document.form.ahds.value = "+Repair Rate, Range = 4000, Enables Improved Area Hull Repair"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ah.value = ah; document.form.ahnl.value = ahnl; document.form.ahsu.value = ahsu; if (document.form.ahnl.value == "7") { document.form.ahnl.value = "MAX"; } } function decAH() { if (document.form.ahnl.value == "MAX") { document.form.ahnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ah = eval(document.form.ah.value); ahnl = eval(document.form.ahnl.value); ahsu = eval(document.form.ahsu.value); if (ah == 1) { ah--; ahnl--; document.form.ahrq.value = "L25"; document.form.ahds.value = ""; } else if (ah == 2) { ah--; ahnl = ah; ahsu -= ahnl; su -= ahnl; sr += ahnl; document.form.ahrq.value = "None"; document.form.ahds.value = "Enables Patch Hull"; } else if (ah == 3) { ah--; ahnl = ah; ahsu -= ahnl; su -= ahnl; sr += ahnl; document.form.ahrq.value = "CL5"; document.form.ahds.value = "+Repair Rate"; } else if (ah == 4) { ah--; ahnl = ah; ahsu -= ahnl; su -= ahnl; sr += ahnl; document.form.ahrq.value = "CL15"; document.form.ahds.value = "Enables Repair Hull"; } else if (ah == 5) { ah--; ahnl = ah; ahsu -= ahnl; su -= ahnl; sr += ahnl; document.form.ahrq.value = "CL25"; document.form.ahds.value = "+Repair Rate, Range = 3250"; } else if (ah == 6) { ah--; ahnl = ah; ahsu -= ahnl; su -= ahnl; sr += ahnl; document.form.ahrq.value = "CL35"; document.form.ahds.value = "+Repair Rate, Range = 3500, Enables Combat Hull Repair"; } else if (ah == 7) { ah--; ahnl = ah; ahsu -= ahnl; su -= ahnl; sr += ahnl; document.form.ahrq.value = "45"; document.form.ahds.value = "+Repair Rate, Range = 3750, Enables Area Hull Repair"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ah.value = ah; document.form.ahnl.value = ahnl; document.form.ahsu.value = ahsu; } function incAR() { if (document.form.arnl.value == "MAX") { document.form.arnl.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); ar = eval(document.form.ar.value); arnl = eval(document.form.arnl.value); arsu = eval(document.form.arsu.value); if (ar == 0) { ar++; arnl++; document.form.arrq.value = "None"; document.form.ards.value = "Enables Regenerate Shield"; } else if ( (ar == 1) && (sr >= arnl) ) { ar++; arsu += arnl; su += arnl; sr -= arnl; arnl = ar; document.form.arrq.value = "CL5"; document.form.ards.value = "+Shield recharge amount"; } else if ( (ar == 2) && (cl >= 5) && (sr >= arnl) ) { ar++; arsu += arnl; su += arnl; sr -= arnl; arnl = ar; document.form.arrq.value = "CL15"; document.form.ards.value = "Enables Recharge Shields"; } else if ( (ar == 3) && (cl >= 15) && (sr >= arnl) ) { ar++; arsu += arnl; su += arnl; sr -= arnl; arnl = ar; document.form.arrq.value = "CL25"; document.form.ards.value = "+Shield recharge amount, Range = 3250"; } else if ( (ar == 4) && (cl >= 25) && (sr >= arnl) ) { ar++; arsu += arnl; su += arnl; sr -= arnl; arnl = ar; document.form.arrq.value = "CL35"; document.form.ards.value = "Range = 3500, Enables Combat Shield Recharge"; } else if ( (ar == 5) && (cl >= 35) && (sr >= arnl) ) { ar++; arsu += arnl; su += arnl; sr -= arnl; arnl = ar; document.form.arrq.value = "CL45"; document.form.ards.value = "Range = 3750, Enables Area Shield Recharge"; } else if ( (ar == 6) && (cl >= 45) && (sr >= arnl) ) { ar++; arsu += arnl; su += arnl; sr -= arnl; arnl = ar; document.form.arrq.value = "MAX"; document.form.ards.value = "Range = 4000, Enables Improved Area Shield Recharge"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ar.value = ar; document.form.arnl.value = arnl; document.form.arsu.value = arsu; if (document.form.arnl.value == "7") { document.form.arnl.value = "MAX"; } } function decAR() { if (document.form.arnl.value == "MAX") { document.form.arnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ar = eval(document.form.ar.value); arnl = eval(document.form.arnl.value); arsu = eval(document.form.arsu.value); if (ar == 1) { ar--; arnl--; document.form.arrq.value = "None"; document.form.ards.value = ""; } else if (ar == 2) { ar--; arnl = ar; arsu -= arnl; su -= arnl; sr += arnl; document.form.arrq.value = "None"; document.form.ards.value = "Enables Regenerate Shield"; } else if (ar == 3) { ar--; arnl = ar; arsu -= arnl; su -= arnl; sr += arnl; document.form.arrq.value = "CL5"; document.form.ards.value = "+Shield recharge amount"; } else if (ar == 4) { ar--; arnl = ar; arsu -= arnl; su -= arnl; sr += arnl; document.form.arrq.value = "CL15"; document.form.ards.value = "Enables Recharge Shields"; } else if (ar == 5) { ar--; arnl = ar; arsu -= arnl; su -= arnl; sr += arnl; document.form.arrq.value = "CL25"; document.form.ards.value = "+Shield recharge amount, Range = 3250"; } else if (ar == 6) { ar--; arnl = ar; arsu -= arnl; su -= arnl; sr += arnl; document.form.arrq.value = "CL35"; document.form.ards.value = "Range = 3500, Enables Combat Shield Recharge"; } else if (ar == 7) { ar--; arnl = ar; arsu -= arnl; su -= arnl; sr += arnl; document.form.arrq.value = "CL45"; document.form.ards.value = "Range = 3750, Enables Area Shield Recharge"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ar.value = ar; document.form.arnl.value = arnl; document.form.arsu.value = arsu; } function incAC() { if (document.form.acnl.value == "MAX") { document.form.acnl.value = "7"; } cl = eval(document.form.cl.value); sr = eval(document.form.sr.value); su = eval(document.form.su.value); ac = eval(document.form.ac.value); acnl = eval(document.form.acnl.value); acsu = eval(document.form.acsu.value); if ( (ac == 1) && (sr >= acnl) ) { ac++; acsu += acnl; su += acnl; sr -= acnl; acnl = ac; document.form.acrq.value = "CL5"; document.form.acds.value = "+10% Shield capacity"; } else if ( (ac == 2) && (cl >= 5) && (sr >= acnl) ) { ac++; acsu += acnl; su += acnl; sr -= acnl; acnl = ac; document.form.acrq.value = "CL15"; document.form.acds.value = "Enables Ultracharge Shields"; } else if ( (ac == 3) && (cl >= 15) && (sr >= acnl) ) { ac++; acsu += acnl; su += acnl; sr -= acnl; acnl = ac; document.form.acrq.value = "CL25"; document.form.acds.value = "+15% Shield capacity, range = 3250"; } else if ( (ac == 4) && (cl >= 25) && (sr >= acnl) ) { ac++; acsu += acnl; su += acnl; sr -= acnl; acnl = ac; document.form.acrq.value = "CL35"; document.form.acds.value = "Enables Supercharge Target, Range = 3500"; } else if ( (ac == 5) && (cl >= 35) && (sr >= acnl) ) { ac++; acsu += acnl; su += acnl; sr -= acnl; acnl = ac; document.form.acrq.value = "CL45"; document.form.acds.value = "Enables Ultracharge Target, Range = 3750"; } else if ( (ac == 6) && (cl >= 45) && (sr >= acnl) ) { ac++; acsu += acnl; su += acnl; sr -= acnl; acnl = ac; document.form.acrq.value = "MAX"; document.form.acds.value = "Enables Megacharge Shields, Range = 4000"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ac.value = ac; document.form.acnl.value = acnl; document.form.acsu.value = acsu; if (document.form.acnl.value == "7") { document.form.acnl.value = "MAX"; } } function decAC() { if (document.form.acnl.value == "MAX") { document.form.acnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); ac = eval(document.form.ac.value); acnl = eval(document.form.acnl.value); acsu = eval(document.form.acsu.value); if (ac == 2) { ac--; acnl = ac; acsu -= acnl; su -= acnl; sr += acnl; document.form.acrq.value = "None"; document.form.acds.value = "Enables Supercharge Shields"; } else if (ac == 3) { ac--; acnl = ac; acsu -= acnl; su -= acnl; sr += acnl; document.form.acrq.value = "CL5"; document.form.acds.value = "+10% Shield capacity"; } else if (ac == 4) { ac--; acnl = ac; acsu -= acnl; su -= acnl; sr += acnl; document.form.acrq.value = "CL15"; document.form.acds.value = "Enables Ultracharge Shields"; } else if (ac == 5) { ac--; acnl = ac; acsu -= acnl; su -= acnl; sr += acnl; document.form.acrq.value = "CL25"; document.form.acds.value = "+15% Shield capacity, range = 3250"; } else if (ac == 6) { ac--; acnl = ac; acsu -= acnl; su -= acnl; sr += acnl; document.form.acrq.value = "CL25"; document.form.acds.value = "Enables Supercharge Target, Range = 3500"; } else if (ac == 7) { ac--; acnl = ac; acsu -= acnl; su -= acnl; sr += acnl; document.form.acrq.value = "CL35"; document.form.acds.value = "Enables Ultracharge Target, Range = 3750"; } document.form.sr.value = sr; document.form.su.value = su; document.form.ac.value = ac; document.form.acnl.value = acnl; document.form.acsu.value = acsu; } // PASSIVE function incPN() { if (document.form.pnnl.value == "MAX") { document.form.pnnl.value = "7"; } tl = eval(document.form.tl.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) { 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 = "TL35"; document.form.pnds.value = "-Cost of manufacturing and refining"; } else if ( (pn == 5) && (tl >= 35) && (sr >= pnnl) ) { pn++; pnsu += pnnl; su += pnnl; sr -= pnnl; pnnl = pn; document.form.pnrq.value = "TL45"; document.form.pnds.value = "+Skill power"; } else if ( (pn == 6) && (tl >= 45) && (sr >= pnnl) ) { pn++; pnsu += pnnl; su += pnnl; sr -= pnnl; pnnl = pn; document.form.pnrq.value = "MAX"; document.form.pnds.value = "+Rewards for missions"; } 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 == "7") { document.form.pnnl.value = "MAX"; } } function decPN() { if (document.form.pnnl.value == "MAX") { document.form.pnnl.value = "7"; } 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 = "None"; 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"; } else if (pn == 6) { pn--; pnnl = pn; pnsu -= pnnl; su -= pnnl; sr += pnnl; document.form.pnrq.value = "TL35"; document.form.pnds.value = "-Cost of manufacturing and refining"; } else if (pn == 7) { pn--; pnnl = pn; pnsu -= pnnl; su -= pnnl; sr += pnnl; document.form.pnrq.value = "TL45"; 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; } function incPV() { if (document.form.pvnl.value == "MAX") { document.form.pvnl.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); pv = eval(document.form.pv.value); pvnl = eval(document.form.pvnl.value); pvsu = eval(document.form.pvsu.value); if ( (pv == 0) && (ch >= 40) ) { pv++; pvnl++; document.form.pvrq.value = "None"; document.form.pvds.value = "-20% Warp activation energy"; } else if ( (pv == 1) && (sr >= pvnl) ) { pv++; pvsu += pvnl; su += pvnl; sr -= pvnl; pvnl = pv; document.form.pvrq.value = "EL5"; document.form.pvds.value = "-30% Warp activation energy"; } else if ( (pv == 2) && (el >= 5) && (sr >= pvnl) ) { pv++; pvsu += pvnl; su += pvnl; sr -= pvnl; pvnl = pv; document.form.pvrq.value = "EL15"; document.form.pvds.value = "-40% Warp activation energy, -10% Warp init & recov time"; } else if ( (pv == 3) && (el >= 15) && (sr >= pvnl) ) { pv++; pvsu += pvnl; su += pvnl; sr -= pvnl; pvnl = pv; document.form.pvrq.value = "EL25"; document.form.pvds.value = "-50% Warp activation energy, -15% Warp init & recov time"; } else if ( (pv == 4) && (el >= 25) && (sr >= pvnl) ) { pv++; pvsu += pvnl; su += pvnl; sr -= pvnl; pvnl = pv; document.form.pvrq.value = "MAX"; document.form.pvds.value = "-60% Warp activation energy, -20% Warp init & recov time, +70 speed"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pv.value = pv; document.form.pvnl.value = pvnl; document.form.pvsu.value = pvsu; if (document.form.pvnl.value == "5") { document.form.pvnl.value = "MAX"; } } function decPV() { if (document.form.pvnl.value == "MAX") { document.form.pvnl.value = "5"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); pv = eval(document.form.pv.value); pvnl = eval(document.form.pvnl.value); pvsu = eval(document.form.pvsu.value); if (pv == 1) { pv--; pvnl--; document.form.pvrq.value = "L40"; document.form.pvds.value = ""; } else if (pv == 2) { pv--; pvnl = pv; pvsu -= pvnl; su -= pvnl; sr += pvnl; document.form.pvrq.value = "None"; document.form.pvds.value = "-20% Warp activation energy"; } else if (pv == 3) { pv--; pvnl = pv; pvsu -= pvnl; su -= pvnl; sr += pvnl; document.form.pvrq.value = "EL5"; document.form.pvds.value = "-30% Warp activation energy"; } else if (pv == 4) { pv--; pvnl = pv; pvsu -= pvnl; su -= pvnl; sr += pvnl; document.form.pvrq.value = "EL15"; document.form.pvds.value = "-40% Warp activation energy, -10% Warp init & recov time"; } else if (pv == 5) { pv--; pvnl = pv; pvsu -= pvnl; su -= pvnl; sr += pvnl; document.form.pvrq.value = "EL25"; document.form.pvds.value = "-50% Warp activation energy, -15% Warp init & recov time"; } document.form.sr.value = sr; document.form.su.value = su; document.form.pv.value = pv; document.form.pvnl.value = pvnl; document.form.pvsu.value = pvsu; } // BUILD function incBC() { if (document.form.bcnl.value == "MAX") { document.form.bcnl.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); bc = eval(document.form.bc.value); bcnl = eval(document.form.bcnl.value); bcsu = eval(document.form.bcsu.value); if ( (bc == 0) && (ch >= 10) ) { bc++; bcnl++; document.form.bcrq.value = "None"; document.form.bcds.value = "Analysis and manufacture of L1 components"; } else if ( (bc == 1) && (sr >= bcnl) ) { bc++; bcsu += bcnl; su += bcnl; sr -= bcnl; bcnl = bc; document.form.bcrq.value = "TL5"; document.form.bcds.value = "Analysis and manufacture of L2 components"; } else if ( (bc == 2) && (tl >= 5) && (sr >= bcnl) ) { bc++; bcsu += bcnl; su += bcnl; sr -= bcnl; bcnl = bc; document.form.bcrq.value = "TL15"; document.form.bcds.value = "Analysis and manufacture of L3 components"; } else if ( (bc == 3) && (tl >= 15) && (sr >= bcnl) ) { bc++; bcsu += bcnl; su += bcnl; sr -= bcnl; bcnl = bc; document.form.bcrq.value = "TL25"; document.form.bcds.value = "Analysis and manufacture of L4 components"; } else if ( (bc == 4) && (tl >= 25) && (sr >= bcnl) ) { bc++; bcsu += bcnl; su += bcnl; sr -= bcnl; bcnl = bc; document.form.bcrq.value = "TL35"; document.form.bcds.value = "Analysis and manufacture of L5 components"; } else if ( (bc == 5) && (tl >= 35) && (sr >= bcnl) ) { bc++; bcsu += bcnl; su += bcnl; sr -= bcnl; bcnl = bc; document.form.bcrq.value = "TL45"; document.form.bcds.value = "Analysis and manufacture of L6 & L7 components"; } else if ( (bc == 6) && (tl >= 45) && (sr >= bcnl) ) { bc++; bcsu += bcnl; su += bcnl; sr -= bcnl; bcnl = bc; document.form.bcrq.value = "MAX"; document.form.bcds.value = "Analysis and manufacture of L8 & L9 components"; } document.form.sr.value = sr; document.form.su.value = su; document.form.bc.value = bc; document.form.bcnl.value = bcnl; document.form.bcsu.value = bcsu; if (document.form.bcnl.value == "7") { document.form.bcnl.value = "MAX"; } } function decBC() { if (document.form.bcnl.value == "MAX") { document.form.bcnl.value = "7"; } sr = eval(document.form.sr.value); su = eval(document.form.su.value); bc = eval(document.form.bc.value); bcnl = eval(document.form.bcnl.value); bcsu = eval(document.form.bcsu.value); if (bc == 1) { bc--; bcnl--; document.form.bcrq.value = "L10"; document.form.bcds.value = ""; } else if (bc == 2) { bc--; bcnl = bc; bcsu -= bcnl; su -= bcnl; sr += bcnl; document.form.bcrq.value = "None"; document.form.bcds.value = "Analysis and manufacture of L1 components"; } else if (bc == 3) { bc--; bcnl = bc; bcsu -= bcnl; su -= bcnl; sr += bcnl; document.form.bcrq.value = "TL5"; document.form.bcds.value = "Analysis and manufacture of L2 components"; } else if (bc == 4) { bc--; bcnl = bc; bcsu -= bcnl; su -= bcnl; sr += bcnl; document.form.bcrq.value = "TL15"; document.form.bcds.value = "Analysis and manufacture of L3 components"; } else if (bc == 5) { bc--; bcnl = bc; bcsu -= bcnl; su -= bcnl; sr += bcnl; document.form.bcrq.value = "TL25"; document.form.bcds.value = "Analysis and manufacture of L4 components"; } else if (bc == 6) { bc--; bcnl = bc; bcsu -= bcnl; su -= bcnl; sr += bcnl; document.form.bcrq.value = "TL35"; document.form.bcds.value = "Analysis and manufacture of L5 components"; } else if (bc == 7) { bc--; bcnl = bc; bcsu -= bcnl; su -= bcnl; sr += bcnl; document.form.bcrq.value = "TL45"; document.form.bcds.value = "Analysis and manufacture of L6 & L7 components"; } document.form.sr.value = sr; document.form.su.value = su; document.form.bc.value = bc; document.form.bcnl.value = bcnl; document.form.bcsu.value = bcsu; } 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 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 >= 35) ) { 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 = "L35"; 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 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) ) { 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 = "None"; 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; } 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(); decAB(); decAH(); decAR(); decAC(); decPV(); decPN(); decBC(); decBD(); decBE(); decBS(); 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 maxAB() { for (i = 0; i < 9; i++) { incAB(); } } function maxAH() { for (i = 0; i < 9; i++) { incAH(); } } function maxAR() { for (i = 0; i < 9; i++) { incAR(); } } function maxAC() { for (i = 0; i < 9; i++) { incAC(); } } function maxPV() { for (i = 0; i < 9; i++) { incPV(); } } function maxPN() { for (i = 0; i < 9; i++) { incPN(); } } function maxBC() { for (i = 0; i < 9; i++) { incBC(); } } function maxBD() { for (i = 0; i < 9; i++) { incBD(); } } function maxBE() { for (i = 0; i < 9; i++) { incBE(); } } function maxBS() { for (i = 0; i < 9; i++) { incBS(); } } 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 minAB() { for (i = 0; i < 9; i++) { decAB(); } } function minAH() { for (i = 0; i < 9; i++) { decAH(); } } function minAR() { for (i = 0; i < 9; i++) { decAR(); } } function minAC() { for (i = 0; i < 9; i++) { decAC(); } } function minPV() { for (i = 0; i < 9; i++) { decPV(); } } function minPN() { for (i = 0; i < 9; i++) { decPN(); } } function minBC() { for (i = 0; i < 9; i++) { decBC(); } } function minBD() { for (i = 0; i < 9; i++) { decBD(); } } function minBE() { for (i = 0; i < 9; i++) { decBE(); } } function minBS() { for (i = 0; i < 9; i++) { decBS(); } } 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 = "TTcl=" + document.form.cl.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTel=" + document.form.el.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTtl=" + document.form.tl.value + ";expires=" + expireDate.toGMTString(); // document.cookie = "JEsb=" + document.form.sb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTwb=" + document.form.wb.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTwm=" + document.form.wm.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTab=" + document.form.ab.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTah=" + document.form.ah.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTar=" + document.form.ar.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTac=" + document.form.ac.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTpv=" + document.form.pv.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTpn=" + document.form.pn.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTbc=" + document.form.bc.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTbd=" + document.form.bd.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTbe=" + document.form.be.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTbs=" + document.form.bs.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTbw=" + document.form.bw.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTtd=" + document.form.td.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTte=" + document.form.te.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTtr=" + document.form.tr.value + ";expires=" + expireDate.toGMTString(); document.cookie = "TTts=" + 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] == "TTcl") { clCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < clCnt; j++) { incCL(); }} if (thisCookie[i].split("=")[0] == "TTel") { elCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < elCnt; j++) { incEL(); }} if (thisCookie[i].split("=")[0] == "TTtl") { 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] == "TTwb") { wbCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (wbCnt - 1); j++) { incWB(); }} if (thisCookie[i].split("=")[0] == "TTwm") { wmCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < wmCnt; j++) { incWM(); }} if (thisCookie[i].split("=")[0] == "TTab") { abCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < abCnt; j++) { incAB(); }} if (thisCookie[i].split("=")[0] == "TTah") { ahCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < ahCnt; j++) { incAH(); }} if (thisCookie[i].split("=")[0] == "TTar") { arCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < arCnt; j++) { incAR(); }} if (thisCookie[i].split("=")[0] == "TTac") { acCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (acCnt - 1); j++) { incAC(); }} if (thisCookie[i].split("=")[0] == "TTpv") { pvCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < pvCnt; j++) { incPV(); }} if (thisCookie[i].split("=")[0] == "TTpn") { pnCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < pnCnt; j++) { incPN(); }} if (thisCookie[i].split("=")[0] == "TTbc") { bcCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < bcCnt; j++) { incBC(); }} if (thisCookie[i].split("=")[0] == "TTbd") { bdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < bdCnt; j++) { incBD(); }} if (thisCookie[i].split("=")[0] == "TTbe") { beCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < beCnt; j++) { incBE(); }} if (thisCookie[i].split("=")[0] == "TTbs") { bsCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < bsCnt; j++) { incBS(); }} if (thisCookie[i].split("=")[0] == "TTbw") { bwCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < bwCnt; j++) { incBW(); }} if (thisCookie[i].split("=")[0] == "TTtd") { tdCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tdCnt - 1); j++) { incTD(); }} if (thisCookie[i].split("=")[0] == "TTte") { teCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (teCnt - 1); j++) { incTE(); }} if (thisCookie[i].split("=")[0] == "TTtr") { trCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (trCnt - 1); j++) { incTR(); }} if (thisCookie[i].split("=")[0] == "TTts") { tsCnt = eval(thisCookie[i].split("=")[1]); for (j = 0; j < (tsCnt - 1); j++) { incTS(); }} } } }