Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOVE_BREAKNECK_BLITZ is broken #2558

Closed
AaghatIsLive opened this issue Jan 3, 2023 · 7 comments · Fixed by #2937
Closed

MOVE_BREAKNECK_BLITZ is broken #2558

AaghatIsLive opened this issue Jan 3, 2023 · 7 comments · Fixed by #2937
Labels
bug Bug category: battle-mechanic Pertains to battle mechanics

Comments

@AaghatIsLive
Copy link

AaghatIsLive commented Jan 3, 2023

Untitled.video.-.Made.with.Clipchamp.mp4

It always uses the 4th move instead of the selected one.

@AlexOn1ine
Copy link
Collaborator

It is not just an issue with MOVE_BREAKNECK_BLITZ. It is related to z moves.
z_move
Basically anytime there is a status move of the same type in one of the 3 next slots it deletes the z move effect of the previous damaging dealing move in function IsViableZMove

            if (IS_MOVE_STATUS(move))
                gBattleStruct->zmove.chosenZMove = move;
            else
                gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId);

Changing it to just this line solves the bug

gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId);

z_move2
Though I'm not sure if this creates a different problem but it shouldn't since it is just setting the type of the move z move, right?

@AaghatIsLive
Copy link
Author

            if (IS_MOVE_STATUS(move))
                gBattleStruct->zmove.chosenZMove = move;
            else
                gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId);

Changing it to just this line solves the bug

gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId);

I'm not sure if this creates a different problem but it shouldn't since it is just setting the type of the move z move, right?

@AlexOn1ine Tested it out and this happened,

zm (1)

It forced me to use my zmove on a move of another type

@AlexOn1ine
Copy link
Collaborator

AlexOn1ine commented Feb 27, 2023

Yeah, was able to reproduce. I think I know what is happening but good that I didn't PR this. Each time there is a Z move that is past the clicked slot it tries to use it if you tried it previously. Thanks for testing it out.

Taunt will not prevent the target from using a status Z-Move

It shouldn't even prevent it.

@AlexOn1ine
Copy link
Collaborator

Something similar is also happening with the current implementation.
z_move_status

@AaghatIsLive
Copy link
Author

            if (IS_MOVE_STATUS(move))
                gBattleStruct->zmove.chosenZMove = move;
            else
                gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId);

Changing it to just this line solves the bug

gBattleStruct->zmove.chosenZMove = GetTypeBasedZMove(move, battlerId);

I'm not sure if this creates a different problem but it shouldn't since it is just setting the type of the move z move, right?

@AlexOn1ine I think your suggestion fixes it. The taunt one was a separate issue, and I haven't had any issues with Z-moves since then.

except for this one where the move crashed the game in a double battle, but it could be a different issue.
IMG_8244

@AlexOn1ine
Copy link
Collaborator

except for this one where the move crashed the game in a double battle, but it could be a different issue.

Does the issue happen without the change? If it does then I PR my change and maybe something comes up in the review.

@AsparagusEduardo AsparagusEduardo added bug Bug category: battle-mechanic Pertains to battle mechanics labels Apr 17, 2023
@AaghatIsLive
Copy link
Author

Does the issue happen without the change? If it does then I PR my change and maybe something comes up in the review.

@AlexOn1ine Yeah, it does. You should go ahead and PR this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug category: battle-mechanic Pertains to battle mechanics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants