summaryrefslogtreecommitdiff
path: root/src/battle_controller_wally.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/battle_controller_wally.c')
-rw-r--r--src/battle_controller_wally.c23
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;
}