mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Teambuilder: Deprioritize Illegal Pokemon (#2606)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
This commit is contained in:
parent
fff081a1de
commit
3b0707924d
|
|
@ -435,6 +435,13 @@ export class DexSearch {
|
|||
bufs[0] = [['header', DexSearch.typeName[type]]];
|
||||
}
|
||||
if (!(id in illegal)) typeIndex = 0;
|
||||
// Move illegal pokemon to the bottom of the results
|
||||
if (id in illegal && searchTypeIndex === 1) {
|
||||
typeIndex = 8;
|
||||
if (!bufs[typeIndex].length) {
|
||||
bufs[typeIndex] = [['header', "Illegal Pok\u00e9mon"]];
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!bufs[typeIndex].length) {
|
||||
bufs[typeIndex] = [['header', DexSearch.typeName[type]]];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user