This commit is contained in:
En Passant 2026-03-19 16:43:19 -05:00 committed by GitHub
commit 9dead64d17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -665,8 +665,6 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
const specificItems = [['header', "Pok\u00e9mon-specific items"]];
const poorItems = [['header', "Usually useless items"]];
const badItems = [['header', "Useless items"]];
const unreleasedItems = [];
if (genNum === 6) unreleasedItems.push(['header', "Unreleased"]);
for (const id of itemList) {
const item = Dex.mod(gen).items.get(id);
if (item.gen > genNum) {
@ -689,221 +687,28 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
const banlist = Dex.formats.getRuleTable(Dex.formats.get(gen + 'metronomebattle'));
if (banlist.isBanned('item:' + item.id)) continue;
}
switch (id) {
// mainstays
case 'choiceband':
case 'choicespecs':
case 'eviolite':
switch (item.rating) {
case 3:
greatItems.push(id);
break;
// great everywhere but metronome
case 'leftovers':
case 'lifeorb':
case 'choicescarf':
case 'assaultvest':
case 'focussash':
case 'powerherb':
case 'rockyhelmet':
if (!isMetBattle) greatItems.push(id);
else goodItems.push(id);
case 2:
goodItems.push(id);
break;
// just singles
case 'airballoon':
case 'loadeddice':
case 'heavydutyboots':
case 'expertbelt':
case 'salacberry':
if (isDoubles || isMetBattle) goodItems.push(id);
else greatItems.push(id);
case 1:
poorItems.push(id);
break;
// just doubles
case 'safetygoggles':
case 'ejectbutton':
case 'ejectpack':
if (isDoubles) greatItems.push(id);
else goodItems.push(id);
break;
// doubles + metronome
case 'covertcloak':
case 'clearamulet':
case 'weaknesspolicy':
if (isDoubles || isMetBattle) greatItems.push(id);
else goodItems.push(id);
break;
// metronome only
case 'mirrorherb':
if (isMetBattle) greatItems.push(id);
else goodItems.push(id);
break;
// generation specific
case 'mentalherb':
if (isMetBattle) goodItems.push(id);
else if (genNum > 4) greatItems.push(id);
else poorItems.push(id);
break;
case 'lumberry':
if (genNum === 2 || genNum > 6) goodItems.push(id);
else greatItems.push(id);
break;
case 'sitrusberry':
if (genNum > 3 && (genNum < 7 || isDoubles)) greatItems.push(id);
else if (genNum > 6) goodItems.push(id);
else poorItems.push(id);
break;
case 'aguavberry':
case 'figyberry':
case 'iapapaberry':
case 'magoberry':
case 'wikiberry':
if (genNum === 7) greatItems.push(id);
else if (genNum >= 8) goodItems.push(id);
else poorItems.push(id);
break;
case 'berryjuice':
if (genNum === 2) poorItems.push(id);
else goodItems.push(id);
break;
case 'dragonfang':
if (genNum === 2) badItems.push(id);
else goodItems.push(id);
break;
case 'dragonscale':
if (genNum === 2) goodItems.push(id);
else badItems.push(id);
break;
case 'mail':
if (genNum >= 6) unreleasedItems.push(id);
else goodItems.push(id);
break;
// Legendaries
case 'adamantorb':
case 'griseousorb':
case 'lustrousorb':
case 'blueorb':
case 'redorb':
case 'souldew':
// falls through
// Other
case 'leek':
case 'stick':
case 'thickclub':
case 'lightball':
case 'luckypunch':
case 'quickpowder':
case 'metalpowder':
case 'deepseascale':
case 'deepseatooth':
specificItems.push(id);
break;
// Fling-only
case 'rarebone':
case 'belueberry':
case 'blukberry':
case 'cornnberry':
case 'durinberry':
case 'hondewberry':
case 'magostberry':
case 'nanabberry':
case 'nomelberry':
case 'pamtreberry':
case 'pinapberry':
case 'pomegberry':
case 'qualotberry':
case 'rabutaberry':
case 'razzberry':
case 'spelonberry':
case 'tamatoberry':
case 'watmelberry':
case 'wepearberry':
case 'energypowder':
case 'electirizer':
case 'oldamber':
case 'dawnstone':
case 'dubiousdisc':
case 'duskstone':
case 'firestone':
case 'icestone':
case 'leafstone':
case 'magmarizer':
case 'moonstone':
case 'ovalstone':
case 'prismscale':
case 'protector':
case 'reapercloth':
case 'sachet':
case 'shinystone':
case 'sunstone':
case 'thunderstone':
case 'upgrade':
case 'waterstone':
case 'whippeddream':
case 'bottlecap':
case 'goldbottlecap':
case 'galaricacuff':
case 'chippedpot':
case 'crackedpot':
case 'galaricawreath':
case 'auspiciousarmor':
case 'maliciousarmor':
case 'masterpieceteacup':
case 'metalalloy':
case 'unremarkableteacup':
case 'bignugget':
case 0:
badItems.push(id);
break;
// outclassed items
case 'aspearberry':
case 'bindingband':
case 'cheriberry':
case 'destinyknot':
case 'enigmaberry':
case 'floatstone':
case 'ironball':
case 'jabocaberry':
case 'oranberry':
case 'machobrace':
case 'pechaberry':
case 'persimberry':
case 'poweranklet':
case 'powerband':
case 'powerbelt':
case 'powerbracer':
case 'powerlens':
case 'powerweight':
case 'rawstberry':
case 'ringtarget':
case 'rowapberry':
case 'bigroot':
case 'focusband':
// gen 2
case 'psncureberry':
case 'przcureberry':
case 'burntberry':
case 'bitterberry':
case 'iceberry':
case 'berry':
poorItems.push(id);
case -1: // Ability to hardcode user-specific items just in case an OM or something needs it
specificItems.push(id);
break;
default:
if (
item.name.endsWith(" Ball") || item.name.endsWith(" Fossil") || item.name.startsWith("Fossilized ") ||
item.name.endsWith(" Sweet") || item.name.endsWith(" Apple")
item.name.startsWith("TR") || item.name.endsWith(" Ball") || item.name.endsWith(" Fossil") ||
item.name.startsWith("Fossilized ") || item.name.endsWith(" Sweet") || item.name.endsWith(" Apple")
) {
badItems.push(id);
} else if (item.name.startsWith("TR")) {
badItems.push(id);
} else if (item.name.endsWith(" Gem") && item.name !== "Normal Gem") {
if (genNum >= 6) {
unreleasedItems.push(id);
} else {
goodItems.push(id);
}
} else if (item.name.endsWith(" Drive")) {
specificItems.push(id);
} else if (item.name.endsWith(" Memory")) {
specificItems.push(id);
} else if (item.name.startsWith("Rusted")) {
specificItems.push(id);
} else if (item.itemUser) {
specificItems.push(id);
} else if (item.megaStone) {
@ -918,7 +723,6 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
items.push(...specificItems);
items.push(...poorItems);
items.push(...badItems);
items.push(...unreleasedItems);
}
//
@ -1223,7 +1027,7 @@ process.stdout.write("Building `data/teambuilder-tables.js`... ");
'accuracy', 'basePower', 'category', 'desc', 'flags', 'isNonstandard', 'pp', 'priority', 'shortDesc', 'target', 'type',
];
const overrideAbilityKeys = ['desc', 'flags', 'isNonstandard', 'rating', 'shortDesc'];
const overrideItemKeys = ['desc', 'fling', 'isNonstandard', 'naturalGift', 'shortDesc'];
const overrideItemKeys = ['desc', 'fling', 'isNonstandard', 'naturalGift', 'rating', 'shortDesc'];
//
// Past gen table