mirror of
https://github.com/rh-hideout/pokeemerald-expansion.git
synced 2026-03-21 18:04:50 -05:00
Fix visual glicth during critical capture (#9538)
Some checks are pending
CI / build-emerald (push) Waiting to run
CI / build-firered (push) Waiting to run
CI / build-leafgreen (push) Waiting to run
CI / release (push) Waiting to run
CI / test (push) Waiting to run
CI / build (push) Blocked by required conditions
CI / docs_validate (push) Waiting to run
CI / allcontributors (push) Waiting to run
Docs / deploy (push) Waiting to run
Some checks are pending
CI / build-emerald (push) Waiting to run
CI / build-firered (push) Waiting to run
CI / build-leafgreen (push) Waiting to run
CI / release (push) Waiting to run
CI / test (push) Waiting to run
CI / build (push) Blocked by required conditions
CI / docs_validate (push) Waiting to run
CI / allcontributors (push) Waiting to run
Docs / deploy (push) Waiting to run
This commit is contained in:
parent
77fa8e086b
commit
dbf1d53416
|
|
@ -10524,7 +10524,8 @@ static void FinalizeCapture(void)
|
|||
{
|
||||
u32 ballId = ItemIdToBallId(gLastThrownBall);
|
||||
enum NationalDexOrder natDexNo = SpeciesToNationalPokedexNum(gBattleMons[gBattlerTarget].species);
|
||||
if (GetConfig(B_CRITICAL_CAPTURE_IF_OWNED) >= GEN_9 && GetSetPokedexFlag(natDexNo, FLAG_GET_CAUGHT))
|
||||
if ((GetConfig(B_CRITICAL_CAPTURE_IF_OWNED) >= GEN_9 && GetSetPokedexFlag(natDexNo, FLAG_GET_CAUGHT))
|
||||
|| IsCriticalCapture())
|
||||
{
|
||||
gBattleSpritesDataPtr->animationData->isCriticalCapture = TRUE;
|
||||
gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = TRUE;
|
||||
|
|
@ -10907,6 +10908,9 @@ static void Cmd_handleballthrow(void)
|
|||
if (gBattleResults.catchAttempts[ballId] < 255)
|
||||
gBattleResults.catchAttempts[ballId]++;
|
||||
|
||||
gBattleSpritesDataPtr->animationData->isCriticalCapture = FALSE;
|
||||
gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = FALSE;
|
||||
|
||||
//Master Ball check occurs before critical capture check
|
||||
if (odds == CAPTURE_GUARANTEED)
|
||||
{
|
||||
|
|
@ -10917,9 +10921,6 @@ static void Cmd_handleballthrow(void)
|
|||
u8 shakes;
|
||||
u8 maxShakes;
|
||||
|
||||
gBattleSpritesDataPtr->animationData->isCriticalCapture = FALSE;
|
||||
gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = FALSE;
|
||||
|
||||
if (CriticalCapture(odds))
|
||||
{
|
||||
maxShakes = BALL_1_SHAKE; // critical capture doesn't guarantee capture
|
||||
|
|
@ -10944,8 +10945,6 @@ static void Cmd_handleballthrow(void)
|
|||
|
||||
if (shakes == maxShakes) // mon caught, copy of the code above
|
||||
{
|
||||
if (IsCriticalCapture())
|
||||
gBattleSpritesDataPtr->animationData->criticalCaptureSuccess = TRUE;
|
||||
FinalizeCapture();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user