Past gen pokemon/moves/items in the teambuilder now display past gen
stats and descriptions.
This in theory completely finishes up past gen support for the teambuilder.
- Gen 1-2 DVs are now shown properly as a 1-15 range.
- Gen 1-2 no longer display a total EV count.
- Fix an alignment issue with gen 1 calculated stats
This also adds a cached learnset format to teambuilder-tables.js,
which replaces and is slightly smaller than learnsets.js and also
has slightly better performance.
This is a large collection of changes that greatly improve past gen
support in the teambuilder.
- Tier lists are now compiled separately from each gen (build-indexes
is really slow about this, which isn't particularly surprising),
as well as for Doubles.
- Learnsets are now compiled separately from each gen. TODO: make an
optimized learnsets.js with gen 1-2 support for client.
- Types in the pokemon list now account for old gens.
- Abilities no longer display in the pokemon list in gen 1-2
- SpA/SpD are replaced by Spc in the pokemon list in gen 1
Also included: A small optimization to the number of DOM nodes for the
teambuilder display, which should improve performance.
The search.find() and search.all() functions have been merged.
search.find() now finds "all" results, not just the first 20. It's now
also much more thoroughly commented.
In addition to showing all results, this rewrite makes the following
changes:
- Search aliases! Acronyms can be used for anything (so typing in 'ao'
matches "Adamant Orb"), and subwords can be searched (so typing in
'berry' gives a list of all berries). Subwords and acronyms will
always appear below prefix matches.
Note: we have no plans to add back support for arbitrary substring
matching. It's ridiculously esoteric and the acronym support should
be enough.
- Instafilter! If you type enough characters to make it clear what you
want to filter by, the filtered results will appear without you
needing to press Enter or click the filter. This is useful because
filters are no longer at the top of the list and can be annoying to
click.
- Moves are now always above filters when searching moves. Legal moves
are now always above illegal moves.
- On-demand rendering-to-DOM has been tweaked to be faster and more
on-demand.
- Miscellaneous bugfixes to search results.
- Add pokemon list for CAP
- Add pokemon list for AG
- Add pokemon list for PU
- Make sure the move "Psychic" is above the type for move searches
- Fix bug in generating learnsets
- Fix move list for Smeargle
- Show tier instead of National dex number in pokemon charts
- Fix bug in pokemon field defocusing
If no exact match is found, the matcher is now guaranteed to display
an approximate match with the most shared starting letters with the
query.
In other words, 'assv' will now show 'Assault Vest' as the first
option.
In addition, we still search for other matches when there's an
alias match. So 'zard'->'charizard' can match 'Charizard-Mega-Y',
but 'ferro'->'ferrothorn' can still match 'Ferroseed'.
This code is getting kind of messy, but oh well.
- Aerial Ace is only considered non-useless if you have Technician
- DynamicPunch is now considered non-useless if you have No Guard
- Icy Wind is now considered non-useless on Keldeo
- Focus Punch is now considered non-useless on Breloom
- Counter is now non-useless if you have Chansey, Skarmory, Clefable,
or Wobbuffet
- Moves learned by prevos (mainly egg moves) are now properly shown
as legal
Now, if you click a selected move, it will deselect the move, and then
rearrange all the other moves up, so that the empty move slots will
always be on the bottom.
The teambuilder is now running on search.js! Not all new features I'd
like to be in are in, but we've now reached feature parity, and most
of the bugs I found during testing have been fixed.
New in search.js is on-demand DOM loading, which basically means
much faster performance because instead of trying to load every single
row of e.g. the pokemon list at once, we just load the part that's
visible, and load the rest only when you scroll it into view.
Also new in search.js is a dexsearch-like feature, replacing the old
details-search system. The new filter system is simpler and more powerful
and has the same API as /dexsearch, although not all the more advanced
dexsearch features are supported.
On-demand DOM loading makes teambuilder loading pretty much completely
instantaneous. There are other small differences in how selection of
pokemon/items/abilities/moves works, but it should overall make more
sense.
This is the main feature necessary to bring it up to parity with the
old teambuilder, and it's actually a bit beyond parity now, and is a
pretty nice feature right now.
The utilichart-relevant code has been overhauled for simplicity.
Utilichart results and headers are now both 33 pixels tall, total.
Headers are slightly larger, to make them fill the space better. The
larger font size makes them more header-like, anyway.
Results are two pixels taller than before, giving them enough room for
gen 6 pokemon icons (not enabled in this commit), and in general
aiding performance slightly (fewer result rows on the screen at a
time).
Making them both 33 pixels allows height to be computed precisely
as 33*rows, which is relevant for result rows to be inserted into
the DOM on-demand.
On-demand DOM insertion has previously been implemented in pokedex.js,
but the new on-demand DOM code in search.js works slightly differently.
It makes stronger assumptions (that the only bottleneck is DOM
insertion speed, and that ctrl+f without scrolling to the bottom
doesn't need to be supported, and that result rows and result
headers are always 33 pixels tall), which makes for much simpler
code, and is presumably slightly faster because of this.
The new on-demand DOM code is surfaced by an "All results" button
in the pokedex (pokemonshowdown.com/dex/), for basic testing, but
the long-term plan is for it to be used in the teambuilder for
pokemon/etc selection, to massively increase performance.
Nearly two years after I wrote search.js to be a better utilichart
API than utilichart.js, we'll soon finally start using it in place of
utilichart.js in the main sim teambuilder!
This introduces a new function to get an icon from an icon sheet
for gen 6 icons. The old gen 5 style icons are still available
in Tools.getIcon, allowing us to slowly convert icon styles over
at our leisure, without needing to convert everything at once.
This commit only introduces the function; it's not used anywhere
yet.
The Hide button now hides the side panel until the next time you
open a room. The main use case is just so you can see more of your
(presumably lovely) main menu background, without having to leave
all the rooms you're in.
In addition to format folders, we now support regular folders that
behave as you'd expect. These folders even map to actual
directories in the downloadable client!
Folders are delimited by `/` in team names in all storage formats
(including export, and packed saving), and are stored in the
`.folder` field of team objects.
Because of this, `/` is no longer an acceptable character in team
names. This improves interoperability with teams and filesystems,
so we should probably have done this anyway.
I also added back a friendly message to the top of the teambuilder.
- 'uncategorized' was sometimes in the wrong place
- Firefox Windows button alignment
- crash when creating new format folder
- gen 2 and gen 3 were mixed up
Normally, when navigating away from an empty format folder, it'll
disappear from the folder list. This keeps the folder visible if you
just opened it from a team selector or the 'New format folder'
button, so you can drag teams from other folders to that folder.
This was ridiculous, or, in other words, par for the course when
you're dealing with HTML5 drag-and-drop.
Folders are now clickable divs instead of buttons. This turned out
not to be necessary as it was a different issue that was causing
drag-and-drop to fail, but I'd already changed everything over when
I discovered the real bug. Oh well, some things are slightly nicer
this way.
You can now add formats to the teambuilder folderbar and select
teambuilder formats using the same Formats dropdown previously
used for challenges and searches.
It is no longer to move a team back to Uncategorized. A future
update will fix this.