diff options
author | pikalaxalt <PikalaxALT@gmail.com> | 2016-05-30 08:58:37 -0400 |
---|---|---|
committer | pikalaxalt <PikalaxALT@gmail.com> | 2016-05-30 08:58:37 -0400 |
commit | 84ac49aadb3c8ccb38f0fbf70a413470fa7ccad2 (patch) | |
tree | dc2cdd2e9783c00fd24daf039e63f7d9e2fcbfe9 | |
parent | a8b3d3612e43cbcc7e1946c5c1a06f9c54c8d311 (diff) |
A couple more map-specific Pikachu functions in Bank 3C
-rw-r--r-- | engine/bank3c.asm | 132 |
1 files changed, 131 insertions, 1 deletions
diff --git a/engine/bank3c.asm b/engine/bank3c.asm index 9274b8b7..5a18d55b 100644 --- a/engine/bank3c.asm +++ b/engine/bank3c.asm @@ -355,7 +355,137 @@ INCLUDE "scripts/museum1f2.asm" INCLUDE "scripts/pewterpokecenter2.asm" Func_f1e22: - dr $f1e22, $f220e + ld hl, PikachuMovementData_f1e2b + ld b, SPRITE_FACING_RIGHT + call Func_f0a82 + ret + +PikachuMovementData_f1e2b: + db $00 + db $1d + db $1f + db $38 + db $3f + +Func_f1e30 + CheckEvent EVENT_GOT_TM18 + jr nz, .asm_f1e54 + ld hl, CeladonMart3Text_f1e5b + call PrintText + lb bc, TM_18, 1 + call GiveItem + jr nc, .asm_f1e4f + SetEvent EVENT_GOT_TM18 + ld hl, CeladonMart3Text_f1e60 + jr .asm_f1e57 + +.asm_f1e4f + ld hl, CeladonMart3Text_f1e6b + jr .asm_f1e57 + +.asm_f1e54 + ld hl, CeladonMart3Text_f1e66 +.asm_f1e57 + call PrintText + ret + +CeladonMart3Text_f1e5b: + TX_FAR _TM18PreReceiveText + db "@" + +CeladonMart3Text_f1e60: + TX_FAR _ReceivedTM18Text + TX_SFX_ITEM + db "@" + +CeladonMart3Text_f1e66: + TX_FAR _TM18ExplanationText + db "@" + +CeladonMart3Text_f1e6b: + TX_FAR _TM18NoRoomText + db "@" + +Func_f1e70: + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld hl, CeladonMansion1Text_f1e96 + call PrintText + callab IsStarterPikachuInOurParty + ret nc + ld hl, CeladonMansionText_f1e9c + call PrintText + ld a, $0 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + call Func_f1ea2 + call PrintText + ret + +CeladonMansion1Text_f1e96: + TX_FAR _CeladonMansion1Text2 + TX_WAIT_BUTTON + db "@" + +CeladonMansionText_f1e9c: + TX_FAR _CeladonMansion1Text6 + TX_BUTTON_SOUND + db "@" + +Func_f1ea2: + ld hl, PikachuHappinessThresholds_f1eb9 +.asm_f1ea5 + ld a, [hli] + inc hl + and a + jr z, .asm_f1eb5 + ld b, a + ld a, [wPikachuHappiness] + cp b + jr c, .asm_f1eb5 + inc hl + inc hl + jr .asm_f1ea5 + +.asm_f1eb5 + ld a, [hli] + ld h, [hl] + ld l, a + ret + +PikachuHappinessThresholds_f1eb9 + dw 51, CeladonMansion1Text_f1ed5 + dw 101, CeladonMansion1Text_f1eda + dw 131, CeladonMansion1Text_f1edf + dw 161, CeladonMansion1Text_f1ee4 + dw 201, CeladonMansion1Text_f1ee9 + dw 255, CeladonMansion1Text_f1eee + dbbw 0, $ff, CeladonMansion1Text_f1eee + +CeladonMansion1Text_f1ed5: + TX_FAR _CeladonMansion1Text7 + db "@" + +CeladonMansion1Text_f1eda: + TX_FAR _CeladonMansion1Text8 + db "@" + +CeladonMansion1Text_f1edf: + TX_FAR _CeladonMansion1Text9 + db "@" + +CeladonMansion1Text_f1ee4: + TX_FAR _CeladonMansion1Text10 + db "@" + +CeladonMansion1Text_f1ee9: + TX_FAR _CeladonMansion1Text11 + db "@" + +CeladonMansion1Text_f1eee: + TX_FAR _CeladonMansion1Text12 + db "@" + + dr $f1ef3, $f220e INCLUDE "data/mapHeaders/beach_house.asm" INCLUDE "scripts/beach_house.asm" |