summaryrefslogtreecommitdiff
path: root/engine/menu/prize_menu.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/menu/prize_menu.asm')
-rwxr-xr-xengine/menu/prize_menu.asm10
1 files changed, 8 insertions, 2 deletions
diff --git a/engine/menu/prize_menu.asm b/engine/menu/prize_menu.asm
index d1fa0c72..b1b751b9 100755
--- a/engine/menu/prize_menu.asm
+++ b/engine/menu/prize_menu.asm
@@ -231,18 +231,24 @@ HandlePrizeChoice: ; 528c6 (14:68c6)
pop af
ld b,a
call GivePokemon
+
+; If either the party or box was full, wait after displaying message.
push af
- ld a,[wccd3] ; XXX is there room?
+ ld a,[wAddedToParty]
and a
call z,WaitForTextScrollButtonPress
pop af
+
+; If the mon couldn't be given to the player (because both the party and box
+; were full), return without subtracting coins.
ret nc
+
.SubtractCoins
call LoadCoinsToSubtract
ld hl,hCoins + 1
ld de,wPlayerCoins + 1
ld c,$02 ; how many bytes
- predef SubBCDPredef ; subtract coins (BCD daa operations)
+ predef SubBCDPredef
jp PrintPrizePrice
.BagFull
ld hl,PrizeRoomBagIsFullTextPtr