mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
Primal Reversion at the beginning of a battle now happens in the switchin ability loop, making it happen by speed order.
This commit is contained in:
parent
57bdb683ec
commit
0eccbdf980
@ -3678,18 +3678,6 @@ static void TryDoEventsBeforeFirstTurn(void)
|
||||
}
|
||||
memset(gTotemBoosts, 0, sizeof(gTotemBoosts)); // erase all totem boosts just to be safe
|
||||
|
||||
// Primal Reversion
|
||||
for (i = 0; i < gBattlersCount; i++)
|
||||
{
|
||||
if (GetBattlerHoldEffect(i, TRUE) == HOLD_EFFECT_PRIMAL_ORB
|
||||
&& GetBattleFormChangeTargetSpecies(i, FORM_CHANGE_BATTLE_PRIMAL_REVERSION) != SPECIES_NONE)
|
||||
{
|
||||
gBattlerAttacker = i;
|
||||
BattleScriptExecute(BattleScript_PrimalReversion);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Check neutralizing gas
|
||||
if (AbilityBattleEffects(ABILITYEFFECT_NEUTRALIZINGGAS, 0, 0, 0, 0) != 0)
|
||||
return;
|
||||
@ -3698,6 +3686,14 @@ static void TryDoEventsBeforeFirstTurn(void)
|
||||
while (gBattleStruct->switchInAbilitiesCounter < gBattlersCount)
|
||||
{
|
||||
gBattlerAttacker = gBattlerByTurnOrder[gBattleStruct->switchInAbilitiesCounter++];
|
||||
|
||||
// Primal Reversion
|
||||
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_PRIMAL_ORB
|
||||
&& GetBattleFormChangeTargetSpecies(gBattlerAttacker, FORM_CHANGE_BATTLE_PRIMAL_REVERSION) != SPECIES_NONE)
|
||||
{
|
||||
BattleScriptExecute(BattleScript_PrimalReversion);
|
||||
return;
|
||||
}
|
||||
if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gBattlerAttacker, 0, 0, 0) != 0)
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user