diff options
author | pikalaxalt <PikalaxALT@gmail.com> | 2016-05-30 13:59:23 -0400 |
---|---|---|
committer | pikalaxalt <PikalaxALT@gmail.com> | 2016-05-30 13:59:23 -0400 |
commit | 3eae968b305cbc80fa7d09447046001aa0bd39f6 (patch) | |
tree | 7788782f208acfdaedfc622b2011b7d4a5f81321 | |
parent | a06c558e2cfdeb47dc9af0a2ebeb5906802b4c7e (diff) |
Daycare
-rw-r--r-- | data/map_header_banks.asm | 2 | ||||
-rw-r--r-- | data/map_header_pointers.asm | 2 | ||||
-rwxr-xr-x | main.asm | 12 | ||||
-rwxr-xr-x | scripts/daycarem.asm | 29 |
4 files changed, 41 insertions, 4 deletions
diff --git a/data/map_header_banks.asm b/data/map_header_banks.asm index 29f04f55..1d0e53e5 100644 --- a/data/map_header_banks.asm +++ b/data/map_header_banks.asm @@ -72,7 +72,7 @@ MapHeaderBanks:: ; fc3e4 (3f:43e4) db BANK(CeruleanHouseTrashed_h) db BANK(Route5Gate_h) db BANK(UndergroundPathEntranceRoute5_h) - db $15 ; db BANK(DayCareM_h) + db BANK(DayCareM_h) db $07 ; db BANK(Route6Gate_h) db $17 ; db BANK(UndergroundPathEntranceRoute6_h) db $17 ; db BANK(UndergroundPathEntranceRoute6_h) ;FREEZE diff --git a/data/map_header_pointers.asm b/data/map_header_pointers.asm index 792fd1a3..edc33a9a 100644 --- a/data/map_header_pointers.asm +++ b/data/map_header_pointers.asm @@ -72,7 +72,7 @@ MapHeaderPointers:: ; fc1f2 (3f:41f2) dw CeruleanHouseTrashed_h ; copy dw Route5Gate_h dw UndergroundPathEntranceRoute5_h - dw $6233 ; dw DayCareM_h + dw DayCareM_h dw $593b ; dw Route6Gate_h dw $55ee ; dw UndergroundPathEntranceRoute6_h dw $55ee ; dw UndergroundPathEntranceRoute6_h ; unused @@ -1041,7 +1041,10 @@ INCLUDE "data/mapHeaders/route21.asm" INCLUDE "data/mapObjects/route21.asm" Route21Blocks: ; 5507d INCBIN "maps/route21.blk" - dr $5523f,$5525f + +DayCareMBlocks: +INCBIN "maps/daycarem.blk" + dr $5524f,$5525f INCLUDE "engine/battle/experience.asm" @@ -1057,7 +1060,12 @@ INCLUDE "scripts/route19.asm" INCLUDE "scripts/route21.asm" ; vermilion house 2 - dr $56054,$56714 + dr $56054,$56233 + +INCLUDE "data/mapHeaders/daycarem.asm" +INCLUDE "scripts/daycarem.asm" +INCLUDE "data/mapObjects/daycarem.asm" + dr $564a5,$56714 INCLUDE "engine/menu/diploma_1.asm" diff --git a/scripts/daycarem.asm b/scripts/daycarem.asm index 4a46e648..b80b3dac 100755 --- a/scripts/daycarem.asm +++ b/scripts/daycarem.asm @@ -50,11 +50,21 @@ DayCareMText1: ; 56254 (15:6254) ld a, PARTY_TO_DAYCARE ld [wMoveMonType], a call MoveMon + callab IsThisPartymonStarterPikachu + push af xor a ld [wRemoveMonFromBox], a call RemovePokemon + pop af + jr c, .depositedPikachuIntoDayCare ld a, [wcf91] call PlayCry + jr .asm_562e3 + +.depositedPikachuIntoDayCare + ldpikacry e, PikachuCry28 + callab PlayPikachuSoundClip +.asm_562e3 ld hl, DayCareComeSeeMeInAWhileText jp .done @@ -197,8 +207,27 @@ DayCareMText1: ; 56254 (15:6254) ld a, [hl] ld [de], a + ld a, [wPartyCount] + dec a + ld [wWhichPokemon], a + callab IsThisPartymonStarterPikachu + jr c, .withdrewPikachuFromDayCare ld a, [wcf91] call PlayCry + jr .asm_56430 + +.withdrewPikachuFromDayCare + ld a, $6 + ld [wd431], a + + ; GameFreak... TriHard + ld hl, Func_fc4fa + ld b, BANK(Func_fc4fa) + ld hl, Bankswitch + + ldpikacry e, PikachuCry35 + callab PlayPikachuSoundClip +.asm_56430 ld hl, DayCareGotMonBackText jr .done |