mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 06:53:27 +02:00
[Hotfix] Fix tyrogue evo (#6414)
* Fixed tyrogue evo condition * Added test for tyrogue evolution * Update src/data/balance/pokemon-evolutions.ts Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com> * Update src/data/balance/pokemon-evolutions.ts Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com> * Update src/data/balance/pokemon-evolutions.ts Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com> * Added missing typeof in suggestion --------- Co-authored-by: Bertie690 <136088738+Bertie690@users.noreply.github.com>
This commit is contained in:
parent
88e42ba4c4
commit
63c1c34746
@ -77,7 +77,8 @@ export enum EvolutionItem {
|
||||
LEADERS_CREST
|
||||
}
|
||||
|
||||
type TyrogueMove = MoveId.LOW_SWEEP | MoveId.MACH_PUNCH | MoveId.RAPID_SPIN;
|
||||
const tyrogueMoves = [MoveId.LOW_SWEEP, MoveId.MACH_PUNCH, MoveId.RAPID_SPIN] as const;
|
||||
type TyrogueMove = typeof tyrogueMoves[number];
|
||||
|
||||
/**
|
||||
* Pokemon Evolution tuple type consisting of:
|
||||
@ -192,7 +193,7 @@ export class SpeciesEvolutionCondition {
|
||||
case EvoCondKey.WEATHER:
|
||||
return cond.weather.includes(globalScene.arena.getWeatherType());
|
||||
case EvoCondKey.TYROGUE:
|
||||
return pokemon.getMoveset(true).find(m => m.moveId as TyrogueMove)?.moveId === cond.move;
|
||||
return pokemon.getMoveset(true).find(m => (tyrogueMoves as readonly MoveId[]) .includes(m.moveId))?.moveId === cond.move;
|
||||
case EvoCondKey.NATURE:
|
||||
return cond.nature.includes(pokemon.getNature());
|
||||
case EvoCondKey.RANDOM_FORM: {
|
||||
|
@ -175,4 +175,27 @@ describe("Evolution", () => {
|
||||
expect(fourForm.evoFormKey).toBe("four"); // meanwhile, according to the pokemon-forms, the evoFormKey for a 4 family maushold is "four"
|
||||
}
|
||||
});
|
||||
|
||||
it("tyrogue should evolve if move is not in first slot", async () => {
|
||||
game.override
|
||||
.moveset([MoveId.TACKLE, MoveId.RAPID_SPIN, MoveId.LOW_KICK])
|
||||
.enemySpecies(SpeciesId.GOLEM)
|
||||
.enemyMoveset(MoveId.SPLASH)
|
||||
.startingWave(41)
|
||||
.startingLevel(19)
|
||||
.enemyLevel(30);
|
||||
|
||||
await game.classicMode.startBattle([SpeciesId.TYROGUE]);
|
||||
|
||||
const tyrogue = game.field.getPlayerPokemon();
|
||||
|
||||
const golem = game.field.getEnemyPokemon();
|
||||
golem.hp = 1;
|
||||
expect(golem.hp).toBe(1);
|
||||
|
||||
game.move.select(MoveId.TACKLE);
|
||||
await game.phaseInterceptor.to("EndEvolutionPhase");
|
||||
|
||||
expect(tyrogue.species.speciesId).toBe(SpeciesId.HITMONTOP);
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user