From 0608b72baf03b39d70ea335878eb8dde3ec36c5c Mon Sep 17 00:00:00 2001 From: HiZo <96159984+HisuianZoroark@users.noreply.github.com> Date: Sun, 1 Mar 2026 16:45:18 -0500 Subject: [PATCH] Exclude certain formats from automatically lowering to 0 attack IVs (#2595) * Exclude certain formats from automatically lowering to 0 attack IVs * shows much i know about js lol * >_> --- play.pokemonshowdown.com/js/client-teambuilder.js | 2 ++ play.pokemonshowdown.com/src/battle-team-editor.tsx | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/play.pokemonshowdown.com/js/client-teambuilder.js b/play.pokemonshowdown.com/js/client-teambuilder.js index 7317cb511..ca43faa49 100644 --- a/play.pokemonshowdown.com/js/client-teambuilder.js +++ b/play.pokemonshowdown.com/js/client-teambuilder.js @@ -3463,6 +3463,8 @@ // only available through an event with 31 Spe IVs if (set.species.startsWith('Terapagos')) minSpe = false; + if (this.curTeam.format.includes('1v1') || this.curTeam.format.includes('categoryswap') || + this.curTeam.format.includes('partnersincrime') || this.curTeam.format.includes('typesplit')) return; if (this.curTeam.format === 'gen7hiddentype') return; var minAtk = true; diff --git a/play.pokemonshowdown.com/src/battle-team-editor.tsx b/play.pokemonshowdown.com/src/battle-team-editor.tsx index f26b9907f..a2af70e98 100644 --- a/play.pokemonshowdown.com/src/battle-team-editor.tsx +++ b/play.pokemonshowdown.com/src/battle-team-editor.tsx @@ -578,8 +578,12 @@ export class TeamEditorState extends PSModel { // only available through an event with 31 Spe IVs if (set.species.startsWith('Terapagos')) minSpe = false; + const preferMaxAtkFormats = ['1v1', 'categoryswap', 'partnersincrime', 'typesplit']; + if (preferMaxAtkFormats.some(f => this.format.includes(f))) { + minAtk = false; + return { minAtk, minSpe }; + } if (this.format === 'gen7hiddentype') return { minAtk, minSpe }; - if (this.format.includes('1v1')) return { minAtk, minSpe }; // only available through an event with 31 Atk IVs if (set.ability === 'Battle Bond' || ['Koraidon', 'Miraidon', 'Gimmighoul-Roaming'].includes(set.species)) {