summaryrefslogtreecommitdiff
path: root/engine/menu/prize_menu.asm
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2015-07-18 20:49:52 -0700
committerYamaArashi <shadow962@live.com>2015-07-18 21:58:55 -0700
commitc169073eed4f0362ef42170098a141a2fcbd71d0 (patch)
treea4f97ff8eff1a9fc80cadc4dba3fe9d088410656 /engine/menu/prize_menu.asm
parentb96ef8d2d495b8c39f703742e8c1965c774fc54f (diff)
misc
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