2022-05-22 07:57:47 +00:00
|
|
|
/**
|
|
|
|
* I kinda lied. Theres some listener stuff in here
|
|
|
|
* but its mostly constants for builder page specifically.
|
|
|
|
*/
|
|
|
|
|
|
|
|
const url_tag = location.hash.slice(1);
|
|
|
|
|
|
|
|
const BUILD_VERSION = "7.0.19";
|
|
|
|
|
|
|
|
|
|
|
|
// THIS IS SUPER DANGEROUS, WE SHOULD NOT BE KEEPING THIS IN SO MANY PLACES
|
|
|
|
let editable_item_fields = [ "sdPct", "sdRaw", "mdPct", "mdRaw", "poison",
|
|
|
|
"fDamPct", "wDamPct", "aDamPct", "tDamPct", "eDamPct",
|
|
|
|
"fDefPct", "wDefPct", "aDefPct", "tDefPct", "eDefPct",
|
2023-07-10 06:07:05 +00:00
|
|
|
"hprRaw", "hprPct", "hpBonus", "atkTier", "ls",
|
2022-05-22 07:57:47 +00:00
|
|
|
"spPct1", "spRaw1", "spPct2", "spRaw2",
|
|
|
|
"spPct3", "spRaw3", "spPct4", "spRaw4" ];
|
|
|
|
|
|
|
|
let editable_elems = [];
|
|
|
|
|
|
|
|
for (let i of editable_item_fields) {
|
|
|
|
let elem = document.getElementById(i);
|
|
|
|
elem.addEventListener("change", (event) => {
|
|
|
|
elem.classList.add("highlight");
|
|
|
|
});
|
|
|
|
editable_elems.push(elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
for (let i of skp_order) {
|
|
|
|
let elem = document.getElementById(i+"-skp");
|
|
|
|
elem.addEventListener("change", (event) => {
|
|
|
|
elem.classList.add("highlight");
|
|
|
|
});
|
|
|
|
editable_elems.push(elem);
|
|
|
|
}
|
|
|
|
|
|
|
|
function clear_highlights() {
|
|
|
|
for (let i of editable_elems) {
|
|
|
|
i.classList.remove("highlight");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let equipment_fields = [
|
|
|
|
"helmet",
|
|
|
|
"chestplate",
|
|
|
|
"leggings",
|
|
|
|
"boots",
|
|
|
|
"ring1",
|
|
|
|
"ring2",
|
|
|
|
"bracelet",
|
|
|
|
"necklace",
|
|
|
|
"weapon"
|
|
|
|
];
|
|
|
|
let tome_fields = [
|
|
|
|
"weaponTome1",
|
|
|
|
"weaponTome2",
|
|
|
|
"armorTome1",
|
|
|
|
"armorTome2",
|
|
|
|
"armorTome3",
|
|
|
|
"armorTome4",
|
|
|
|
"guildTome1",
|
|
|
|
]
|
|
|
|
let equipment_names = [
|
|
|
|
"Helmet",
|
|
|
|
"Chestplate",
|
|
|
|
"Leggings",
|
|
|
|
"Boots",
|
|
|
|
"Ring 1",
|
|
|
|
"Ring 2",
|
|
|
|
"Bracelet",
|
|
|
|
"Necklace",
|
|
|
|
"Weapon"
|
|
|
|
];
|
|
|
|
|
|
|
|
let tome_names = [
|
|
|
|
"Weapon Tome",
|
|
|
|
"Weapon Tome",
|
|
|
|
"Armor Tome",
|
|
|
|
"Armor Tome",
|
|
|
|
"Armor Tome",
|
|
|
|
"Armor Tome",
|
|
|
|
"Guild Tome",
|
|
|
|
]
|
2022-06-20 17:51:17 +00:00
|
|
|
let equipment_inputs = equipment_fields.map(x => x + "-choice");
|
2022-06-19 20:44:02 +00:00
|
|
|
let build_fields = equipment_fields.map(x => x+"-tooltip");
|
2022-05-22 07:57:47 +00:00
|
|
|
let tomeInputs = tome_fields.map(x => x + "-choice");
|
|
|
|
|
2022-06-19 16:49:04 +00:00
|
|
|
let powder_inputs = [
|
2022-05-22 07:57:47 +00:00
|
|
|
"helmet-powder",
|
|
|
|
"chestplate-powder",
|
|
|
|
"leggings-powder",
|
|
|
|
"boots-powder",
|
|
|
|
"weapon-powder",
|
|
|
|
];
|
|
|
|
|
|
|
|
let weapon_keys = ['dagger', 'wand', 'bow', 'relik', 'spear'];
|
|
|
|
let armor_keys = ['helmet', 'chestplate', 'leggings', 'boots'];
|
|
|
|
let accessory_keys= ['ring1', 'ring2', 'bracelet', 'necklace'];
|
|
|
|
let powderable_keys = ['helmet', 'chestplate', 'leggings', 'boots', 'weapon'];
|
2022-06-19 20:44:02 +00:00
|
|
|
let equipment_keys = ['helmet', 'chestplate', 'leggings', 'boots', 'ring1', 'ring2', 'bracelet', 'necklace', 'weapon'];
|
2022-06-19 20:59:16 +00:00
|
|
|
let tome_keys = ['weaponTome1', 'weaponTome2', 'armorTome1', 'armorTome2', 'armorTome3', 'armorTome4', 'guildTome1'];
|
2022-05-22 07:57:47 +00:00
|
|
|
|
2022-06-23 09:51:51 +00:00
|
|
|
let spell_disp = ['build-melee-stats', 'spell0-info', 'spell1-info', 'spell2-info', 'spell3-info'];
|
2022-05-22 07:57:47 +00:00
|
|
|
let other_disp = ['build-order', 'set-info', 'int-info'];
|