fixed shed shell

This commit is contained in:
AgustinGDLV 2022-05-05 20:46:45 -07:00
parent f0d74b60ff
commit 07b42d62ef

View File

@ -4020,10 +4020,18 @@ static void HandleTurnActionSelectionState(void)
{
BtlController_EmitChoosePokemon(BUFFER_A, PARTY_ACTION_CANT_SWITCH, PARTY_SIZE, ABILITY_NONE, gBattleStruct->battlerPartyOrders[gActiveBattler]);
}
#ifdef ITEM_EXPANSION
else if ((i = IsAbilityPreventingEscape(gActiveBattler)
&& ItemId_GetHoldEffect(gBattleMons[gActiveBattler].item) != HOLD_EFFECT_SHED_SHELL))
{
BtlController_EmitChoosePokemon(BUFFER_A, ((i - 1) << 4) | PARTY_ACTION_ABILITY_PREVENTS, PARTY_SIZE, gBattleMons[i - 1].ability, gBattleStruct->battlerPartyOrders[gActiveBattler]);
}
#else
else if ((i = IsAbilityPreventingEscape(gActiveBattler)))
{
BtlController_EmitChoosePokemon(BUFFER_A, ((i - 1) << 4) | PARTY_ACTION_ABILITY_PREVENTS, PARTY_SIZE, gBattleMons[i - 1].ability, gBattleStruct->battlerPartyOrders[gActiveBattler]);
}
#endif
else
{
if (gActiveBattler == 2 && gChosenActionByBattler[0] == B_ACTION_SWITCH)