-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Bug] Fix for "Moves Can Miss Against Protect, Baneful Bunker, King's Shield" #4262
Merged
Tempo-anon
merged 9 commits into
pagefaultgames:beta
from
PrabbyDD:prabbyd4096ONEMORETIME
Sep 15, 2024
Merged
[Bug] Fix for "Moves Can Miss Against Protect, Baneful Bunker, King's Shield" #4262
Tempo-anon
merged 9 commits into
pagefaultgames:beta
from
PrabbyDD:prabbyd4096ONEMORETIME
Sep 15, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…bc no easy way to test specifically with protect, and changes in move-effect to fix the issue
innerthunder
added
P2 Bug
Minor. Non crashing Incorrect move/ability/interaction
Move
Affects a move
labels
Sep 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source code seems good; just some nits on the test code
Co-authored-by: innerthunder <[email protected]>
Co-authored-by: innerthunder <[email protected]>
Co-authored-by: innerthunder <[email protected]>
Co-authored-by: innerthunder <[email protected]>
innerthunder
approved these changes
Sep 14, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are the changes the user will see?
Fixing #4060, so if pokemon misses against a move that protects, it will properly protect against the move despite missing
After effects of a protected, missed attack do t trigger if the move is contact (tested with slash)
After effects of a protected, missed attack do not trigger if the move is non contact (tested with flash cannon)
Why am I making these changes?
To fix #4060
What are the changes from a developer perspective?
Moved protect check to be before hit check, and avoid hitcheck if the pokemon is protected
Screenshots/Videos
2024-09-14.13-19-17.mp4
2024-09-14.13-19-32.mp4
2024-09-14.13-20-17.mp4
2024-09-14.13-20-32.mp4
2024-09-14.13-45-09.mp4
How to test the changes?
Use npm run test, as well as changing override files to test moves, and manually go into move-effect-phase.ts and change return value of hitCheck() to be false.
npm test obstruct (modified)
npm test baneful_bunker (added)
Run these two tests as specifically. I also tested manually via removing the forceMiss() function, and changing hitCheck() to return false to be sure.
I would appreciate any feedback on the changes to the move-effect-phase.ts file. Not really a good way to test protect specifically, since it doesnt have after effects.
I tested manually with other moves as well, like King's Shield and Burning Bulwark. Seems to work fine for all now.
Checklist
beta
as my base branchnpm run test
)