mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-09 08:59:29 +02:00
Fixed wish tests
This commit is contained in:
parent
2c207980d3
commit
f942be8a8c
@ -152,8 +152,10 @@ export class WishTag extends PositionalTag implements WishArgs {
|
||||
}
|
||||
|
||||
public shouldDisappear(): boolean {
|
||||
// Disappear if no target.
|
||||
// Disappear if no target or target is fainted.
|
||||
// The source need not exist at the time of activation (since all we need is a simple message)
|
||||
return !this.getTarget();
|
||||
// TODO: Verify whether Wish shows a message if the Pokemon it would affect is KO'd on the turn of activation
|
||||
const target = this.getTarget();
|
||||
return !target || target.isFainted();
|
||||
}
|
||||
}
|
||||
|
@ -118,6 +118,8 @@ describe("Move - Wish", () => {
|
||||
|
||||
game.move.use(MoveId.WISH, BattlerIndex.PLAYER);
|
||||
game.move.use(MoveId.WISH, BattlerIndex.PLAYER_2);
|
||||
await game.move.forceEnemyMove(MoveId.WISH);
|
||||
await game.move.forceEnemyMove(MoveId.WISH);
|
||||
await game.toNextTurn();
|
||||
|
||||
expectWishActive(2);
|
||||
@ -146,7 +148,7 @@ describe("Move - Wish", () => {
|
||||
expect(blissey.hp).toBe(toDmgValue(blissey.getMaxHp() / 2) + 1);
|
||||
});
|
||||
|
||||
it("should vanish if slot is empty", async () => {
|
||||
it("should vanish and not play message if slot is empty", async () => {
|
||||
game.override.battleStyle("double");
|
||||
await game.classicMode.startBattle([SpeciesId.ALOMOMOLA, SpeciesId.BLISSEY]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user