mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-03-21 17:25:10 -05:00
Add Full Arceus Clause (#11725)
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
Some checks failed
Node.js CI / build (18.x) (push) Has been cancelled
* Enable Arceus EV Limit Mod * English * Add comment with implementation location * Add Full Arceus Clause * Add event for clause * Move comment * Lint * Simplify assignments * Revert Melmetal changes * Revert "Revert Melmetal changes" This reverts commit8c4a04e67c. * Reapply "Revert Melmetal changes" This reverts commit7553972011. * Add explanation comment * Remove test * Comment
This commit is contained in:
parent
b9caaaa927
commit
737a8095ac
|
|
@ -1606,6 +1606,12 @@ export const Rulesets: import('../sim/dex-formats').FormatDataTable = {
|
|||
this.add('rule', 'Terastal Clause: You cannot Terastallize');
|
||||
},
|
||||
},
|
||||
fullarceusclause: {
|
||||
effectType: 'ValidatorRule',
|
||||
name: 'Full Arceus Clause',
|
||||
desc: "Allows Level 80 Arceus from Hall of Origin",
|
||||
// Implemented in sim/team-validator.ts
|
||||
},
|
||||
inversemod: {
|
||||
effectType: 'Rule',
|
||||
name: 'Inverse Mod',
|
||||
|
|
|
|||
|
|
@ -650,6 +650,7 @@ export class TeamValidator {
|
|||
}
|
||||
}
|
||||
if (species.id === 'melmetal' && set.gigantamax && this.dex.species.getLearnsetData(species.id).eventData) {
|
||||
// Gigantamax Melmetal cannot be obtained through the Max Soup
|
||||
setSources.sourcesBefore = 0;
|
||||
setSources.sources = ['8S0 melmetal'];
|
||||
}
|
||||
|
|
@ -955,7 +956,12 @@ export class TeamValidator {
|
|||
}
|
||||
}
|
||||
} else if (ruleTable.has('obtainablemisc') && (eventOnlyData = this.getEventOnlyData(outOfBattleSpecies))) {
|
||||
const { species: eventSpecies, eventData } = eventOnlyData;
|
||||
const eventSpecies = eventOnlyData.species;
|
||||
let eventData = eventOnlyData.eventData;
|
||||
if (ruleTable.has('fullarceusclause') && eventSpecies.baseSpecies === 'Arceus') {
|
||||
// Hall of Origin Arceus
|
||||
eventData = [...eventData, { generation: 4, level: 80, moves: ['refresh', 'futuresight', 'recover', 'hyperbeam'] }];
|
||||
}
|
||||
let legal = false;
|
||||
for (const event of eventData) {
|
||||
if (this.validateEvent(set, setSources, event, eventSpecies)) continue;
|
||||
|
|
|
|||
|
|
@ -181,4 +181,18 @@ describe('Team Validator', () => {
|
|||
];
|
||||
assert.legalTeam(team, 'gen4anythinggoes');
|
||||
});
|
||||
|
||||
it(`should allow Hall of Origin Arceus with Full Arceus Clause`, () => {
|
||||
let team = [
|
||||
{ species: 'arceus', level: 80, ability: 'multitype', moves: ['judgment'], evs: { hp: 1 } },
|
||||
];
|
||||
assert.false.legalTeam(team, 'gen4anythinggoes');
|
||||
assert.false.legalTeam(team, 'gen4anythinggoes@@@fullarceusclause');
|
||||
|
||||
team = [
|
||||
{ species: 'arceus', level: 100, ability: 'multitype', moves: ['judgment'], evs: { hp: 1 } },
|
||||
];
|
||||
assert.false.legalTeam(team, 'gen4anythinggoes');
|
||||
assert.legalTeam(team, 'gen4anythinggoes@@@fullarceusclause');
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user