mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-19 09:54:19 +01:00
fixed dupe strings in battle item use
This commit is contained in:
parent
2eabcea86e
commit
82dc1e3e93
@ -49,14 +49,13 @@ BattleScript_UseItemMessage:
|
||||
BattleScript_ItemRestoreHP::
|
||||
call BattleScript_UseItemMessage
|
||||
itemrestorehp
|
||||
printstring STRINGID_ITEMRESTOREDSPECIESHEALTH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
jumpifbyte CMP_EQUAL, gBattleCommunication, TRUE, BattleScript_ItemRestoreHP_SendOutRevivedBattler
|
||||
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
updatestatusicon BS_ATTACKER
|
||||
printstring STRINGID_ITEMRESTOREDSPECIESHEALTH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end
|
||||
|
||||
BattleScript_ItemRestoreHP_SendOutRevivedBattler:
|
||||
@ -68,22 +67,22 @@ BattleScript_ItemRestoreHP_SendOutRevivedBattler:
|
||||
BattleScript_ItemCureStatus::
|
||||
call BattleScript_UseItemMessage
|
||||
itemcurestatus
|
||||
updatestatusicon BS_ATTACKER
|
||||
printstring STRINGID_ITEMCUREDSPECIESSTATUS
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
updatestatusicon BS_ATTACKER
|
||||
end
|
||||
|
||||
BattleScript_ItemHealAndCureStatus::
|
||||
call BattleScript_UseItemMessage
|
||||
itemrestorehp
|
||||
curestatus BS_ATTACKER
|
||||
printstring STRINGID_ITEMRESTOREDSPECIESHEALTH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
updatestatusicon BS_ATTACKER
|
||||
printstring STRINGID_ITEMRESTOREDSPECIESHEALTH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
end
|
||||
|
||||
BattleScript_ItemIncreaseStat::
|
||||
@ -256,3 +255,4 @@ BattleScript_TrainerBSlideMsgRet::
|
||||
BattleScript_TrainerBSlideMsgEnd2::
|
||||
call BattleScript_TrainerBSlideMsgRet
|
||||
end2
|
||||
end2
|
||||
|
@ -1229,10 +1229,11 @@ void ItemUseInBattle_BagMenu(u8 taskId)
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
RemoveUsedItem();
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
if (!InBattlePyramid())
|
||||
DisplayItemMessage(taskId, FONT_NORMAL, gStringVar4, Task_FadeAndCloseBagMenu);
|
||||
gTasks[taskId].func = Task_FadeAndCloseBagMenu;
|
||||
else
|
||||
DisplayItemMessageInBattlePyramid(taskId, gStringVar4, CloseBattlePyramidBag);
|
||||
gTasks[taskId].func = CloseBattlePyramidBag;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4470,11 +4470,8 @@ void ItemUseCB_BattleScript(u8 taskId, TaskFunc task)
|
||||
gBattleStruct->itemPartyIndex[gBattlerInMenuId] = GetPartyIdFromBattleSlot(gPartyMenu.slotId);
|
||||
gPartyMenuUseExitCallback = TRUE;
|
||||
PlaySE(SE_SELECT);
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PlayerUsedVar2);
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = task;
|
||||
}
|
||||
}
|
||||
@ -4943,9 +4940,6 @@ static void TryUseItemOnMove(u8 taskId)
|
||||
gChosenMovePos = ptr->data1;
|
||||
gPartyMenuUseExitCallback = TRUE;
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
||||
StringExpandPlaceholders(gStringVar4, gText_PlayerUsedVar2);
|
||||
DisplayPartyMenuMessage(gStringVar4, TRUE);
|
||||
ScheduleBgCopyTilemapToVram(2);
|
||||
gTasks[taskId].func = Task_ClosePartyMenuAfterText;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user