mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-03-21 17:50:29 -05:00
Exclude certain formats from automatically lowering to 0 attack IVs (#2595)
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
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:
parent
4e82e2d6b6
commit
0608b72baf
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user