ADV: Add Speed Pass Clause (#11424)
Some checks are pending
Node.js CI / build (18.x) (push) Waiting to run

* ADV: Ban the combination of Baton Pass and Speed-boosting

https://www.smogon.com/forums/threads/speedpass-in-adv-ou.3769223/page-3#post-10692421

* Satisfy linter

* guh

* Create Speed Pass Clause

* do it to ou

* Apply suggestions from code review

* Update test

* ugh

* ughhhhhhh

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
This commit is contained in:
shrianshChari 2025-09-02 20:59:44 -07:00 committed by GitHub
parent af1833b74a
commit de10d91321
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 33 additions and 2 deletions

View File

@ -3717,7 +3717,7 @@ export const Formats: import('../sim/dex-formats').FormatList = [
{
name: "[Gen 3] OU",
mod: 'gen3',
ruleset: ['Standard', 'One Boost Passer Clause', 'Accuracy Trap Clause', 'Freeze Clause Mod'],
ruleset: ['Standard', 'One Boost Passer Clause', 'Accuracy Trap Clause', 'Freeze Clause Mod', 'Speed Pass Clause'],
banlist: ['Uber', 'Smeargle + Ingrain', 'Sand Veil', 'Soundproof', 'Assist', 'Baton Pass + Block', 'Baton Pass + Mean Look', 'Baton Pass + Spider Web', 'Swagger'],
},
{

View File

@ -1229,6 +1229,37 @@ export const Rulesets: import('../sim/dex-formats').FormatDataTable = {
}
},
},
speedpassclause: {
effectType: 'ValidatorRule',
name: 'Speed Pass Clause',
desc: "Stops teams from having a Pok&eacute;mon with Baton Pass that can boost its Speed",
onBegin() {
this.add('rule', 'Baton Pass Stat Clause: No Baton Passer may have a way to boost its Speed');
},
onValidateTeam(team) {
const boostingEffects = [
'agility', 'dragondance', 'ancientpower', 'silverwind', 'salacberry', 'speedboost', 'starfberry',
];
for (const set of team) {
const moves = set.moves.map(this.toID);
if (!moves.includes('batonpass' as ID)) continue;
let passableBoosts = false;
const item = this.toID(set.item);
const ability = this.toID(set.ability);
if (
moves.some(m => boostingEffects.includes(m)) || boostingEffects.includes(item) ||
boostingEffects.includes(ability)
) {
passableBoosts = true;
}
if (passableBoosts) {
return [
`${set.name || set.species} has Baton Pass and a way to boost its Speed, which is banned by Speed Pass Clause.`,
];
}
}
},
},
batonpasstrapclause: {
effectType: 'ValidatorRule',
name: 'Baton Pass Trap Clause',

View File

@ -12,7 +12,7 @@ describe('Team Validator', () => {
team = [
{ species: 'shedinja', ability: 'wonderguard', moves: ['silverwind', 'batonpass'], evs: { hp: 1 } },
];
assert.legalTeam(team, 'gen3ou');
assert.legalTeam(team, 'gen31v1');
team = [
{ species: 'shedinja', ability: 'wonderguard', moves: ['silverwind', 'swordsdance', 'batonpass'], evs: { hp: 1 } },