mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-30 21:42:20 +02:00
Reverted bool change + fixed test
This commit is contained in:
parent
df3b386625
commit
2efb2ec375
@ -1366,7 +1366,7 @@ export class PreMoveMessageAttr extends MoveAttr {
|
||||
* @param message - The message to display before move use, either as a string or a function producing one.
|
||||
* @remarks
|
||||
* If {@linkcode message} evaluates to an empty string (`''`), no message will be displayed
|
||||
* (though the move will still suceed).
|
||||
* (though the move will still succeed).
|
||||
*/
|
||||
constructor(message: string | ((user: Pokemon, target: Pokemon, move: Move) => string)) {
|
||||
super();
|
||||
@ -1380,8 +1380,9 @@ export class PreMoveMessageAttr extends MoveAttr {
|
||||
|
||||
if (message) {
|
||||
globalScene.queueMessage(message, 500);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ describe("Moves - Chilly Reception", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("should not display message if called indirectly", async () => {
|
||||
it("should succeed without message if called indirectly", async () => {
|
||||
vi.spyOn(RandomMoveAttr.prototype, "getMoveOverride").mockReturnValue(Moves.CHILLY_RECEPTION);
|
||||
await game.classicMode.startBattle([Species.SLOWKING, Species.MEOWTH]);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user