Validator: Allow Hidden Ability Entei/Raikou/Suicune in Gen 8 natively (#7563)

This commit is contained in:
Leonard Craft III
2020-10-23 06:28:12 -05:00
committed by GitHub
parent dfd69727a2
commit 4e6ff7e72c
2 changed files with 18 additions and 1 deletions

View File

@@ -514,7 +514,7 @@ export class TeamValidator {
if (unreleasedHidden && ruleTable.has('-unreleased')) {
problems.push(`${name}'s Hidden Ability is unreleased.`);
} else if (['entei', 'suicune', 'raikou'].includes(species.id) && this.minSourceGen > 1) {
} else if (dex.gen === 7 && ['entei', 'suicune', 'raikou'].includes(species.id) && this.minSourceGen > 1) {
problems.push(`${name}'s Hidden Ability is only available from Virtual Console, which is not allowed in this format.`);
} else if (dex.gen === 6 && ability.name === 'Symbiosis' &&
(set.species.endsWith('Orange') || set.species.endsWith('White'))) {

View File

@@ -579,6 +579,23 @@ describe('Team Validator', function () {
assert(illegal);
});
it('should allow use of a Hidden Ability if the format has the item Ability Patch', function () {
let team = [
{species: 'heatran', ability: 'flamebody', moves: ['sleeptalk'], evs: {hp: 1}},
{species: 'entei', ability: 'innerfocus', moves: ['sleeptalk'], evs: {hp: 1}},
{species: 'dracovish', ability: 'sandrush', moves: ['sleeptalk'], evs: {hp: 1}},
{species: 'zapdos', ability: 'static', moves: ['sleeptalk'], evs: {hp: 1}},
];
let illegal = TeamValidator.get('gen8vgc2021').validateTeam(team);
assert.equal(illegal, null);
team = [
{species: 'heatran', ability: 'flamebody', moves: ['sleeptalk'], evs: {hp: 1}},
];
illegal = TeamValidator.get('gen7anythinggoes').validateTeam(team);
assert(illegal);
});
/*********************************************************
* Custom rules