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

Clean up for #4928 #5120

Merged
merged 5 commits into from
Aug 11, 2024
Merged

Conversation

AlexOn1ine
Copy link
Collaborator

@AlexOn1ine AlexOn1ine commented Aug 8, 2024

#4928 follow up.

Based on the review comments I made a function to avoid duplicating code and an array to account for speed being last to check the animation.

@pkmnsnfrn
Copy link
Collaborator

halp CI broke

also if I wanted to test this ingame, what does it do and what should I expect / look for?

@AlexOn1ine
Copy link
Collaborator Author

halp CI broke

also if I wanted to test this ingame, what does it do and what should I expect / look for?

agbcc doesn't compile, I don't want to turn it back on locally just for this and Idk why it doesn't compile on it.

If the animation is correct for the stat that is boosted. You could check some of the tests to see what I mean.

src/battle_util.c Outdated Show resolved Hide resolved
src/battle_util.c Outdated Show resolved Hide resolved
src/battle_util.c Outdated Show resolved Hide resolved
src/battle_util.c Outdated Show resolved Hide resolved
statBuffMoreThan1 = ((gQueuedStatBoosts[battler].stats & (1 << statsOrder[stat])) > 1);

if (gBattleScripting.animArg1 != 0) //Already set in a different stat so now boosting multiple stats
gBattleScripting.animArg1 = (!statBuffMoreThan1 ? STAT_ANIM_MULTIPLE_PLUS1 : STAT_ANIM_MULTIPLE_PLUS2);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there's a reason we're negating this instead of just keeping it as is and reversing the ternary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no reason, I can change it

Comment on lines 4090 to 4091
if (stat == STAT_HP) // Skip HP because it can not be boosted
continue;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Isn't this a wasted iteration considering HP is always 0 anyway? Shouldn't we just have stat start at 1 or even explicitly STAT_ATK?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

right, that is better

@AlexOn1ine
Copy link
Collaborator Author

ready for re-review.

@Bassoonian Bassoonian merged commit 137c15a into rh-hideout:master Aug 11, 2024
1 check passed
AlexOn1ine added a commit that referenced this pull request Aug 13, 2024
Consistency change
@AlexOn1ine AlexOn1ine mentioned this pull request Aug 13, 2024
Bassoonian pushed a commit that referenced this pull request Aug 14, 2024
Consistency change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants