diff options
| author | YamaArashi <shadow962@live.com> | 2015-07-18 20:49:52 -0700 |
|---|---|---|
| committer | YamaArashi <shadow962@live.com> | 2015-07-18 21:58:55 -0700 |
| commit | c169073eed4f0362ef42170098a141a2fcbd71d0 (patch) | |
| tree | a4f97ff8eff1a9fc80cadc4dba3fe9d088410656 /engine/give_pokemon.asm | |
| parent | A few missed TX_ASM (diff) | |
| download | pokeyellow-c169073eed4f0362ef42170098a141a2fcbd71d0.tar.gz pokeyellow-c169073eed4f0362ef42170098a141a2fcbd71d0.tar.xz pokeyellow-c169073eed4f0362ef42170098a141a2fcbd71d0.zip | |
misc
Diffstat (limited to 'engine/give_pokemon.asm')
| -rwxr-xr-x | engine/give_pokemon.asm | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm index 45e88b9c..4b45631d 100755 --- a/engine/give_pokemon.asm +++ b/engine/give_pokemon.asm @@ -1,13 +1,16 @@ _GivePokemon: ; 4fda5 (13:7da5) +; returns success in carry +; and whether the mon was added to the party in [wAddedToParty] call EnableAutoTextBoxDrawing xor a - ld [wccd3], a + ld [wAddedToParty], a ld a, [wPartyCount] cp PARTY_LENGTH - jr c, .asm_4fe01 + jr c, .addToParty ld a, [W_NUMINBOX] cp MONS_PER_BOX - jr nc, .asm_4fdf9 + jr nc, .boxFull +; add to box xor a ld [W_ENEMYBATTSTATUS3], a ld a, [wcf91] @@ -19,32 +22,32 @@ _GivePokemon: ; 4fda5 (13:7da5) ld a, [wCurrentBoxNum] and $7f cp 9 - jr c, .asm_4fdec + jr c, .singleDigitBoxNum sub 9 ld [hl], "1" inc hl add "0" - jr .asm_4fdee -.asm_4fdec + jr .next +.singleDigitBoxNum add "1" -.asm_4fdee +.next ld [hli], a ld [hl], "@" ld hl, SetToBoxText call PrintText scf ret -.asm_4fdf9 +.boxFull ld hl, BoxIsFullText call PrintText and a ret -.asm_4fe01 +.addToParty call SetPokedexOwnedFlag call AddPartyMon - ld a, $1 + ld a, 1 ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld [wccd3], a + ld [wAddedToParty], a scf ret |
