From c5c521e48c72302b2c9c548b254bd7a7829f1ad1 Mon Sep 17 00:00:00 2001 From: Martha Schilling Date: Sat, 2 Dec 2023 22:19:48 +0000 Subject: [PATCH] Making Giovanni's Room better I've been at this for like 2 hours, I don't care how scuffed this code is, I just wanted to make the entrance to Giovanni's room look smoother and less obvious- --- constants/event_constants.asm | 2 ++ data/maps/objects/ViridianGym.asm | 5 +++-- maps/GiovannisRoom.blk | 2 +- maps/ViridianGym.blk | 2 +- scripts/ViridianGym.asm | 28 ++++++++++++++++++++++++++++ text/ViridianGym.asm | 16 ++++++++++------ 6 files changed, 45 insertions(+), 10 deletions(-) diff --git a/constants/event_constants.asm b/constants/event_constants.asm index 6a8779cf..bbf76e9d 100644 --- a/constants/event_constants.asm +++ b/constants/event_constants.asm @@ -51,6 +51,8 @@ const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_5 const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_6 const EVENT_BEAT_VIRIDIAN_GYM_TRAINER_7 + const_skip 3 + const EVENT_GIOVANNIS_ROOM_DOOR_UNLOCKED ; Pewter City events const_next $68 diff --git a/data/maps/objects/ViridianGym.asm b/data/maps/objects/ViridianGym.asm index df97d37f..983a5c1d 100644 --- a/data/maps/objects/ViridianGym.asm +++ b/data/maps/objects/ViridianGym.asm @@ -4,13 +4,14 @@ ViridianGym_Object: def_warp_events warp_event 16, 17, LAST_MAP, 5 ; front door warp_event 17, 17, LAST_MAP, 5 ; front door - warp_event 4, 2, GIOVANNIS_ROOM, 1 ; stairs + warp_event 2, 0, GIOVANNIS_ROOM, 1 ; stairs + warp_event 3, 0, GIOVANNIS_ROOM, 1 ; stairs def_bg_events def_object_events - object_event 4, 3, SPRITE_GIOVANNI, STAY, DOWN, 1, OPP_GIOVANNI, 3 + object_event 2, 2, SPRITE_GIOVANNI, STAY, DOWN, 1, OPP_GIOVANNI, 3 object_event 12, 7, SPRITE_COOLTRAINER_M, STAY, DOWN, 2, OPP_COOLTRAINER_M, 9 object_event 11, 11, SPRITE_HIKER, STAY, UP, 3, OPP_BLACKBELT, 13 object_event 10, 7, SPRITE_ROCKER, STAY, DOWN, 4, OPP_TAMER, 3 diff --git a/maps/GiovannisRoom.blk b/maps/GiovannisRoom.blk index 6126dde8..2c6712ec 100644 --- a/maps/GiovannisRoom.blk +++ b/maps/GiovannisRoom.blk @@ -1 +1 @@ -............@AABAAAAB..DoF:;F..@+B 55..DwEF GF..DwEF 5'F..DwEF 59..DwEF'..H J55..DF555..DF*+AAB..DGGq^..D SCG5..HIIJ3333J. \ No newline at end of file +............@AABAAAAB..DnF:;F..@+B 55..DwEF GF..DwEF 5'F..DwEF 59..DwEF'..H J55..DF555..DF*+AAB..DGGq^..D SCG5..HIIJ3333J. \ No newline at end of file diff --git a/maps/ViridianGym.blk b/maps/ViridianGym.blk index d6fbf394..9224f6c7 100644 --- a/maps/ViridianGym.blk +++ b/maps/ViridianGym.blk @@ -1 +1 @@ -III_]KMp[qWFF^\KUUKqLRFFFPHH[L@KMLaDKQ`G,XHHHZbCEWFFFY21@AB \ No newline at end of file +IJ_]KLqWFF^\KUKqLRFFFPHH[L@KMLaDKQ`G,XHHHZbCEWFFFY21@AB \ No newline at end of file diff --git a/scripts/ViridianGym.asm b/scripts/ViridianGym.asm index a2ddf0e8..f22e06f3 100644 --- a/scripts/ViridianGym.asm +++ b/scripts/ViridianGym.asm @@ -1,4 +1,5 @@ ViridianGym_Script: + call ViridianGymDoorCallbackScript ld hl, .CityName ld de, .LeaderName call LoadGymLeaderAndCityName @@ -16,6 +17,22 @@ ViridianGym_Script: .LeaderName: db "GIOVANNI@" +ViridianGymDoorCallbackScript: + ld hl, wCurrentMapScriptFlags + bit 5, [hl] + res 5, [hl] + ret z + CheckEvent EVENT_GIOVANNIS_ROOM_DOOR_UNLOCKED + jr z, .blockExitToNextRoom + ld a, $5 + jp .setExitBlock +.blockExitToNextRoom + ld a, $24 +.setExitBlock + ld [wNewTileBlockID], a + lb bc, 0, 1 + predef_jump ReplaceTileBlock + ViridianGymResetScripts: xor a ld [wJoyIgnore], a @@ -29,6 +46,7 @@ ViridianGym_ScriptPointers: dw EndTrainerBattle dw ViridianGymGiovanniPostBattle dw ViridianGymScript4 + dw ViridianGymOpenTheDoor ViridianGymScript0: ld a, [wYCoord] @@ -161,6 +179,15 @@ ViridianGymReceiveTM27: SetEvents EVENT_2ND_ROUTE22_RIVAL_BATTLE, EVENT_ROUTE22_RIVAL_WANTS_BATTLE jp ViridianGymResetScripts +ViridianGymOpenTheDoor: + ld a, SFX_GO_INSIDE + call PlaySound + SetEvent EVENT_GIOVANNIS_ROOM_DOOR_UNLOCKED + ld a, $5 + ld [wNewTileBlockID], a + lb bc, 0, 1 + predef_jump ReplaceTileBlock + ViridianGym_TextPointers: dw GiovanniText dw ViridianGymTrainerText1 @@ -217,6 +244,7 @@ GiovanniText: predef HideObject call UpdateSprites call Delay3 + call ViridianGymOpenTheDoor call GBFadeInFromBlack jr .done .beforeBeat diff --git a/text/ViridianGym.asm b/text/ViridianGym.asm index e4be2242..5544e433 100644 --- a/text/ViridianGym.asm +++ b/text/ViridianGym.asm @@ -2,14 +2,18 @@ _GiovanniPreBattleText:: text "Fwahahaha! This is" line "my hideout!" - para "Once again, you" - line "thwart me!" + para "I planned to" + line "resurrect TEAM" + cont "ROCKET here!" + + para "But once again," + line "you thwart me." cont "So be it! This" cont "time, I'm not" cont "holding back!" para "Once more, you" - line "shall face" + line "shall face me," cont "GIOVANNI, the" cont "greatest trainer!" done @@ -26,13 +30,13 @@ _ReceivedEarthBadgeText:: _GiovanniPostBattleAdviceText:: text "Having lost, I" line "cannot face my" - cont "underlings!" + cont "underlings..." cont "TEAM ROCKET is" cont "finished forever!" para "I will dedicate my" line "life to the study" - cont "of #MON!" + cont "of #MON." para "Let us meet again" line "some day!" @@ -42,7 +46,7 @@ _GiovanniPostBattleAdviceText:: _GiovanniEarthBadgeInfoText:: text "The EARTHBADGE" line "is evidence of" - line "your mastery as a" + cont "your mastery as a" cont "#MON trainer!" para "With it, you can"