aboutsummaryrefslogtreecommitdiffstats
path: root/engine/give_pokemon.asm
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
committerdannye <33dannye@gmail.com>2020-11-04 00:06:44 -0600
commit5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch)
treedde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /engine/give_pokemon.asm
parentMerge pull request #55 from Deokishisu/patch-1 (diff)
downloadpokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.gz
pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.xz
pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.zip
Sync with pokered
Diffstat (limited to 'engine/give_pokemon.asm')
-rwxr-xr-xengine/give_pokemon.asm87
1 files changed, 0 insertions, 87 deletions
diff --git a/engine/give_pokemon.asm b/engine/give_pokemon.asm
deleted file mode 100755
index 6fdca2ef..00000000
--- a/engine/give_pokemon.asm
+++ /dev/null
@@ -1,87 +0,0 @@
-_GivePokemon:
-; returns success in carry
-; and whether the mon was added to the party in [wAddedToParty]
- call EnableAutoTextBoxDrawing
- xor a
- ld [wAddedToParty], a
- ld a, [wPartyCount]
- cp PARTY_LENGTH
- jr c, .addToParty
- ld a, [wNumInBox]
- cp MONS_PER_BOX
- jr nc, .boxFull
-; add to box
- xor a
- ld [wEnemyBattleStatus3], a
- ld a, [wcf91]
- ld [wEnemyMonSpecies2], a
- callab LoadEnemyMonData
- call SetPokedexOwnedFlag
- callab SendNewMonToBox
- ld hl, wcf4b
- ld a, [wCurrentBoxNum]
- and $7f
- cp 9
- jr c, .singleDigitBoxNum
- sub 9
- ld [hl], "1"
- inc hl
- add "0"
- jr .next
-.singleDigitBoxNum
- add "1"
-.next
- ld [hli], a
- ld [hl], "@"
- ld hl, SetToBoxText
- call PrintText
- scf
- ret
-.boxFull
- ld hl, BoxIsFullText
- call PrintText
- and a
- ret
-.addToParty
- call SetPokedexOwnedFlag
- ld hl, UnknownTerminator_f6794
- call PrintText
- call AddPartyMon
- ld a, 1
- ld [wDoNotWaitForButtonPressAfterDisplayingText], a
- ld [wAddedToParty], a
- scf
- ret
-
-SetPokedexOwnedFlag:
- ld a, [wcf91]
- push af
- ld [wd11e], a
- predef IndexToPokedex
- ld a, [wd11e]
- dec a
- ld c, a
- ld hl, wPokedexOwned
- ld b, FLAG_SET
- predef FlagActionPredef
- pop af
- ld [wd11e], a
- call GetMonName
- ld hl, GotMonText
- jp PrintText
-
-UnknownTerminator_f6794:
- db "@"
-
-GotMonText:
- TX_FAR _GotMonText
- TX_SFX_ITEM_1
- db "@"
-
-SetToBoxText:
- TX_FAR _SetToBoxText
- db "@"
-
-BoxIsFullText:
- TX_FAR _BoxIsFullText
- db "@"