Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ogerpon and Terapagos can't transform #10820

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions sim/pokemon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1222,8 +1222,9 @@ export class Pokemon {
const species = pokemon.species;
if (pokemon.fainted || this.illusion || pokemon.illusion || (pokemon.volatiles['substitute'] && this.battle.gen >= 5) ||
(pokemon.transformed && this.battle.gen >= 2) || (this.transformed && this.battle.gen >= 5) ||
species.name === 'Eternatus-Eternamax' || (['Ogerpon', 'Terapagos'].includes(species.baseSpecies) &&
(this.terastallized || pokemon.terastallized)) || this.terastallized === 'Stellar') {
species.name === 'Eternatus-Eternamax' || ['Ogerpon', 'Terapagos'].includes(this.species.baseSpecies) ||
(['Ogerpon', 'Terapagos'].includes(species.baseSpecies) && (this.terastallized || pokemon.terastallized)) ||
this.terastallized === 'Stellar') {
return false;
}

Expand Down
14 changes: 1 addition & 13 deletions test/sim/abilities/terashell.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,6 @@ describe('Tera Shell', function () {
});

it(`should not work if the user's species is not currently Terapagos-Terastal`, function () {
battle = common.createBattle([[
{species: 'Terapagos', ability: 'terashift', moves: ['transform']},
], [
{species: 'Umbreon', ability: 'terashell', moves: ['flowertrick']},
]]);

battle.makeChoices();
const terapagos = battle.p1.active[0];
let damage = terapagos.maxhp - terapagos.hp;
assert.bounded(damage, [51, 60], `Tera Shell should not have activated because current species is not Terapagos`);


battle = common.createBattle([[
{species: 'Espeon', moves: ['transform']},
], [
Expand All @@ -84,7 +72,7 @@ describe('Tera Shell', function () {

battle.makeChoices();
const espeon = battle.p1.active[0];
damage = espeon.maxhp - espeon.hp;
const damage = espeon.maxhp - espeon.hp;
assert.bounded(damage, [33, 39], `Tera Shell should have activated because current species is Terapagos`);
});

Expand Down
12 changes: 3 additions & 9 deletions test/sim/misc/terapagos.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,13 @@ describe(`Terapagos`, function () {
assert.false(!!ditto.terastallized);
});

it(`[Hackmons] should not cause Terapagos-Terastal to become Terapagos-Stellar if the user is Transformed`, function () {
it(`[Hackmons] can't use Transform`, function () {
battle = common.createBattle([[
{species: 'terapagos', ability: 'terashift', moves: ['transform'], teraType: 'Stellar'},
{species: 'pikachu', moves: ['sleeptalk']},
{species: 'terapagos', ability: 'terashift', moves: ['transform']},
], [
{species: 'silicobra', moves: ['sleeptalk']},
]]);

battle.makeChoices();
battle.makeChoices('move sleeptalk terastallize', 'auto');
battle.makeChoices('switch 2', 'auto');
battle.makeChoices('switch 2', 'auto');
const terapagos = battle.p1.active[0];
assert.species(terapagos, 'Terapagos-Terastal');
assert.species(battle.p1.active[0], 'Terapagos-Terastal');
});
});
Loading