diff --git a/constants/event_constants.asm b/constants/event_constants.asm index af2d3d8b..3cc3bd9f 100644 --- a/constants/event_constants.asm +++ b/constants/event_constants.asm @@ -551,10 +551,11 @@ ; S.S. Anne events const_next $5C0 - const_skip - const EVENT_ENCOUNTERED_MEW - const EVENT_FOUND_MEW - const_skip + const_skip 4 + ; const_skip + ; const EVENT_ENCOUNTERED_MEW + ; const EVENT_FOUND_MEW + ; const_skip const EVENT_BEAT_SS_ANNE_5_TRAINER_0 const EVENT_BEAT_SS_ANNE_5_TRAINER_1 const_skip 26 @@ -591,9 +592,9 @@ const_skip 7 const EVENT_BEAT_MOLTRES const_skip 7 - const EVENT_BEAT_OMEGA + const EVENT_BEAT_OMEGA -; Celadon University + salesman events +; Celadon University, Salesman const_next $640 const_skip const_skip @@ -603,6 +604,11 @@ const EVENT_BEAT_CELADON_UNIVERSITY_OUTSIDE_TRAINER_3 const EVENT_BOUGHT_CUBONE const EVENT_BOUGHT_DITTO + +; , Faraway Island + const_next $650 + const_skip + const EVENT_BEAT_MEW ; Victory Road 3F events const_next $660 diff --git a/constants/item_constants.asm b/constants/item_constants.asm index 2ce47fd1..bafe7c78 100644 --- a/constants/item_constants.asm +++ b/constants/item_constants.asm @@ -115,6 +115,7 @@ DEF NUM_ITEMS EQU const_value - 1 const BLK_AUGURITE ; $65 const DUBIOUS_DISC ; $66 const CITRINE_PASS ; $67 + const OLDSEACHART ; $68 DEF NUM_FLOORS EQU const_value - 1 - NUM_ITEMS const_next $C4 diff --git a/data/items/key_items.asm b/data/items/key_items.asm index d17c9983..f7d27c8c 100644 --- a/data/items/key_items.asm +++ b/data/items/key_items.asm @@ -103,4 +103,5 @@ KeyItemFlags: dbit FALSE ; BLK_AUGURITE dbit FALSE ; DUBIOUS_DISC dbit TRUE ; CITRINE_PASS + dbit TRUE ; OLDSEACHART end_bit_array NUM_ITEMS + NUM_FLOORS diff --git a/data/items/names.asm b/data/items/names.asm index c1bd912b..1b499b6f 100644 --- a/data/items/names.asm +++ b/data/items/names.asm @@ -104,4 +104,5 @@ ItemNames:: li "BLK AUGURITE" li "DUBIOUS DISC" li "CITRINE PASS" + li "OLDSEACHART" assert_list_length NUM_ITEMS + NUM_FLOORS diff --git a/data/items/prices.asm b/data/items/prices.asm index 167e82ce..73f6d4f5 100644 --- a/data/items/prices.asm +++ b/data/items/prices.asm @@ -104,4 +104,5 @@ ItemPrices:: bcd3 2100 ; BLK_AUGURITE bcd3 3000 ; DUBIOUS_DISC bcd3 0 ; CITRINE_PASS + bcd3 0 ; OLDSEACHART assert_table_length NUM_ITEMS + NUM_FLOORS diff --git a/data/maps/hide_show_data.asm b/data/maps/hide_show_data.asm index 0cc1576d..0bef5aa0 100644 --- a/data/maps/hide_show_data.asm +++ b/data/maps/hide_show_data.asm @@ -97,7 +97,8 @@ MapHSPointers: dw NoHS dw NoHS dw NoHS - dw VermilionDockHS + dw VermilionDockHS ; may not be necessary now? old sea chart tho. + ; dw NoHS swap if you need to remove the vermillion dock bit dw NoHS dw SSAnne2FHS dw NoHS @@ -117,7 +118,7 @@ MapHSPointers: dw NoHS dw NoHS dw NoHS - dw NoHS + dw FarawayIslandInsideHS dw NoHS dw NoHS dw NoHS @@ -568,7 +569,10 @@ SeafoamIslandsB4FHS: db SEAFOAM_ISLANDS_B4F, $01, HIDE db SEAFOAM_ISLANDS_B4F, $02, HIDE db SEAFOAM_ISLANDS_B4F, $03, SHOW -VermilionDockHS: - db VERMILION_DOCK, $01, HIDE - db $FF, $01, SHOW ; end +VermilionDockHS: ; unsure if necessary + db VERMILION_DOCK, $01, SHOW + ;db $FF, $01, SHOW ; end +FarawayIslandInsideHS: + db FARAWAY_ISLAND_INSIDE, $01, HIDE ; if mew is fucking up this is why + assert_table_length NUM_HS_OBJECTS + 1 diff --git a/data/maps/objects/FarawayIslandInside.asm b/data/maps/objects/FarawayIslandInside.asm index 38adbcc4..4ea5c277 100644 --- a/data/maps/objects/FarawayIslandInside.asm +++ b/data/maps/objects/FarawayIslandInside.asm @@ -6,6 +6,7 @@ FarawayIslandInside_Object: warp_event 15, 21, 0, FARAWAY_ISLAND_OUTSIDE def_bg_events + object_event 14, 10, SPRITE_MONSTER, STAY, DOWN, 1, MEW, 50 | OW_POKEMON def_object_events diff --git a/data/maps/objects/VermilionDock.asm b/data/maps/objects/VermilionDock.asm index d8e931df..80d6c23f 100644 --- a/data/maps/objects/VermilionDock.asm +++ b/data/maps/objects/VermilionDock.asm @@ -8,6 +8,7 @@ VermilionDock_Object: def_bg_events def_object_events - object_event 21, 0, SPRITE_MONSTER, STAY, DOWN, 2, MEW, 30 | OW_POKEMON + object_event 22, 0, SPRITE_POKE_BALL, STAY, NONE, 2, OLDSEACHART + ; object_event 21, 0, SPRITE_MONSTER, STAY, DOWN, 2, MEW, 30 | OW_POKEMON def_warps_to VERMILION_DOCK diff --git a/data/wild/grass_water.asm b/data/wild/grass_water.asm index 1d774467..8a86d79d 100644 --- a/data/wild/grass_water.asm +++ b/data/wild/grass_water.asm @@ -114,7 +114,7 @@ WildDataPointers: dw Gauntlet6FWildMons dw NothingWildMons dw NothingWildMons - dw NothingWildMons + dw FarawayIslandInsideMons ; I think this is right?? dw NothingWildMons dw NothingWildMons dw NothingWildMons @@ -328,3 +328,4 @@ INCLUDE "data/wild/maps/SilphGauntlet3F.asm" INCLUDE "data/wild/maps/SilphGauntlet4F.asm" INCLUDE "data/wild/maps/SilphGauntlet5F.asm" INCLUDE "data/wild/maps/SilphGauntlet6F.asm" +INCLUDE "data/wild/maps/FarawayIslandInside.asm" \ No newline at end of file diff --git a/data/wild/maps/FarawayIslandInside.asm b/data/wild/maps/FarawayIslandInside.asm new file mode 100644 index 00000000..3a66eb06 --- /dev/null +++ b/data/wild/maps/FarawayIslandInside.asm @@ -0,0 +1,26 @@ +FarawayIslandInsideMons: + def_grass_wildmons 10 ; encounter rate + db 30, EEVEE + db 30, EEVEE + db 30, EEVEE + db 30, EEVEE + db 30, EEVEE + db 30, EEVEE + db 30, EEVEE + db 30, EEVEE + db 30, EEVEE + db 30, EEVEE + end_grass_wildmons + + def_water_wildmons 10 ; encounter rate + db 30, MAGIKARP + db 30, MAGIKARP + db 30, MAGIKARP + db 30, MAGIKARP + db 30, MAGIKARP + db 30, MAGIKARP + db 30, MAGIKARP + db 30, MAGIKARP + db 30, MAGIKARP + db 30, MAGIKARP + end_water_wildmons \ No newline at end of file diff --git a/data/wild/super_rod.asm b/data/wild/super_rod.asm index fc7d4ef9..88aa1480 100644 --- a/data/wild/super_rod.asm +++ b/data/wild/super_rod.asm @@ -37,6 +37,7 @@ SuperRodData: dbw SILPH_GAUNTLET_5F, .Group10 dbw ROCK_TUNNEL_1F, .Group5 dbw CELADON_UNIVERSITY_OUTSIDE, .Group11 + dbw FARAWAY_ISLAND_INSIDE, .Group7 db -1 ; end ; fishing groups diff --git a/engine/debug/debug_party.asm b/engine/debug/debug_party.asm index 4117552f..9a0ecc28 100644 --- a/engine/debug/debug_party.asm +++ b/engine/debug/debug_party.asm @@ -154,6 +154,7 @@ DebugItemsList: db COIN_CASE, 1 db POKE_FLUTE, 1 db SILPH_SCOPE, 1 + ; db OLDSEACHART, 1 db -1 ; end DebugUnusedList: diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm index 67bd6943..c9baa2aa 100644 --- a/engine/items/item_effects.asm +++ b/engine/items/item_effects.asm @@ -120,6 +120,7 @@ ItemUsePtrTable: dw ItemUseEvoStone ; BLK_AUGURITE dw ItemUseEvoStone ; DUBIOUS_DISC dw UnusableItem ; CITRINE_PASS + dw UnusableItem ; OLDSEACHART ItemUseBall: diff --git a/ram/wram.asm b/ram/wram.asm index 001624c0..53fe0f7d 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -2031,7 +2031,7 @@ wBrunosRoomCurScript:: db wAgathasRoomCurScript:: db wCeruleanCaveB1FCurScript:: db wVictoryRoad1FCurScript:: db - ds 1 +wFarawayIslandInsideCurScript:: db ; this should work wLancesRoomCurScript:: db ds 4 wSilphCo10FCurScript:: db diff --git a/scripts/FarawayIslandInside.asm b/scripts/FarawayIslandInside.asm index 028f5202..a1d2d2c7 100644 --- a/scripts/FarawayIslandInside.asm +++ b/scripts/FarawayIslandInside.asm @@ -1,6 +1,38 @@ FarawayIslandInside_Script: - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ld hl, FarawayIslandInsideTrainerHeaders + ld de, FarawayIslandInside_ScriptPointers + ld a, [wFarawayIslandInsideCurScript] + call ExecuteCurMapScriptInTable + ld [wFarawayIslandInsideCurScript], a + ret + +FarawayIslandInside_ScriptPointers: + dw CheckFightingMapTrainers + dw DisplayEnemyTrainerTextAndStartBattle + dw EndTrainerBattle FarawayIslandInside_TextPointers: + dw FarawayIslandInsideText2 + +FarawayIslandInsideTrainerHeaders: + def_trainers +MewTrainerHeader: + trainer EVENT_BEAT_MEW, 0, MewBattleText, MewBattleText, MewBattleText + db -1 ; end + +FarawayIslandInsideText2: + text_asm + ld hl, MewTrainerHeader + call TalkToTrainer + jp TextScriptEnd + +MewBattleText: + text_far _MewtwoBattleText ; Mew! + text_asm + ld a, MEW + call PlayCry + call WaitForSoundToFinish + jp TextScriptEnd text_end ; unused diff --git a/scripts/VermilionDock.asm b/scripts/VermilionDock.asm index b8d4152d..52f548ff 100644 --- a/scripts/VermilionDock.asm +++ b/scripts/VermilionDock.asm @@ -1,9 +1,9 @@ VermilionDock_Script: call EnableAutoTextBoxDrawing - ld hl, VermilionDockTrainerHeaders + ;ld hl, VermilionDockTrainerHeaders ld de, VermilionDock_ScriptPointers call ExecuteCurMapScriptInTable - call TruckCheck + ;call TruckCheck CheckEventHL EVENT_STARTED_WALKING_OUT_OF_DOCK jr nz, .asm_1db8d CheckEventReuseHL EVENT_GOT_HM01 @@ -222,7 +222,8 @@ VermilionDock_EraseSSAnne: VermilionDock_TextPointers: dw VermilionDockText1 - dw VermilionDockText2 + dw PickUpItemText + ;dw VermilionDockText2 VermilionDockText1: text_far _VermilionDockText1 @@ -230,165 +231,165 @@ VermilionDockText1: ; this massive new set of scripts allows the truck to be pushed with Strength. Credit to Vortyne's pureRGB hack for figuring this out! -VermilionDockTrainerHeaders: - def_trainers -MewTrainerHeader: - trainer EVENT_ENCOUNTERED_MEW, 0, MewBattleText, MewBattleText, MewBattleText - db -1 ; end +;VermilionDockTrainerHeaders: +; def_trainers +;MewTrainerHeader: +; trainer EVENT_ENCOUNTERED_MEW, 0, MewBattleText, MewBattleText, MewBattleText +; db -1 ; end -VermilionDockText2: - text_asm - ld hl, MewTrainerHeader - call TalkToTrainer - jp TextScriptEnd +;VermilionDockText2: +; text_asm +; ld hl, MewTrainerHeader +; call TalkToTrainer +; jp TextScriptEnd -MewBattleText: - text_far _MewtwoBattleText ; Mew! - text_asm - ld a, MEW - call PlayCry - call WaitForSoundToFinish - jp TextScriptEnd +;MewBattleText: +; text_far _MewtwoBattleText ; Mew! +; text_asm +; ld a, MEW +; call PlayCry +; call WaitForSoundToFinish +; jp TextScriptEnd -TruckOAMTable: - db $50, $28, $C0, $10 - db $50, $30, $C1, $10 - db $50, $38, $C2, $10 - db $50, $40, $C3, $10 - db $58, $28, $C4, $10 - db $58, $30, $C5, $10 - db $58, $38, $C6, $10 - db $58, $40, $C7, $10 +;TruckOAMTable: +; db $50, $28, $C0, $10 +; db $50, $30, $C1, $10 +; db $50, $38, $C2, $10 +; db $50, $40, $C3, $10 +; db $58, $28, $C4, $10 +; db $58, $30, $C5, $10 +; db $58, $38, $C6, $10 +; db $58, $40, $C7, $10 -RedLeftOAMTable: - db $8,$0,$9,$0 - db $a,$2,$b,$3 +;RedLeftOAMTable: +; db $8,$0,$9,$0 +; db $a,$2,$b,$3 -TruckSpriteGFX: INCBIN "gfx/sprites/truck_sprite.2bpp" +;TruckSpriteGFX: INCBIN "gfx/sprites/truck_sprite.2bpp" -TruckCheck: - CheckEventHL EVENT_FOUND_MEW - jp nz, ChangeTruckTile - ld c, HS_MEW - ld b, $2 - ld hl, wMissableObjectFlags - predef FlagActionPredef - ld a, c - and a - jr nz, .skiphidingmew - ld a, HS_MEW - ld [wMissableObjectIndex], a - predef HideObject -.skiphidingmew - ld a, [wd728] - bit 0, a ; using Strength? - ret z - ; the position for moving truck is $00, $15 - ld hl, wYCoord - ld a, [hli] - and a - ret nz - ld a, [hl] - cp $16 - ret nz - ; if the player is trying to walk left - ld a, [wPlayerDirection] - cp 2 - ret nz +;TruckCheck: +; CheckEventHL EVENT_FOUND_MEW +; jp nz, ChangeTruckTile +; ld c, HS_MEW +; ld b, $2 +; ld hl, wMissableObjectFlags +; predef FlagActionPredef +; ld a, c +; and a +; jr nz, .skiphidingmew +; ld a, HS_MEW +; ld [wMissableObjectIndex], a +; predef HideObject +;.skiphidingmew +; ld a, [wd728] +; bit 0, a ; using Strength? +; ret z +; ; the position for moving truck is $00, $15 +; ld hl, wYCoord +; ld a, [hli] +; and a +; ret nz +; ld a, [hl] +; cp $16 +; ret nz +; ; if the player is trying to walk left +; ld a, [wPlayerDirection] +; cp 2 +; ret nz - xor a - ld [$ff8c], a - ld a, $8 - ld [$ff8d], a - call SetSpriteFacingDirection - ld a, $ff - ld [wJoyIgnore], a - ld [wUpdateSpritesEnabled], a - xor a - ld bc, $4c48 - ld de, RedLeftOAMTable - call WriteOAMBlock - ld bc, (Bank(TruckSpriteGFX) << 8) | 8 - ld hl, vChars1 + $400 - ld de, TruckSpriteGFX - call CopyVideoData - ld hl, TruckOAMTable - ld bc, $20 - ld de, wShadowOAM + $20 - call CopyData - ld a, $c - ld [wNewTileBlockID], a ; used to be wd09f - ld bc, $a - predef ReplaceTileBlock - ; moving the truck - ld a, SFX_PUSH_BOULDER - call PlaySound - ld b, 32 - ld de, 4 -.movingtruck - ld hl, wShadowOAM + $21 - ld a, 8 -.movingtruck2 - dec [hl] - add hl, de - dec a - jr nz, .movingtruck2 - ld c, 2 - call DelayFrames - dec b - jr nz, .movingtruck - ld a, $3 - ld [wNewTileBlockID], a ; used to be wd09f - ld bc, $9 - predef ReplaceTileBlock - call ShowMew - jp FinishShowMew - ; show mew and print its dialogue -ShowMew: - ld a, 1 - ld [wUpdateSpritesEnabled], a - ld a, HS_MEW - ld [wMissableObjectIndex], a - predef ShowObject - ret -FinishShowMew: - ld c, 60 - call DelayFrames - xor a - ld [wJoyIgnore], a - SetEvent EVENT_FOUND_MEW - ret +; xor a +; ld [$ff8c], a +; ld a, $8 +; ld [$ff8d], a +; call SetSpriteFacingDirection +; ld a, $ff +; ld [wJoyIgnore], a +; ld [wUpdateSpritesEnabled], a +; xor a +; ld bc, $4c48 +; ld de, RedLeftOAMTable +; call WriteOAMBlock +; ld bc, (Bank(TruckSpriteGFX) << 8) | 8 +; ld hl, vChars1 + $400 +; ld de, TruckSpriteGFX +; call CopyVideoData +; ld hl, TruckOAMTable +; ld bc, $20 +; ld de, wShadowOAM + $20 +; call CopyData +; ld a, $c +; ld [wNewTileBlockID], a ; used to be wd09f +; ld bc, $a +; predef ReplaceTileBlock +; ; moving the truck +; ld a, SFX_PUSH_BOULDER +; call PlaySound +; ld b, 32 +; ld de, 4 +;.movingtruck +; ld hl, wShadowOAM + $21 +; ld a, 8 +;.movingtruck2 +; dec [hl] +; add hl, de +; dec a +; jr nz, .movingtruck2 +; ld c, 2 +; call DelayFrames +; dec b +; jr nz, .movingtruck +; ld a, $3 +; ld [wNewTileBlockID], a ; used to be wd09f +; ld bc, $9 +; predef ReplaceTileBlock +; call ShowMew +; jp FinishShowMew +; ; show mew and print its dialogue +;ShowMew: +; ld a, 1 +; ld [wUpdateSpritesEnabled], a +; ld a, HS_MEW +; ld [wMissableObjectIndex], a +; predef ShowObject +; ret +;FinishShowMew: +; ld c, 60 +; call DelayFrames +; xor a +; ld [wJoyIgnore], a +; SetEvent EVENT_FOUND_MEW +; ret -ChangeTruckTile: - ld bc, $9 - call GetOWCoord - ld a, [hl] - cp $3 - ret z - ld a, $3 - ld [hli], a - ld a, $c - ld [hl], a - CheckEvent EVENT_ENCOUNTERED_MEW - call z, ShowMew - jpfar RedrawMapView - -GetOWCoord: - ld hl, wOverworldMap + 2 - ld a, [wCurMapWidth] - add $6 - ld e, a - ld d, $0 - add hl, de - add hl, de - inc b - inc c -.bloop - add hl, de - dec b - jr nz, .bloop -.cloop - inc hl - dec c - jr nz, .cloop - ret +;ChangeTruckTile: +; ld bc, $9 +; call GetOWCoord +; ld a, [hl] +; cp $3 +; ret z +; ld a, $3 +; ld [hli], a +; ld a, $c +; ld [hl], a +; CheckEvent EVENT_ENCOUNTERED_MEW +; call z, ShowMew +; jpfar RedrawMapView +; +;GetOWCoord: +; ld hl, wOverworldMap + 2 +; ld a, [wCurMapWidth] +; add $6 +; ld e, a +; ld d, $0 +; add hl, de +; add hl, de +; inc b +; inc c +;.bloop +; add hl, de +; dec b +; jr nz, .bloop +;.cloop +; inc hl +; dec c +; jr nz, .cloop +; ret diff --git a/text.asm b/text.asm index eff201e8..2bd4a5e8 100644 --- a/text.asm +++ b/text.asm @@ -276,7 +276,6 @@ INCLUDE "text/CeladonUniversityInside.asm" INCLUDE "text/CeladonUniversityPokecenter.asm" INCLUDE "text/CinnabarVolcano.asm" INCLUDE "text/FarawayIslandOutside.asm" -INCLUDE "text/FarawayIslandInside.asm" SECTION "Pokédex Text", ROMX diff --git a/text/FarawayIslandInside.asm b/text/FarawayIslandInside.asm deleted file mode 100644 index a5aca307..00000000 --- a/text/FarawayIslandInside.asm +++ /dev/null @@ -1,4 +0,0 @@ -_FarawayIslandMew:: - text "Mew!" - - done \ No newline at end of file