diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2020-12-31 00:40:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-31 00:40:45 -0500 |
commit | ec85c01e7c6d15060eddcc653db33a4b317646d2 (patch) | |
tree | 4266c43bcdc1c80c52def44e1470182d3f1c665c /src/battle_controller_wally.c | |
parent | 093610b46e99b517a416ccd5a572054dff09801b (diff) | |
parent | 0c74e2097ffbe8395d6f3659c2a49fc829d69b99 (diff) |
Merge branch 'master' into doc-factscreen
Diffstat (limited to 'src/battle_controller_wally.c')
-rw-r--r-- | src/battle_controller_wally.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/src/battle_controller_wally.c b/src/battle_controller_wally.c index a26694a8e..aa50bc159 100644 --- a/src/battle_controller_wally.c +++ b/src/battle_controller_wally.c @@ -285,9 +285,12 @@ static void CompleteOnChosenItem(void) static void sub_816864C(void) { - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive) + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim + && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive) TryShinyAnimation(gActiveBattler, &gPlayerParty[gBattlerPartyIndexes[gActiveBattler]]); - if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].flag_x80 && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].ballAnimActive) + + if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim + && !gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].ballAnimActive) TryShinyAnimation(gActiveBattler ^ BIT_FLANK, &gPlayerParty[gBattlerPartyIndexes[gActiveBattler ^ BIT_FLANK]]); if (!gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].ballAnimActive @@ -320,14 +323,14 @@ static void sub_8168818(void) if (gSprites[gHealthboxSpriteIds[gActiveBattler]].callback == SpriteCallbackDummy) r4 = TRUE; - if (r4 && gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1 - && gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].field_1_x1) + if (r4 && gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim + && gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].finishedShinyMonAnim) { - gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].flag_x80 = 0; - gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1 = 0; + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim = FALSE; + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim = FALSE; - gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].flag_x80 = 0; - gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].field_1_x1 = 0; + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].triedShinyMonAnim = FALSE; + gBattleSpritesDataPtr->healthBoxesData[gActiveBattler ^ BIT_FLANK].finishedShinyMonAnim = FALSE; FreeSpriteTilesByTag(0x27F9); FreeSpritePaletteByTag(0x27F9); @@ -1076,7 +1079,7 @@ static void WallyHandleSuccessBallThrowAnim(void) { gBattleSpritesDataPtr->animationData->ballThrowCaseId = BALL_3_SHAKES_SUCCESS; gDoingBattleAnim = TRUE; - InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW); + InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER); gBattlerControllerFuncs[gActiveBattler] = CompleteOnFinishedAnimation; } @@ -1086,7 +1089,7 @@ static void WallyHandleBallThrowAnim(void) gBattleSpritesDataPtr->animationData->ballThrowCaseId = ballThrowCaseId; gDoingBattleAnim = TRUE; - InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_SAFARI_BALL_THROW); + InitAndLaunchSpecialAnimation(gActiveBattler, gActiveBattler, GetBattlerAtPosition(B_POSITION_OPPONENT_LEFT), B_ANIM_BALL_THROW_WITH_TRAINER); gBattlerControllerFuncs[gActiveBattler] = CompleteOnFinishedAnimation; } |