summaryrefslogtreecommitdiff
path: root/engine/menu/prize_menu.asm
diff options
context:
space:
mode:
authordannye <corrnondacqb@yahoo.com>2015-07-19 03:52:20 -0500
committerdannye <corrnondacqb@yahoo.com>2015-07-19 03:52:20 -0500
commit64b4cf624fe2175e2c7539b91bc41b6dae28a00e (patch)
tree971ea955f5d40af7612f7b69029b49db98064690 /engine/menu/prize_menu.asm
parentea9cc86949cecc3508aeac06b807372b6b0134d8 (diff)
parentd0526c036210d2ee186a2a45feac91747ef6fb85 (diff)
Merge branch 'master' of https://github.com/YamaArashi/pokered
Conflicts: engine/evos_moves.asm engine/overworld/healing_machine.asm
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