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

Fix regression introduced for Eject Button #3738

Merged
merged 4 commits into from
Dec 16, 2023

Conversation

AlexOn1ine
Copy link
Collaborator

@AlexOn1ine AlexOn1ine commented Dec 15, 2023

Regression introduced in #3669

Target to upcoming because the recently introduced enduredDamage Battle Struct field fixes a small bug that applies here as well

Other:

Fixes: #3633

@@ -5853,7 +5853,8 @@ static void Cmd_moveend(void)
if (IsBattlerAlive(battler)
&& gBattlerAttacker != battler
&& GetBattlerHoldEffect(battler, TRUE) == HOLD_EFFECT_EJECT_BUTTON
&& TARGET_TURN_DAMAGED
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe better to have a BATTLER_TURN_DAMAGED macro thats the same as TARGET_TURN_DAMAGED but for a given battler id

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like it already exists BATTLER_DAMAGED but is only used once. Should I rename it? I like BATTLER_TURN_DAMAGED more

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went ahead and made the change.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah BATTLER_DAMAGED is fine

@AlexOn1ine AlexOn1ine added this to the 1.7.0 milestone Dec 15, 2023
@AlexOn1ine
Copy link
Collaborator Author

Also Renamed jumpifaffectedbyprotect to unused5. Fixes: #3633

@ghoulslash ghoulslash merged commit 050d3a5 into rh-hideout:upcoming Dec 16, 2023
1 check passed
@AlexOn1ine AlexOn1ine deleted the regression branch April 19, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants