wynnbuilder-forked-for-changes/js/builder/builder_constants.js
hppeng-wynn 590aa2269d
update master (#258)
* Clean up logic for positive/negative rolls; fix customizer

logical xor moment

* ....why did I leave extra code in

embarassing bug how did you not catch this before pushing

anyway this should fix CI creator

* unicorn horn (#255)

* unicorn horn 

50% rn in game

* Update ingreds_clean.json

* Update ingreds_compress.json

* Bump ing db version

* Add parry buff, and lifesteal

lol offensive lifesteal
reinforcing the stereotype

* Bamboozle should be fire conversion

thanks felixtape also I thought I fixed this ages ago

* Update doc.html so it works

missing lifesteal elem

* Serve our own copies of bootstrap and autocomplete

random npm outage wtf

* Whoops... forgot to replace autocomplete.js, and macy

---------

Co-authored-by: hppeng <hppeng>
Co-authored-by: RawFish69 <108964215+RawFish69@users.noreply.github.com>
2023-07-09 23:07:05 -07:00

105 lines
2.8 KiB
JavaScript

/**
* 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",
"hprRaw", "hprPct", "hpBonus", "atkTier", "ls",
"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",
]
let equipment_inputs = equipment_fields.map(x => x + "-choice");
let build_fields = equipment_fields.map(x => x+"-tooltip");
let tomeInputs = tome_fields.map(x => x + "-choice");
let powder_inputs = [
"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'];
let equipment_keys = ['helmet', 'chestplate', 'leggings', 'boots', 'ring1', 'ring2', 'bracelet', 'necklace', 'weapon'];
let tome_keys = ['weaponTome1', 'weaponTome2', 'armorTome1', 'armorTome2', 'armorTome3', 'armorTome4', 'guildTome1'];
let spell_disp = ['build-melee-stats', 'spell0-info', 'spell1-info', 'spell2-info', 'spell3-info'];
let other_disp = ['build-order', 'set-info', 'int-info'];