diff options
| author | dannye <33dannye@gmail.com> | 2020-11-04 00:06:44 -0600 |
|---|---|---|
| committer | dannye <33dannye@gmail.com> | 2020-11-04 00:06:44 -0600 |
| commit | 5647ca687b92954dcf37a6ea6bfbc9a341c32de4 (patch) | |
| tree | dde1937a1bfdb3a835f4155e1c2eb8f1aaf86f63 /engine/events/oaks_aide.asm | |
| parent | Merge pull request #55 from Deokishisu/patch-1 (diff) | |
| download | pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.gz pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.tar.xz pokeyellow-5647ca687b92954dcf37a6ea6bfbc9a341c32de4.zip | |
Sync with pokered
Diffstat (limited to 'engine/events/oaks_aide.asm')
| -rwxr-xr-x | engine/events/oaks_aide.asm | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/engine/events/oaks_aide.asm b/engine/events/oaks_aide.asm new file mode 100755 index 00000000..f1801f5c --- /dev/null +++ b/engine/events/oaks_aide.asm @@ -0,0 +1,71 @@ +OaksAideScript: + ld hl, OaksAideHiText + call PrintText + call YesNoChoice + ld a, [wCurrentMenuItem] + and a + jr nz, .choseNo + ld hl, wPokedexOwned + ld b, wPokedexOwnedEnd - wPokedexOwned + call CountSetBits + ld a, [wNumSetBits] + ldh [hOaksAideNumMonsOwned], a + ld b, a + ldh a, [hOaksAideRequirement] + cp b + jr z, .giveItem + jr nc, .notEnoughOwnedMons +.giveItem + ld hl, OaksAideHereYouGoText + call PrintText + ldh a, [hOaksAideRewardItem] + ld b, a + ld c, 1 + call GiveItem + jr nc, .bagFull + ld hl, OaksAideGotItemText + call PrintText + ld a, OAKS_AIDE_GOT_ITEM + jr .done +.bagFull + ld hl, OaksAideNoRoomText + call PrintText + xor a ; OAKS_AIDE_BAG_FULL + jr .done +.notEnoughOwnedMons + ld hl, OaksAideUhOhText + call PrintText + ld a, OAKS_AIDE_NOT_ENOUGH_MONS + jr .done +.choseNo + ld hl, OaksAideComeBackText + call PrintText + ld a, OAKS_AIDE_REFUSED +.done + ldh [hOaksAideResult], a + ret + +OaksAideHiText: + text_far _OaksAideHiText + text_end + +OaksAideUhOhText: + text_far _OaksAideUhOhText + text_end + +OaksAideComeBackText: + text_far _OaksAideComeBackText + text_end + +OaksAideHereYouGoText: + text_far _OaksAideHereYouGoText + text_end + +OaksAideGotItemText: + text_far _OaksAideGotItemText + sound_get_item_1 + text_end + +OaksAideNoRoomText: + text_far _OaksAideNoRoomText + text_end |
