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
1 changed files with 8 additions and 12 deletions
|
@ -3678,18 +3678,6 @@ static void TryDoEventsBeforeFirstTurn(void)
|
||||||
}
|
}
|
||||||
memset(gTotemBoosts, 0, sizeof(gTotemBoosts)); // erase all totem boosts just to be safe
|
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
|
// Check neutralizing gas
|
||||||
if (AbilityBattleEffects(ABILITYEFFECT_NEUTRALIZINGGAS, 0, 0, 0, 0) != 0)
|
if (AbilityBattleEffects(ABILITYEFFECT_NEUTRALIZINGGAS, 0, 0, 0, 0) != 0)
|
||||||
return;
|
return;
|
||||||
|
@ -3698,6 +3686,14 @@ static void TryDoEventsBeforeFirstTurn(void)
|
||||||
while (gBattleStruct->switchInAbilitiesCounter < gBattlersCount)
|
while (gBattleStruct->switchInAbilitiesCounter < gBattlersCount)
|
||||||
{
|
{
|
||||||
gBattlerAttacker = gBattlerByTurnOrder[gBattleStruct->switchInAbilitiesCounter++];
|
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)
|
if (AbilityBattleEffects(ABILITYEFFECT_ON_SWITCHIN, gBattlerAttacker, 0, 0, 0) != 0)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue