fix IsAbilityPreventingEscape message in party menu

This commit is contained in:
ghoulslash 2022-05-08 21:07:44 -04:00
parent 78cbbb51bb
commit d5fe2240b8

View file

@ -4028,8 +4028,8 @@ static void HandleTurnActionSelectionState(void)
{
BtlController_EmitChoosePokemon(BUFFER_A, PARTY_ACTION_CANT_SWITCH, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
}
else if ((i = IsAbilityPreventingEscape(gActiveBattler)
&& ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item) != HOLD_EFFECT_SHED_SHELL))
else if (ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item) != HOLD_EFFECT_SHED_SHELL
&& (i = IsAbilityPreventingEscape(gActiveBattler))) // must be last to keep i value integrity
{
BtlController_EmitChoosePokemon(BUFFER_A, ((i - 1) << 4) | PARTY_ACTION_ABILITY_PREVENTS, PARTY_SIZE, gBattleMons[i - 1].ability, gBattleStruct->battlerPartyOrders[gActiveBattler]);
}