wynnbuilder-idk/js/items_adv.js
hppeng-wynn 479af33a81
2.0.3 update (#260)
* Mage atree changes

* Bump version to 2.0.3.1

just tree for now

* Warrior tree

🙏

* Shaman tree

WIP some things are too jank to stay

* Fixes to bamboozle behavior

also echo was -60% instead of -65% in the file??? wtf

* Shurikens damage boost by echo

meme

* Fix description text in echo, update old version atree file

* Fix shaman tree

thanks spegg!

* Spegg atree changes

assassin tree
fixed many of my shaman mistakes
and other changes we missed over the months somehow?

* Updated archer ability tree

Thanks @mr_me! All credit to them.

* Fixes to spegg's fixes

implement beast lore

* Change how Chant of the Lunatic is calculated

coursing restraints ingame is 15% damage bonus

* Updated ingredients manually

thanks @watermelon (snownlite)!

* Forgor to bump ing db version

* Fix ingredient display jank

* 2.0.3 items (#259)

* API update

also add new IDs to a bunch of places... tech debt whyyy

* Forgot to update ingreds...

* Change heal power ID name to stack with tree abils, fix multi totem effect on totemic shatter

and req for mana traps

* Forgot to bump item db version

* Implement major IDs

not implemented: Gentle Glow, and Forest's Blessing damage increase (since I don't know the exact numbers)

and radiance boost is not implemented (radiance is currently handled way too jank)

might wait for buffs rework to handle radiance.

* patch item searcher

TODO: make this not disgusting... build_encode_decode file has gotten too big

---------

Co-authored-by: hppeng <hppeng>
Co-authored-by: RawFish69 <108964215+RawFish69@users.noreply.github.com>
2023-07-14 18:34:30 -07:00

59 lines
2 KiB
JavaScript

const getQueryIdentifiers = (function() {
let identCache = null;
return function() {
if (identCache === null) {
const idents = new Set();
for (const ident of Object.keys(itemQueryProps)) {
idents.add(ident);
}
for (const ident of Object.keys(queryFuncs)) {
idents.add(ident);
}
identCache = [...idents].sort(); // might use a trie optimally, but the set is probably small enough...
}
return identCache;
};
})();
function generateEntries(size, itemList, itemEntries) {
for (let i = 0; i < size; i++) {
const itemElem = document.createElement('div');
itemElem.classList.add('col-lg-3', 'col-sm-auto', "p-2");
// itemElem.setAttribute('id', `item-entry-${i}`);
itemList.append(itemElem);
itemEntries.push(itemElem);
const itemElemContained = document.createElement("div");
itemElemContained.classList.add("dark-7", "rounded", "px-2", "col-auto");
itemElemContained.setAttribute('id', `item-entry-${i}`);
itemElem.appendChild(itemElemContained);
const sortKeyListContainer = document.createElement('div');
sortKeyListContainer.classList.add('row');
sortKeyListContainer.setAttribute('id', `item-sort-entry-${i}`);
itemEntries[i].append(sortKeyListContainer);
}
}
function init_values() {
// compile the search db from the item db
searchDb = items.filter(i => !i.remapID).map(i => [i, expandItem(i)]);
// create the expression parser
exprParser = new ExprParser(itemQueryProps, queryFuncs);
}
function display(itemExp, id) {
itemExp.set("powders", []);
if (itemExp.get("category") == "weapon") {
apply_weapon_powders(itemExp);
}
displayExpandedItem(itemExp, id);
}
(async function() {
await Promise.resolve(load_init(), load_major_id_data(wynn_version_names[WYNN_VERSION_LATEST]));
init_items_adv();
})();