MediaWiki:CustomArmorSet.js

$(document).ready(function {              eval(document.getElementById("armorsetboxdata").innerHTML); });

//Turn image url into image function urlImage(name, img) { return ""+""+""; }

//IDs for testing var head_id = "helm_of_artorias"; var chest_id = "armor_of_artorias"; var hands_id = "gauntlets_of_artorias"; var legs_id = "leggings_of_artorias";

//Upgrade levels for testing var head_lvl = 0; var chest_lvl = 0; var hands_lvl = 0; var legs_lvl = 0;

//Set head armor menu options var head_menu = document.getElementById("head_menu"); for (var head_opt_id in head_armor) { var head_opt_name = head_armor[head_opt_id].name; var head_opt = document.createElement("option"); head_opt.text = head_opt_name; head_opt.value = head_opt_id; head_menu.add(head_opt); }

//Set chest armor menu options var chest_menu = document.getElementById("chest_menu"); for (var chest_opt_id in chest_armor) { var chest_opt_name = chest_armor[chest_opt_id].name; var chest_opt = document.createElement("option"); chest_opt.text = chest_opt_name; chest_opt.value = chest_opt_id; chest_menu.add(chest_opt); }

//Set hands armor menu options var hands_menu = document.getElementById("hands_menu"); for (var hands_opt_id in hands_armor) { var hands_opt_name = hands_armor[hands_opt_id].name; var hands_opt = document.createElement("option"); hands_opt.text = hands_opt_name; hands_opt.value = hands_opt_id; hands_menu.add(hands_opt); }

//Set legs armor menu options var legs_menu = document.getElementById("legs_menu"); for (var legs_opt_id in legs_armor) { var legs_opt_name = legs_armor[legs_opt_id].name; var legs_opt = document.createElement("option"); legs_opt.text = legs_opt_name; legs_opt.value = legs_opt_id; legs_menu.add(legs_opt); } //Set head armor upgrade lvl drop down box if (head_armor[head_id].lvl1 !== undefined) { document.getElementById("head_lvl1").disabled = false; document.getElementById("head_lvl2").disabled = false; document.getElementById("head_lvl3").disabled = false; document.getElementById("head_lvl4").disabled = false; document.getElementById("head_lvl5").disabled = false; if (head_armor[head_id].lvl6 !== undefined) { document.getElementById("head_lvl6").disabled = false; document.getElementById("head_lvl7").disabled = false; document.getElementById("head_lvl8").disabled = false; document.getElementById("head_lvl9").disabled = false; document.getElementById("head_lvl10").disabled = false; } }

//Set chest armor upgrade lvl drop down box if (chest_armor[chest_id].lvl1 !== undefined) { document.getElementById("chest_lvl1").disabled = false; document.getElementById("chest_lvl2").disabled = false; document.getElementById("chest_lvl3").disabled = false; document.getElementById("chest_lvl4").disabled = false; document.getElementById("chest_lvl5").disabled = false; if (chest_armor[chest_id].lvl6 !== undefined) { document.getElementById("chest_lvl6").disabled = false; document.getElementById("chest_lvl7").disabled = false; document.getElementById("chest_lvl8").disabled = false; document.getElementById("chest_lvl9").disabled = false; document.getElementById("chest_lvl10").disabled = false; } }

//Set hands armor upgrade lvl drop down box if (hands_armor[hands_id].lvl1 !== undefined) { document.getElementById("hands_lvl1").disabled = false; document.getElementById("hands_lvl2").disabled = false; document.getElementById("hands_lvl3").disabled = false; document.getElementById("hands_lvl4").disabled = false; document.getElementById("hands_lvl5").disabled = false; if (hands_armor[hands_id].lvl6 !== undefined) { document.getElementById("hands_lvl6").disabled = false; document.getElementById("hands_lvl7").disabled = false; document.getElementById("hands_lvl8").disabled = false; document.getElementById("hands_lvl9").disabled = false; document.getElementById("hands_lvl10").disabled = false; } }

//Set legs armor upgrade lvl drop down box if (legs_armor[legs_id].lvl1 !== undefined) { document.getElementById("legs_lvl1").disabled = false; document.getElementById("legs_lvl2").disabled = false; document.getElementById("legs_lvl3").disabled = false; document.getElementById("legs_lvl4").disabled = false; document.getElementById("legs_lvl5").disabled = false; if (legs_armor[legs_id].lvl6 !== undefined) { document.getElementById("legs_lvl6").disabled = false; document.getElementById("legs_lvl7").disabled = false; document.getElementById("legs_lvl8").disabled = false; document.getElementById("legs_lvl9").disabled = false; document.getElementById("legs_lvl10").disabled = false; } }

//Strings to hold head armor stats var head_name = head_armor[head_id].name; var head_img = head_armor[head_id].img; var strHead_lvl0 = head_armor[head_id].lvl0; if (head_armor[head_id].lvl1 !== undefined) { var strHead_lvl1 = head_armor[head_id].lvl1; var strHead_lvl2 = head_armor[head_id].lvl2; var strHead_lvl3 = head_armor[head_id].lvl3; var strHead_lvl4 = head_armor[head_id].lvl4; var strHead_lvl5 = head_armor[head_id].lvl5; if (head_armor[head_id].lvl6 !== undefined) { var strHead_lvl6 = head_armor[head_id].lvl6; var strHead_lvl7 = head_armor[head_id].lvl7; var strHead_lvl8 = head_armor[head_id].lvl8; var strHead_lvl9 = head_armor[head_id].lvl9; var strHead_lvl10 = head_armor[head_id].lvl10; } }

//Strings to hold chest armor stats var chest_name = chest_armor[chest_id].name; var chest_img = chest_armor[chest_id].img; var strChest_lvl0 = chest_armor[chest_id].lvl0; if (chest_armor[chest_id].lvl1 !== undefined) { var strChest_lvl1 = chest_armor[chest_id].lvl1; var strChest_lvl2 = chest_armor[chest_id].lvl2; var strChest_lvl3 = chest_armor[chest_id].lvl3; var strChest_lvl4 = chest_armor[chest_id].lvl4; var strChest_lvl5 = chest_armor[chest_id].lvl5; if (chest_armor[chest_id].lvl6 !== undefined) { var strChest_lvl6 = chest_armor[chest_id].lvl6; var strChest_lvl7 = chest_armor[chest_id].lvl7; var strChest_lvl8 = chest_armor[chest_id].lvl8; var strChest_lvl9 = chest_armor[chest_id].lvl9; var strChest_lvl10 = chest_armor[chest_id].lvl10; } }

//Strings to hold hands armor stats var hands_name = hands_armor[hands_id].name; var hands_img = hands_armor[hands_id].img; var strHands_lvl0 = hands_armor[hands_id].lvl0; if (hands_armor[hands_id].lvl1 !== undefined) { var strHands_lvl1 = hands_armor[hands_id].lvl1; var strHands_lvl2 = hands_armor[hands_id].lvl2; var strHands_lvl3 = hands_armor[hands_id].lvl3; var strHands_lvl4 = hands_armor[hands_id].lvl4; var strHands_lvl5 = hands_armor[hands_id].lvl5; if (hands_armor[hands_id].lvl6 !== undefined) { var strHands_lvl6 = hands_armor[hands_id].lvl6; var strHands_lvl7 = hands_armor[hands_id].lvl7; var strHands_lvl8 = hands_armor[hands_id].lvl8; var strHands_lvl9 = hands_armor[hands_id].lvl9; var strHands_lvl10 = hands_armor[hands_id].lvl10; } }

