mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
fix updatehptextinhealthbox arguments
This commit is contained in:
parent
63370b065d
commit
1b9c2816c2
@ -392,7 +392,7 @@ static void CompleteOnHealthbarDone(void)
|
||||
|
||||
if (hpValue != -1)
|
||||
{
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT);
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -278,7 +278,7 @@ static void CompleteOnHealthbarDone(void)
|
||||
|
||||
if (hpValue != -1)
|
||||
{
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT);
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -410,7 +410,7 @@ static void CompleteOnHealthbarDone(void)
|
||||
SetHealthboxSpriteVisible(gHealthboxSpriteIds[gActiveBattler]);
|
||||
if (hpValue != -1)
|
||||
{
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT);
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP);
|
||||
}
|
||||
else
|
||||
OpponentBufferExecCompleted();
|
||||
@ -1588,9 +1588,9 @@ static void OpponentHandleChooseMove(void)
|
||||
gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_LEFT);
|
||||
if (gAbsentBattlerFlags & gBitTable[gBattlerTarget])
|
||||
gBattlerTarget = GetBattlerAtPosition(B_POSITION_PLAYER_RIGHT);
|
||||
}
|
||||
}
|
||||
if (ShouldUseZMove(gActiveBattler, gBattlerTarget, chosenMove))
|
||||
QueueZMove(gActiveBattler, chosenMove);
|
||||
QueueZMove(gActiveBattler, chosenMove);
|
||||
if (CanMegaEvolve(gActiveBattler)) // If opponent can mega evolve, do it.
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, 10, (chosenMoveId) | (RET_MEGA_EVOLUTION) | (gBattlerTarget << 8));
|
||||
else
|
||||
@ -1617,7 +1617,7 @@ static void OpponentHandleChooseMove(void)
|
||||
do {
|
||||
target = GetBattlerAtPosition(Random() & 2);
|
||||
} while (!CanTargetBattler(gActiveBattler, target, move));
|
||||
|
||||
|
||||
#if B_WILD_NATURAL_ENEMIES == TRUE
|
||||
// Don't bother to loop through table if the move can't attack ally
|
||||
if (!(gBattleMoves[move].target & MOVE_TARGET_BOTH))
|
||||
|
@ -292,7 +292,7 @@ static void CompleteOnHealthbarDone(void)
|
||||
|
||||
if (hpValue != -1)
|
||||
{
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT);
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1528,7 +1528,7 @@ static void PlayerPartnerHandleChooseMove(void)
|
||||
if (gAbsentBattlerFlags & gBitTable[gBattlerTarget])
|
||||
gBattlerTarget = GetBattlerAtPosition(B_POSITION_OPPONENT_RIGHT);
|
||||
}
|
||||
|
||||
|
||||
if (ShouldUseZMove(gActiveBattler, gBattlerTarget, moveInfo->moves[chosenMoveId]))
|
||||
QueueZMove(gActiveBattler, moveInfo->moves[chosenMoveId]);
|
||||
|
||||
|
@ -376,7 +376,7 @@ static void CompleteOnHealthbarDone(void)
|
||||
|
||||
if (hpValue != -1)
|
||||
{
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT);
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -351,7 +351,7 @@ static void CompleteOnHealthbarDone(void)
|
||||
|
||||
if (hpValue != -1)
|
||||
{
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT);
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1481,7 +1481,7 @@ static void RecordedPlayerHandleHealthBarUpdate(void)
|
||||
u32 maxHP = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MAX_HP);
|
||||
|
||||
SetBattleBarStruct(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], maxHP, 0, hpVal);
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], 0, HP_CURRENT);
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, 0, maxHP);
|
||||
}
|
||||
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnHealthbarDone;
|
||||
|
@ -352,7 +352,7 @@ static void CompleteOnHealthbarDone(void)
|
||||
|
||||
if (hpValue != -1)
|
||||
{
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], hpValue, HP_CURRENT);
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, hpValue, gBattleMons[gActiveBattler].maxHP);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1277,7 +1277,7 @@ static void WallyHandleHealthBarUpdate(void)
|
||||
u32 maxHP = GetMonData(&gPlayerParty[gBattlerPartyIndexes[gActiveBattler]], MON_DATA_MAX_HP);
|
||||
|
||||
SetBattleBarStruct(gActiveBattler, gHealthboxSpriteIds[gActiveBattler], maxHP, 0, hpVal);
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], 0, HP_CURRENT);
|
||||
UpdateHpTextInHealthbox(gHealthboxSpriteIds[gActiveBattler], HP_CURRENT, 0, maxHP);
|
||||
}
|
||||
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteOnHealthbarDone;
|
||||
|
Loading…
Reference in New Issue
Block a user