Skip to content

Don't include "Ability: No Ability" in team exports#2683

Open
mnn31 wants to merge 1 commit into
smogon:masterfrom
mnn31:fix-export-no-ability
Open

Don't include "Ability: No Ability" in team exports#2683
mnn31 wants to merge 1 commit into
smogon:masterfrom
mnn31:fix-export-no-ability

Conversation

@mnn31

@mnn31 mnn31 commented May 21, 2026

Copy link
Copy Markdown
Contributor

fixes #2216 (reported by @davidstone).

the legacy client's team export in `js/storage.js` printed an `Ability: ` line whenever the set had any ability string, including the literal `"No Ability"` placeholder used for Gen 1/2 Pokemon. result was every past-gen team export had a useless `Ability: No Ability` line on every set.

the newer Preact-side `exportSet` in `src/battle-teams.ts:316` already has this guard:
```ts
} else if (set.ability && set.ability !== 'No Ability') {
text += `Ability: ${set.ability}\n`;
}
```

this just brings the legacy path in line — same condition, single line change.

re: #2215 in the same area — leaving that one alone since @Zarel commented there that he's tracking it for the Preact client rewrite (needs separate handling of "default vs intentionally maxed" EVs), so it'd be stepping on that work.

test plan

  • `npm run lint` — clean
  • `npx tsc` — clean
  • `node build` — clean

The legacy client's team export in storage.js printed an `Ability: <ability>`
line whenever the set had an ability string, including the literal "No Ability"
placeholder used for Gen 1/2 Pokemon. The newer Preact-side exportSet in
battle-teams.ts already filters this out; this brings the legacy path in line.

Fixes smogon#2216.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exporting old generation teams should not include ability

1 participant