Misc cleanup

This commit is contained in:
Eduardo Quezada
2022-08-18 14:23:45 -04:00
parent 936ebbd973
commit 59f89bde9e
5 changed files with 17 additions and 20 deletions

View File

@@ -368,16 +368,13 @@ static void TryShinyAnimAfterMonAnim(void)
{
TryShinyAnimation(gActiveBattler, &gEnemyParty[gBattlerPartyIndexes[gActiveBattler]]);
}
else
else if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim)
{
if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim)
{
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim = FALSE;
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim = FALSE;
FreeSpriteTilesByTag(ANIM_TAG_GOLD_STARS);
FreeSpritePaletteByTag(ANIM_TAG_GOLD_STARS);
LinkOpponentBufferExecCompleted();
}
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].triedShinyMonAnim = FALSE;
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].finishedShinyMonAnim = FALSE;
FreeSpriteTilesByTag(ANIM_TAG_GOLD_STARS);
FreeSpritePaletteByTag(ANIM_TAG_GOLD_STARS);
LinkOpponentBufferExecCompleted();
}
}
}
@@ -1758,14 +1755,14 @@ static void LinkOpponentHandleDrawPartyStatusSummary(void)
if (gBattleBufferA[gActiveBattler][2] != 0)
{
if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E < 2)
if (gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay < 2)
{
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E++;
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay++;
return;
}
else
{
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].field_1_x1E = 0;
gBattleSpritesDataPtr->healthBoxesData[gActiveBattler].opponentDrawPartyStatusSummaryDelay = 0;
}
}