mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-14 19:39:29 +02:00
jjjjjjhuoui
This commit is contained in:
parent
510d683cc1
commit
cbc6f6b89e
@ -9221,8 +9221,8 @@ export function initMoves() {
|
||||
.ignoresSubstitute()
|
||||
.condition((user, target, move) => new EncoreTag(user.id).canAdd(target))
|
||||
.reflectable()
|
||||
// Can lock infinitely into struggle; has incorrect interactions with Blood Moon/Gigaton Hammer
|
||||
// Also may or may not incorrectly select targets for replacement move (needs verification)
|
||||
// has incorrect interactions with Blood Moon/Gigaton Hammer
|
||||
// TODO: How does Encore interact when locking
|
||||
.edgeCase(),
|
||||
new AttackMove(MoveId.PURSUIT, PokemonType.DARK, MoveCategory.PHYSICAL, 40, 100, 20, -1, 0, 2)
|
||||
.partial(), // No effect implemented
|
||||
|
@ -70,8 +70,8 @@ describe("Moves - Reflecting effects", () => {
|
||||
expect(karp2).toHaveStatStage(Stat.ATK, -2);
|
||||
});
|
||||
|
||||
// TODO: This is meaningless for now since growl doesn't fail when used at -6...
|
||||
it("should still bounce back a move that would otherwise fail", async () => {
|
||||
// TODO: This is broken...
|
||||
it.todo("should still bounce back a move that would otherwise fail", async () => {
|
||||
game.override.enemyAbility(AbilityId.INSOMNIA);
|
||||
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
|
||||
|
||||
@ -148,17 +148,18 @@ describe("Moves - Reflecting effects", () => {
|
||||
await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.ABRA]);
|
||||
|
||||
// Fake abra having mold breaker and the enemy having used Tackle
|
||||
const [abra, enemy1, enemy2] = game.scene.getField();
|
||||
const [, abra, enemy1, enemy2] = game.scene.getField();
|
||||
game.field.mockAbility(abra, AbilityId.MOLD_BREAKER);
|
||||
game.move.changeMoveset(enemy1, [MoveId.TACKLE, MoveId.SPLASH]);
|
||||
enemy1.pushMoveHistory({ move: MoveId.TACKLE, targets: [BattlerIndex.PLAYER], useMode: MoveUseMode.NORMAL });
|
||||
|
||||
// turn 1: Magikarp uses growl as Abra attempts to encore
|
||||
// Magikarp uses growl as Abra attempts to encore enemy 1
|
||||
game.move.use(MoveId.GROWL, BattlerIndex.PLAYER);
|
||||
game.move.use(MoveId.ENCORE, BattlerIndex.PLAYER_2);
|
||||
await game.move.forceEnemyMove(MoveId.SPLASH);
|
||||
game.move.use(MoveId.ENCORE, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY);
|
||||
await game.move.selectEnemyMove(MoveId.SPLASH);
|
||||
await game.killPokemon(enemy2 as EnemyPokemon);
|
||||
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY]);
|
||||
await game.toNextTurn();
|
||||
await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.PLAYER_2, BattlerIndex.ENEMY, BattlerIndex.ENEMY_2]);
|
||||
await game.toEndOfTurn();
|
||||
|
||||
// Encore locked into Tackle, replacing the enemy's Growl with another Tackle
|
||||
expect(enemy1.getTag(BattlerTagType.ENCORE)!["moveId"]).toBe(MoveId.TACKLE);
|
||||
@ -214,7 +215,8 @@ describe("Moves - Reflecting effects", () => {
|
||||
await game.phaseInterceptor.to("MoveEndPhase");
|
||||
await game.toEndOfTurn();
|
||||
|
||||
expect(magikarp).toHaveStatusEffect(StatusEffect.SLEEP);
|
||||
// todo change once matchers fixed
|
||||
expect(magikarp.status?.effect).toBe(StatusEffect.SLEEP);
|
||||
|
||||
magikarp.clearStatus(false, false);
|
||||
|
||||
@ -223,10 +225,9 @@ describe("Moves - Reflecting effects", () => {
|
||||
|
||||
// Turn 2: Force a miss on Feebas' reflected move
|
||||
game.move.use(MoveId.SPORE);
|
||||
await game.phaseInterceptor.to("MoveEndPhase");
|
||||
await game.toEndOfTurn();
|
||||
|
||||
expect(magikarp).not.toHaveStatusEffect(StatusEffect.SLEEP);
|
||||
expect(magikarp.status?.effect).toBeFalsy();
|
||||
});
|
||||
});
|
||||
|
||||
@ -294,20 +295,16 @@ describe("Moves - Reflecting effects", () => {
|
||||
});
|
||||
|
||||
it("should not stack with magic coat on the same Pokemon", async () => {
|
||||
game.override.battleStyle("double");
|
||||
await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.MAGIKARP]);
|
||||
await game.classicMode.startBattle([SpeciesId.MAGIKARP]);
|
||||
|
||||
game.field.mockAbility(game.field.getPlayerPokemon(), AbilityId.MAGIC_BOUNCE);
|
||||
|
||||
game.move.use(MoveId.GROWL, BattlerIndex.PLAYER);
|
||||
game.move.use(MoveId.SPLASH, BattlerIndex.PLAYER_2);
|
||||
await game.move.forceEnemyMove(MoveId.MAGIC_COAT);
|
||||
await game.move.forceEnemyMove(MoveId.SPLASH);
|
||||
await game.toEndOfTurn();
|
||||
|
||||
const [karp1, karp2] = game.scene.getPlayerField();
|
||||
expect(karp1).toHaveStatStage(Stat.ATK, -1);
|
||||
expect(karp2).toHaveStatStage(Stat.ATK, -1);
|
||||
const karp = game.field.getPlayerPokemon();
|
||||
expect(karp).toHaveStatStage(Stat.ATK, -1);
|
||||
});
|
||||
|
||||
it("should bounce spikes even when the target is protected", async () => {
|
||||
|
Loading…
Reference in New Issue
Block a user