Exclude certain formats from automatically lowering to 0 attack IVs (#2595)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled

* Exclude certain formats from automatically lowering to 0 attack IVs

* shows much i know about js lol

* >_>
This commit is contained in:
HiZo 2026-03-01 16:45:18 -05:00 committed by GitHub
parent 4e82e2d6b6
commit 0608b72baf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -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;

View File

@ -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)) {