-
-
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
[Refactor] Added BattlerTagLapseType.AFTER_HIT
#3655
Conversation
Adjusted BeakBlastChargingTag and ShellTrapTag to use new lapse type Adjusted MoveEffectPhase to now lapse all tags with the ON_GET_HIT lapse type
Adjusted BeakBlastChargingTag and ShellTrapTag to use new lapse type Adjusted MoveEffectPhase to now lapse all tags with the ON_GET_HIT lapse type
# Conflicts: # src/data/battler-tags.ts
Overlaps with #2559 |
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.
Some minor style consistency nits.
Are you still around to update this PR? #2559 added a |
Change `isOpponentTo` to `isOpponent`
AFTER_HIT
BattlerTagLapseType
After comparing to the |
AFTER_HIT
BattlerTagLapseType
BattlerTagLapseType.AFTER_HIT
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.
this could potentially open up a fix for #4552
What are the changes the user will see?
No changes user-side
Why am I making these changes?
Beak Blast and Shell Trap both implement
BattlerTags
that have some form of effect when the tag holder is hit but currently, each such effect needs to be handled and checked for individually. Adding a newLapseType
to handle these similar tags all at once should help reduce duplicate code, standardize their implementations, and streamline future development.What are the changes from a developer perspective?
BattlerTagLapseType.AFTER_HIT
has been addedMoveEffectPhase
now lapses allAFTER_HIT
tags usinglapseTags()
pokemon.ts
andbattler-tags.ts
How to test the changes?
There should be no change in gameplay, so just proceed as you normally would and watch for any unexpected bugs.
There are also existing tests for Beak Blast and Shell Trap:
npm run test beak_blast
npm run test shell_trap
Checklist
beta
as my base branchnpm run test
)