mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-19 13:59:27 +02:00
Make substitute use the move tag
This commit is contained in:
parent
55b8429787
commit
0112244de2
@ -3090,7 +3090,7 @@ export class SubstituteTag extends SerializableBattlerTag {
|
||||
constructor(sourceMove: MoveId, sourceId: number) {
|
||||
super(
|
||||
BattlerTagType.SUBSTITUTE,
|
||||
[BattlerTagLapseType.PRE_MOVE, BattlerTagLapseType.AFTER_MOVE, BattlerTagLapseType.HIT],
|
||||
[BattlerTagLapseType.MOVE, BattlerTagLapseType.AFTER_MOVE, BattlerTagLapseType.HIT],
|
||||
0,
|
||||
sourceMove,
|
||||
sourceId,
|
||||
|
@ -142,7 +142,7 @@ describe("BattlerTag - SubstituteTag", () => {
|
||||
vi.spyOn(messages, "getPokemonNameWithAffix").mockReturnValue("");
|
||||
});
|
||||
|
||||
it("PRE_MOVE lapse triggers pre-move animation", async () => {
|
||||
it("MOVE lapse triggers pre-move animation", async () => {
|
||||
const subject = new SubstituteTag(MoveId.SUBSTITUTE, mockPokemon.id);
|
||||
|
||||
vi.spyOn(mockPokemon.scene as BattleScene, "triggerPokemonBattleAnim").mockImplementation(
|
||||
@ -154,7 +154,7 @@ describe("BattlerTag - SubstituteTag", () => {
|
||||
|
||||
vi.spyOn((mockPokemon.scene as BattleScene).phaseManager, "queueMessage").mockReturnValue();
|
||||
|
||||
expect(subject.lapse(mockPokemon, BattlerTagLapseType.PRE_MOVE)).toBeTruthy();
|
||||
expect(subject.lapse(mockPokemon, BattlerTagLapseType.MOVE)).toBeTruthy();
|
||||
|
||||
expect(subject.sourceInFocus).toBeTruthy();
|
||||
expect((mockPokemon.scene as BattleScene).triggerPokemonBattleAnim).toHaveBeenCalledTimes(1);
|
||||
|
Loading…
Reference in New Issue
Block a user