-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Clean up for #4928 #5120
Conversation
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
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); |
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.
Is there's a reason we're negating this instead of just keeping it as is and reversing the ternary?
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.
no reason, I can change it
src/battle_util.c
Outdated
if (stat == STAT_HP) // Skip HP because it can not be boosted | ||
continue; |
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.
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
?
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.
right, that is better
d49d0aa
to
afe63c9
Compare
ready for re-review. |
#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.