//Strings to hold legs armor stats var legs_name = legs_armor[legs_id].name; var legs_img = legs_armor[legs_id].img; var strLegs_lvl0 = legs_armor[legs_id].lvl0; if (legs_armor[legs_id].lvl1 !== undefined) { var strLegs_lvl1 = legs_armor[legs_id].lvl1; var strLegs_lvl2 = legs_armor[legs_id].lvl2; var strLegs_lvl3 = legs_armor[legs_id].lvl3; var strLegs_lvl4 = legs_armor[legs_id].lvl4; var strLegs_lvl5 = legs_armor[legs_id].lvl5; if (legs_armor[legs_id].lvl6 !== undefined) { var strLegs_lvl6 = legs_armor[legs_id].lvl6; var strLegs_lvl7 = legs_armor[legs_id].lvl7; var strLegs_lvl8 = legs_armor[legs_id].lvl8; var strLegs_lvl9 = legs_armor[legs_id].lvl9; var strLegs_lvl10 = legs_armor[legs_id].lvl10; } }

//Arrays to hold head armor stats var arrHead_lvl0 = new Array(11); if (strHead_lvl1 !== undefined) { var arrHead_lvl1 = new Array(9); var arrHead_lvl2 = new Array(9); var arrHead_lvl3 = new Array(9); var arrHead_lvl4 = new Array(9); var arrHead_lvl5 = new Array(9); if (strHead_lvl6 !== undefined) { var arrHead_lvl6 = new Array(9); var arrHead_lvl7 = new Array(9); var arrHead_lvl8 = new Array(9); var arrHead_lvl9 = new Array(9); var arrHead_lvl10 = new Array(9); } }

//Arrays to hold chest armor stats var arrChest_lvl0 = new Array(11); if (strChest_lvl1 !== undefined) { var arrChest_lvl1 = new Array(9); var arrChest_lvl2 = new Array(9); var arrChest_lvl3 = new Array(9); var arrChest_lvl4 = new Array(9); var arrChest_lvl5 = new Array(9); if (strChest_lvl6 !== undefined) { var arrChest_lvl6 = new Array(9); var arrChest_lvl7 = new Array(9); var arrChest_lvl8 = new Array(9); var arrChest_lvl9 = new Array(9); var arrChest_lvl10 = new Array(9); } }

//Arrays to hold hands armor stats var arrHands_lvl0 = new Array(11); if (strHands_lvl1 !== undefined) { var arrHands_lvl1 = new Array(9); var arrHands_lvl2 = new Array(9); var arrHands_lvl3 = new Array(9); var arrHands_lvl4 = new Array(9); var arrHands_lvl5 = new Array(9); if (strHands_lvl6 !== undefined) { var arrHands_lvl6 = new Array(9); var arrHands_lvl7 = new Array(9); var arrHands_lvl8 = new Array(9); var arrHands_lvl9 = new Array(9); var arrHands_lvl10 = new Array(9); } }

//Arrays to hold legs armor stats var arrLegs_lvl0 = new Array(11); if (strLegs_lvl1 !== undefined) { var arrLegs_lvl1 = new Array(9); var arrLegs_lvl2 = new Array(9); var arrLegs_lvl3 = new Array(9); var arrLegs_lvl4 = new Array(9); var arrLegs_lvl5 = new Array(9); if (strLegs_lvl6 !== undefined) { var arrLegs_lvl6 = new Array(9); var arrLegs_lvl7 = new Array(9); var arrLegs_lvl8 = new Array(9); var arrLegs_lvl9 = new Array(9); var arrLegs_lvl10 = new Array(9); } }

//Put head armor stats strings into arrays + poise and weight for lvl0 arrHead_lvl0 = strHead_lvl0.split("|"); arrHead_lvl0[10] = head_armor[head_id].poise; arrHead_lvl0[11] = head_armor[head_id].weight; if (arrHead_lvl1 !== undefined) { arrHead_lvl1 = strHead_lvl1.split("|"); arrHead_lvl2 = strHead_lvl2.split("|"); arrHead_lvl3 = strHead_lvl3.split("|"); arrHead_lvl4 = strHead_lvl4.split("|"); arrHead_lvl5 = strHead_lvl5.split("|"); if (arrHead_lvl6 !== undefined) { arrHead_lvl6 = strHead_lvl6.split("|"); arrHead_lvl7 = strHead_lvl7.split("|"); arrHead_lvl8 = strHead_lvl8.split("|"); arrHead_lvl9 = strHead_lvl9.split("|"); arrHead_lvl10 = strHead_lvl10.split("|"); } }

//Put chest armor stats strings into arrays + poise and weight for lvl0 arrChest_lvl0 = strChest_lvl0.split("|"); arrChest_lvl0[10] = chest_armor[chest_id].poise; arrChest_lvl0[11] = chest_armor[chest_id].weight; if (arrChest_lvl1 !== undefined) { arrChest_lvl1 = strChest_lvl1.split("|"); arrChest_lvl2 = strChest_lvl2.split("|"); arrChest_lvl3 = strChest_lvl3.split("|"); arrChest_lvl4 = strChest_lvl4.split("|"); arrChest_lvl5 = strChest_lvl5.split("|"); if (arrChest_lvl6 !== undefined) { arrChest_lvl6 = strChest_lvl6.split("|"); arrChest_lvl7 = strChest_lvl7.split("|"); arrChest_lvl8 = strChest_lvl8.split("|"); arrChest_lvl9 = strChest_lvl9.split("|"); arrChest_lvl10 = strChest_lvl10.split("|"); } }

//Put hands armor stats strings into arrays + poise and weight for lvl0 arrHands_lvl0 = strHands_lvl0.split("|"); arrHands_lvl0[10] = hands_armor[hands_id].poise; arrHands_lvl0[11] = hands_armor[hands_id].weight; if (arrHands_lvl1 !== undefined) { arrHands_lvl1 = strHands_lvl1.split("|"); arrHands_lvl2 = strHands_lvl2.split("|"); arrHands_lvl3 = strHands_lvl3.split("|"); arrHands_lvl4 = strHands_lvl4.split("|"); arrHands_lvl5 = strHands_lvl5.split("|"); if (arrHands_lvl6 !== undefined) { arrHands_lvl6 = strHands_lvl6.split("|"); arrHands_lvl7 = strHands_lvl7.split("|"); arrHands_lvl8 = strHands_lvl8.split("|"); arrHands_lvl9 = strHands_lvl9.split("|"); arrHands_lvl10 = strHands_lvl10.split("|"); } }

//Put legs armor stats strings into arrays + poise and weight for lvl0 arrLegs_lvl0 = strLegs_lvl0.split("|"); arrLegs_lvl0[10] = legs_armor[legs_id].poise; arrLegs_lvl0[11] = legs_armor[legs_id].weight; if (arrLegs_lvl1 !== undefined) { arrLegs_lvl1 = strLegs_lvl1.split("|"); arrLegs_lvl2 = strLegs_lvl2.split("|"); arrLegs_lvl3 = strLegs_lvl3.split("|"); arrLegs_lvl4 = strLegs_lvl4.split("|"); arrLegs_lvl5 = strLegs_lvl5.split("|"); if (arrLegs_lvl6 !== undefined) { arrLegs_lvl6 = strLegs_lvl6.split("|"); arrLegs_lvl7 = strLegs_lvl7.split("|"); arrLegs_lvl8 = strLegs_lvl8.split("|"); arrLegs_lvl9 = strLegs_lvl9.split("|"); arrLegs_lvl10 = strLegs_lvl10.split("|"); } }

//Put head armor arrays for each upgrade lvl into one 2D array if (arrHead_lvl1 === undefined) { var arrHead = [ arrHead_lvl0 ]; } else if (arrHead_lvl6 === undefined) { var arrHead = [ arrHead_lvl0, arrHead_lvl1, arrHead_lvl2, arrHead_lvl3, arrHead_lvl4, arrHead_lvl5 ]; } else { var arrHead = [ arrHead_lvl0, arrHead_lvl1, arrHead_lvl2, arrHead_lvl3, arrHead_lvl4, arrHead_lvl5, arrHead_lvl6, arrHead_lvl7, arrHead_lvl8, arrHead_lvl9, arrHead_lvl10 ]; }

//Put chest armor arrays for each upgrade lvl into one 2D array if (arrChest_lvl1 === undefined) { var arrChest = [ arrChest_lvl0 ]; } else if (arrChest_lvl6 === undefined) { var arrChest = [ arrChest_lvl0, arrChest_lvl1, arrChest_lvl2, arrChest_lvl3, arrChest_lvl4, arrChest_lvl5 ]; } else { var arrChest = [ arrChest_lvl0, arrChest_lvl1, arrChest_lvl2, arrChest_lvl3, arrChest_lvl4, arrChest_lvl5, arrChest_lvl6, arrChest_lvl7, arrChest_lvl8, arrChest_lvl9, arrChest_lvl10 ]; }

//Put hands armor arrays for each upgrade lvl into one 2D array if (arrHands_lvl1 === undefined) { var arrHands = [ arrHands_lvl0 ]; } else if (arrHands_lvl6 === undefined) { var arrHands = [ arrHands_lvl0, arrHands_lvl1, arrHands_lvl2, arrHands_lvl3, arrHands_lvl4, arrHands_lvl5 ]; } else { var arrHands = [ arrHands_lvl0, arrHands_lvl1, arrHands_lvl2, arrHands_lvl3, arrHands_lvl4, arrHands_lvl5, arrHands_lvl6, arrHands_lvl7, arrHands_lvl8, arrHands_lvl9, arrHands_lvl10 ]; }

//Put legs armor arrays for each upgrade lvl into one 2D array if (arrLegs_lvl1 === undefined) { arrLegs = [ arrLegs_lvl0 ]; } else if (arrLegs_lvl6 === undefined) { var arrLegs = [ arrLegs_lvl0, arrLegs_lvl1, arrLegs_lvl2, arrLegs_lvl3, arrLegs_lvl4, arrLegs_lvl5 ]; } else { var arrLegs = [ arrLegs_lvl0, arrLegs_lvl1, arrLegs_lvl2, arrLegs_lvl3, arrLegs_lvl4, arrLegs_lvl5, arrLegs_lvl6, arrLegs_lvl7, arrLegs_lvl8, arrLegs_lvl9, arrLegs_lvl10 ]; }

//If head armor curse res. is "-" (not a number); make it "0.0" if (isNaN(arrHead[head_lvl][9]) === true) { arrHead[head_lvl][9] = "0.0"; }

//If chest armor curse res. is "-" (not a number); make it "0.0" if (isNaN(arrChest[chest_lvl][9]) === true) { arrChest[chest_lvl][9] = "0.0"; }

//If hands armor curse res is "-" (not a number); make it "0.0" if (isNaN(arrHands[hands_lvl][9]) === true) { arrHands[hands_lvl][9] = "0.0"; }

//If legs armor curse res is "-" (not a number); make it "0.0" if (isNaN(arrLegs[legs_lvl][9]) === true) { arrLegs[legs_lvl][9] = "0.0"; }

//Total stats array var arrTotal = [ (parseFloat(arrHead[head_lvl][0]) + parseFloat(arrChest[chest_lvl][0]) + parseFloat(arrHands[hands_lvl][0]) + parseFloat(arrLegs[legs_lvl][0])).toFixed(1), (parseFloat(arrHead[head_lvl][1]) + parseFloat(arrChest[chest_lvl][1]) + parseFloat(arrHands[hands_lvl][1]) + parseFloat(arrLegs[legs_lvl][1])).toFixed(1), (parseFloat(arrHead[head_lvl][2]) + parseFloat(arrChest[chest_lvl][2]) + parseFloat(arrHands[hands_lvl][2]) + parseFloat(arrLegs[legs_lvl][2])).toFixed(1), (parseFloat(arrHead[head_lvl][3]) + parseFloat(arrChest[chest_lvl][3]) + parseFloat(arrHands[hands_lvl][3]) + parseFloat(arrLegs[legs_lvl][3])).toFixed(1), (parseFloat(arrHead[head_lvl][4]) + parseFloat(arrChest[chest_lvl][4]) + parseFloat(arrHands[hands_lvl][4]) + parseFloat(arrLegs[legs_lvl][4])).toFixed(1), (parseFloat(arrHead[head_lvl][5]) + parseFloat(arrChest[chest_lvl][5]) + parseFloat(arrHands[hands_lvl][5]) + parseFloat(arrLegs[legs_lvl][5])).toFixed(1), (parseFloat(arrHead[head_lvl][6]) + parseFloat(arrChest[chest_lvl][6]) + parseFloat(arrHands[hands_lvl][6]) + parseFloat(arrLegs[legs_lvl][6])).toFixed(1), (parseFloat(arrHead[head_lvl][7]) + parseFloat(arrChest[chest_lvl][7]) + parseFloat(arrHands[hands_lvl][7]) + parseFloat(arrLegs[legs_lvl][7])).toFixed(1), (parseFloat(arrHead[head_lvl][8]) + parseFloat(arrChest[chest_lvl][8]) + parseFloat(arrHands[hands_lvl][8]) + parseFloat(arrLegs[legs_lvl][8])).toFixed(1), (parseFloat(arrHead[head_lvl][9]) + parseFloat(arrChest[chest_lvl][9]) + parseFloat(arrHands[hands_lvl][9]) + parseFloat(arrLegs[legs_lvl][9])).toFixed(1), (parseFloat(arrHead[head_lvl][10]) + parseFloat(arrChest[chest_lvl][10]) + parseFloat(arrHands[hands_lvl][10]) + parseFloat(arrLegs[legs_lvl][10])).toFixed(1), (parseFloat(arrHead[head_lvl][11]) + parseFloat(arrChest[chest_lvl][11]) + parseFloat(arrHands[hands_lvl][11]) + parseFloat(arrLegs[legs_lvl][11])).toFixed(1) ];

//Display head armor stats + image function showHeadArmorStats { if (head_name === "Unequipped") { document.getElementById("head_img").innerHTML = "Unequipped" } else { document.getElementById("head_img").innerHTML = urlImage(head_name, head_img); } document.getElementById("head_phy").innerHTML = arrHead[head_lvl][0]; document.getElementById("head_strike").innerHTML = arrHead[head_lvl][1]; document.getElementById("head_slash").innerHTML = arrHead[head_lvl][2]; document.getElementById("head_thrust").innerHTML = arrHead[head_lvl][3]; document.getElementById("head_mag").innerHTML = arrHead[head_lvl][4]; document.getElementById("head_fire").innerHTML = arrHead[head_lvl][5]; document.getElementById("head_ltn").innerHTML = arrHead[head_lvl][6]; document.getElementById("head_bleed").innerHTML = arrHead[head_lvl][7]; document.getElementById("head_poison").innerHTML = arrHead[head_lvl][8]; document.getElementById("head_curse").innerHTML = arrHead[head_lvl][9]; document.getElementById("head_poise").innerHTML = arrHead[0][10]; document.getElementById("head_weight").innerHTML = arrHead[0][11]; }

//Display chest armor stats + image function showChestArmorStats { if (chest_name === "Unequipped") { document.getElementById("chest_img").innerHTML = "Unequipped" } else { document.getElementById("chest_img").innerHTML = urlImage(chest_name, chest_img); }   document.getElementById("chest_phy").innerHTML = arrChest[chest_lvl][0]; document.getElementById("chest_strike").innerHTML = arrChest[chest_lvl][1]; document.getElementById("chest_slash").innerHTML = arrChest[chest_lvl][2]; document.getElementById("chest_thrust").innerHTML = arrChest[chest_lvl][3]; document.getElementById("chest_mag").innerHTML = arrChest[chest_lvl][4]; document.getElementById("chest_fire").innerHTML = arrChest[chest_lvl][5]; document.getElementById("chest_ltn").innerHTML = arrChest[chest_lvl][6]; document.getElementById("chest_bleed").innerHTML = arrChest[chest_lvl][7]; document.getElementById("chest_poison").innerHTML = arrChest[chest_lvl][8]; document.getElementById("chest_curse").innerHTML = arrChest[chest_lvl][9]; document.getElementById("chest_poise").innerHTML = arrChest[0][10]; document.getElementById("chest_weight").innerHTML = arrChest[0][11]; }

//Display hands armor stats + image function showHandsArmorStats { if (hands_name === "Unequipped") { document.getElementById("hands_img").innerHTML = "Unequipped" } else { document.getElementById("hands_img").innerHTML = urlImage(hands_name, hands_img); } document.getElementById("hands_phy").innerHTML = arrHands[hands_lvl][0]; document.getElementById("hands_strike").innerHTML = arrHands[hands_lvl][1]; document.getElementById("hands_slash").innerHTML = arrHands[hands_lvl][2]; document.getElementById("hands_thrust").innerHTML = arrHands[hands_lvl][3]; document.getElementById("hands_mag").innerHTML = arrHands[hands_lvl][4]; document.getElementById("hands_fire").innerHTML = arrHands[hands_lvl][5]; document.getElementById("hands_ltn").innerHTML = arrHands[hands_lvl][6]; document.getElementById("hands_bleed").innerHTML = arrHands[hands_lvl][7]; document.getElementById("hands_poison").innerHTML = arrHands[hands_lvl][8]; document.getElementById("hands_curse").innerHTML = arrHands[hands_lvl][9]; document.getElementById("hands_poise").innerHTML = arrHands[0][10]; document.getElementById("hands_weight").innerHTML = arrHands[0][11]; }

//Display legs armor stats + image function showLegsArmorStats { if (legs_name === "Unequipped") { document.getElementById("legs_img").innerHTML = "Unequipped" } else { document.getElementById("legs_img").innerHTML = urlImage(legs_name, legs_img); } document.getElementById("legs_phy").innerHTML = arrLegs[legs_lvl][0]; document.getElementById("legs_strike").innerHTML = arrLegs[legs_lvl][1]; document.getElementById("legs_slash").innerHTML = arrLegs[legs_lvl][2]; document.getElementById("legs_thrust").innerHTML = arrLegs[legs_lvl][3]; document.getElementById("legs_mag").innerHTML = arrLegs[legs_lvl][4]; document.getElementById("legs_fire").innerHTML = arrLegs[legs_lvl][5]; document.getElementById("legs_ltn").innerHTML = arrLegs[legs_lvl][6]; document.getElementById("legs_bleed").innerHTML = arrLegs[legs_lvl][7]; document.getElementById("legs_poison").innerHTML = arrLegs[legs_lvl][8]; document.getElementById("legs_curse").innerHTML = arrLegs[legs_lvl][9]; document.getElementById("legs_poise").innerHTML = arrLegs[0][10]; document.getElementById("legs_weight").innerHTML = arrLegs[0][11]; }

//Display total stats function showTotalArmorStats { document.getElementById("total_phy").innerHTML = arrTotal[0]; document.getElementById("total_strike").innerHTML = arrTotal[1]; document.getElementById("total_slash").innerHTML = arrTotal[2]; document.getElementById("total_thrust").innerHTML = arrTotal[3]; document.getElementById("total_mag").innerHTML = arrTotal[4]; document.getElementById("total_fire").innerHTML = arrTotal[5]; document.getElementById("total_ltn").innerHTML = arrTotal[6]; document.getElementById("total_bleed").innerHTML = arrTotal[7]; document.getElementById("total_poison").innerHTML = arrTotal[8]; document.getElementById("total_curse").innerHTML = arrTotal[9]; document.getElementById("total_poise").innerHTML = arrTotal[10]; document.getElementById("total_weight").innerHTML = arrTotal[11]; }

function buttonClicked { showHeadArmorStats; showChestArmorStats; showHandsArmorStats; showLegsArmorStats; showTotalArmorStats; }