mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-19 01:44:20 +01:00
Battle Item Refactor Fixes (#3022)
This commit is contained in:
commit
b972199141
@ -59,9 +59,9 @@ BattleScript_ItemRestoreHP::
|
||||
end
|
||||
|
||||
BattleScript_ItemRestoreHP_SendOutRevivedBattler:
|
||||
switchinanim BS_ATTACKER, FALSE
|
||||
switchinanim BS_SCRIPTING, FALSE
|
||||
waitstate
|
||||
switchineffects BS_ATTACKER
|
||||
switchineffects BS_SCRIPTING
|
||||
end
|
||||
|
||||
BattleScript_ItemCureStatus::
|
||||
|
@ -312,13 +312,10 @@ static void HandleInputChooseAction(void)
|
||||
&& !(gAbsentBattlerFlags & gBitTable[GetBattlerAtPosition(B_POSITION_PLAYER_LEFT)])
|
||||
&& !(gBattleTypeFlags & BATTLE_TYPE_MULTI))
|
||||
{
|
||||
// Return item to bag if partner had selected one.
|
||||
if (gBattleResources->bufferA[gActiveBattler][1] == B_ACTION_USE_ITEM)
|
||||
{
|
||||
// Add item to bag if it is a ball
|
||||
if (itemId <= LAST_BALL)
|
||||
AddBagItem(itemId, 1);
|
||||
else
|
||||
return;
|
||||
AddBagItem(itemId, 1);
|
||||
}
|
||||
PlaySE(SE_SELECT);
|
||||
BtlController_EmitTwoReturnValues(BUFFER_B, B_ACTION_CANCEL_PARTNER, 0);
|
||||
|
@ -16324,7 +16324,7 @@ void BS_CheckParentalBondCounter(void)
|
||||
void BS_GetBattlerSide(void)
|
||||
{
|
||||
NATIVE_ARGS(u8 battler);
|
||||
gBattleCommunication[0] = GetBattlerSide(cmd->battler);
|
||||
gBattleCommunication[0] = GetBattlerSide(GetBattlerForBattleScript(cmd->battler));
|
||||
gBattlescriptCurrInstr = cmd->nextInstr;
|
||||
}
|
||||
|
||||
@ -16500,6 +16500,7 @@ void BS_ItemRestoreHP(void)
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE && battlerId != MAX_BATTLERS_COUNT)
|
||||
{
|
||||
gAbsentBattlerFlags &= ~gBitTable[battlerId];
|
||||
gBattleScripting.battler = battlerId;
|
||||
gBattleCommunication[MULTIUSE_STATE] = TRUE;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user