Skip to content

Commit

Permalink
Validator: Allow Hidden Ability Entei/Raikou/Suicune in Gen 8 natively (
Browse files Browse the repository at this point in the history
  • Loading branch information
DaWoblefet committed Oct 23, 2020
1 parent dfd6972 commit 4e6ff7e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sim/team-validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'))) {
Expand Down
17 changes: 17 additions & 0 deletions test/sim/team-validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4e6ff7e

Please sign in to comment.