Implement Pomeg Glitch Clause (#11800)

This commit is contained in:
André Bastos Dias 2026-03-17 23:37:23 +00:00 committed by GitHub
parent 307b84fe4c
commit e7b13b7df3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 27 additions and 13 deletions

View File

@ -4683,7 +4683,7 @@ export const Formats: import('../sim/dex-formats').FormatList = [
name: "[Gen 6] LC",
mod: 'gen6',
searchShow: false,
ruleset: ['Standard', 'Little Cup'],
ruleset: ['Standard', 'Little Cup', 'Pomeg Glitch Clause'],
banlist: [
'Drifloon', 'Gligar', 'Meditite', 'Misdreavus', 'Murkrow', 'Scyther', 'Sneasel', 'Swirlix', 'Tangela', 'Yanma',
'Baton Pass', 'Dragon Rage', 'Sonic Boom', 'Swagger',
@ -4885,7 +4885,7 @@ export const Formats: import('../sim/dex-formats').FormatList = [
name: "[Gen 5] LC",
mod: 'gen5',
searchShow: false,
ruleset: ['Standard', 'Little Cup', 'Sleep Moves Clause'],
ruleset: ['Standard', 'Little Cup', 'Pomeg Glitch Clause', 'Sleep Moves Clause'],
banlist: [
'Gligar', 'Meditite', 'Misdreavus', 'Murkrow', 'Scraggy', 'Scyther', 'Sneasel', 'Tangela', 'Vulpix', 'Yanma',
'Sand Rush', 'Sand Veil', 'Berry Juice', 'Soul Dew', 'Baton Pass', 'Dragon Rage', 'Sonic Boom', 'Swagger',
@ -5040,7 +5040,7 @@ export const Formats: import('../sim/dex-formats').FormatList = [
name: "[Gen 4] LC",
mod: 'gen4',
searchShow: false,
ruleset: ['Standard', 'Little Cup', 'Evasion Abilities Clause', 'Sleep Moves Clause'],
ruleset: ['Standard', 'Little Cup', 'Pomeg Glitch Clause', 'Evasion Abilities Clause', 'Sleep Moves Clause'],
banlist: [
'Meditite', 'Misdreavus', 'Murkrow', 'Scyther', 'Sneasel', 'Tangela', 'Yanma',
'Berry Juice', 'Deep Sea Tooth', 'Dragon Rage', 'Sonic Boom', 'Swagger',
@ -5187,7 +5187,7 @@ export const Formats: import('../sim/dex-formats').FormatList = [
name: "[Gen 3] Ubers",
mod: 'gen3',
searchShow: false,
ruleset: ['Standard', 'Deoxys Camouflage Clause', 'One Baton Pass Clause'],
ruleset: ['Standard', 'Deoxys Camouflage Clause Mod', 'One Baton Pass Clause'],
banlist: ['Wobbuffet + Leftovers', 'Wynaut + Leftovers', 'Baton Pass'],
},
{
@ -5222,7 +5222,7 @@ export const Formats: import('../sim/dex-formats').FormatList = [
name: "[Gen 3] LC",
mod: 'gen3',
searchShow: false,
ruleset: ['Standard', 'Little Cup', 'Sleep Moves Clause', 'Accuracy Moves Clause'],
ruleset: ['Standard', 'Little Cup', 'Pomeg Glitch Clause', 'Sleep Moves Clause', 'Accuracy Moves Clause'],
banlist: ['Chansey', 'Diglett', 'Meditite', 'Omanyte', 'Porygon', 'Scyther', 'Wynaut', 'Zigzagoon', 'Deep Sea Tooth', 'Baton Pass', 'Dragon Rage', 'Sonic Boom', 'Swagger', 'Thunder Wave'],
},
{

View File

@ -1439,13 +1439,13 @@ export const Rulesets: import('../sim/dex-formats').FormatDataTable = {
// Hardcoded in gen1/moves.ts
// Can't be disabled (no precedent for how else to handle desyncs)
},
deoxyscamouflageclause: {
deoxyscamouflageclausemod: {
effectType: 'Rule',
name: 'Deoxys Camouflage Clause',
name: 'Deoxys Camouflage Clause Mod',
desc: "Reveals the Deoxys forme when it is sent in battle.",
// Hardcoded into effect, cannot be disabled.
onBegin() {
this.add('rule', 'Deoxys Camouflage Clause: Reveals the Deoxys forme when it is sent in battle.');
this.add('rule', 'Deoxys Camouflage Clause Mod: Reveals the Deoxys forme when it is sent in battle.');
},
},
freezeclausemod: {
@ -1839,11 +1839,23 @@ export const Rulesets: import('../sim/dex-formats').FormatDataTable = {
desc: "Allows Pokémon who learn Sketch to learn any Gen 8+ move (normally, Sketch is not usable in Gen 8 or Gen 9 Pre-DLC2).",
// Implemented in sim/team-validator.ts
},
mimicglitch: {
mimicglitchclause: {
effectType: 'ValidatorRule',
name: 'Mimic Glitch',
name: 'Mimic Glitch Clause',
desc: "Allows any Pokemon with access to Assist, Copycat, Metronome, Mimic, or Transform to gain access to almost any other move.",
// Implemented in sim/team-validator.ts
onBegin() {
this.add('rule', 'Mimic Glitch Clause: Pokemon that learn Assist, Copycat, Metronome, Mimic, or Transform can have any move.');
},
},
pomegglitchclause: {
effectType: 'ValidatorRule',
name: 'Pomeg Glitch Clause',
desc: "Allows any Pokémon from Generation 3 at level 5 or higher to have any of its level-up moves. This implementation is allowed only to enable an otherwise legal Pokémon to obtain moves it would not normally have access to at an earlier level.",
// Implemented in sim/team-validator.ts
onBegin() {
this.add('rule', 'Pomeg Glitch Clause: Gen 3 Pokémon at level 5+ can have any of their level-up moves.');
},
},
overflowstatmod: {
effectType: 'Rule',

View File

@ -2652,7 +2652,7 @@ export class TeamValidator {
// we're past the required level to learn it
// (gen 7 level-up moves can be relearnered at any level)
// falls through to LMT check below
} else if (level >= 5 && learnedGen === 3 && species.canHatch) {
} else if (this.ruleTable.has('pomegglitchclause') && level >= 5 && learnedGen === 3 && species.canHatch) {
// Pomeg Glitch
learned = `${learnedGen}Epomeg` as MoveSource;
} else if (species.gender !== 'N' &&
@ -2770,7 +2770,7 @@ export class TeamValidator {
return null;
}
}
if (ruleTable.has('mimicglitch') && species.gen < 5) {
if (ruleTable.has('mimicglitchclause') && species.gen < 5) {
// include the Mimic Glitch when checking this mon's learnset
const glitchMoves = ['metronome', 'copycat', 'transform', 'mimic', 'assist'];
let getGlitch = false;

View File

@ -192,6 +192,7 @@ describe('Team Validator', () => {
it("should allow previously illegal level up egg moves in Gen 7", () => {
team = [
{ species: 'smoochum', level: 5, ability: 'hydration', moves: ['powdersnow'], evs: { hp: 1 } },
{ species: 'staryu', level: 5, ability: 'illuminate', moves: ['hydropump'], evs: { hp: 1 } },
];
assert.legalTeam(team, 'gen7lc');
});
@ -200,7 +201,8 @@ describe('Team Validator', () => {
team = [
{ species: 'zigzagoon', level: 5, ability: 'pickup', moves: ['bellydrum', 'extremespeed'], evs: { hp: 1 } },
];
assert.legalTeam(team, 'gen3ou');
assert.false.legalTeam(team, 'gen3ou');
assert.legalTeam(team, 'gen3ou@@@pomegglitchclause');
});
it("should disallow illegal egg move combinations containing past gen universal moves", () => {