mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-14 19:39:29 +02:00
Fixed minor bugs in the files
encore was basing targets off of the PRIOR move, not the encored one. mb
This commit is contained in:
parent
93c3422f91
commit
5653ec83be
@ -1288,7 +1288,7 @@ export class EncoreTag extends MoveRestrictionBattlerTag {
|
|||||||
// TODO: Investigate this...
|
// TODO: Investigate this...
|
||||||
const movesetMove = pokemon.getMoveset().find(m => m.moveId === this.moveId) ?? new PokemonMove(this.moveId);
|
const movesetMove = pokemon.getMoveset().find(m => m.moveId === this.moveId) ?? new PokemonMove(this.moveId);
|
||||||
|
|
||||||
const moveTargets = getMoveTargets(pokemon, movePhase.move.moveId);
|
const moveTargets = getMoveTargets(pokemon, this.moveId);
|
||||||
// Spread moves and ones with only 1 valid target will use their normal targeting.
|
// Spread moves and ones with only 1 valid target will use their normal targeting.
|
||||||
// If not, target a random enemy in our target list
|
// If not, target a random enemy in our target list
|
||||||
const targets =
|
const targets =
|
||||||
|
@ -44,7 +44,7 @@ describe("Moves - Encore", () => {
|
|||||||
|
|
||||||
game.move.use(MoveId.ENCORE);
|
game.move.use(MoveId.ENCORE);
|
||||||
await game.move.forceEnemyMove(MoveId.SPLASH);
|
await game.move.forceEnemyMove(MoveId.SPLASH);
|
||||||
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]);
|
await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]);
|
||||||
await game.toNextTurn();
|
await game.toNextTurn();
|
||||||
|
|
||||||
expect(enemyPokemon).toHaveBattlerTag(BattlerTagType.ENCORE);
|
expect(enemyPokemon).toHaveBattlerTag(BattlerTagType.ENCORE);
|
||||||
@ -69,6 +69,7 @@ describe("Moves - Encore", () => {
|
|||||||
expect(enemy.isMoveRestricted(MoveId.SPLASH)).toBe(false);
|
expect(enemy.isMoveRestricted(MoveId.SPLASH)).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// TODO: Make test using `changeMoveset`
|
||||||
it.todo("should end at turn end if the user forgets the Encored move");
|
it.todo("should end at turn end if the user forgets the Encored move");
|
||||||
|
|
||||||
// TODO: Make test (presumably involving Spite)
|
// TODO: Make test (presumably involving Spite)
|
||||||
|
Loading…
Reference in New Issue
Block a user