diff --git a/constants/event_constants.asm b/constants/event_constants.asm index 5539371f..57da1b20 100644 --- a/constants/event_constants.asm +++ b/constants/event_constants.asm @@ -719,7 +719,8 @@ const EVENT_BEAT_SILPH_CO_11F_TRAINER_1 const EVENT_BEAT_OMEGA ; must be here const EVENT_SILPH_CO_11_UNLOCKED_DOOR - const_skip 4 + const_skip 2 + const EVENT_BEAT_CHIEF const EVENT_GOT_MASTER_BALL const_skip const EVENT_BEAT_SILPH_CO_GIOVANNI diff --git a/data/maps/objects/RedsHouse2F.asm b/data/maps/objects/RedsHouse2F.asm index f3f3045f..985261ed 100644 --- a/data/maps/objects/RedsHouse2F.asm +++ b/data/maps/objects/RedsHouse2F.asm @@ -3,7 +3,7 @@ RedsHouse2F_Object: def_warp_events warp_event 7, 1, REDS_HOUSE_1F, 3 - warp_event 5, 1, SILPH_CO_11F, 1 + warp_event 5, 1, SILPH_GAUNTLET_7F, 1 def_bg_events diff --git a/data/maps/objects/SilphGauntlet7F.asm b/data/maps/objects/SilphGauntlet7F.asm index 64b1ce67..1828b48c 100644 --- a/data/maps/objects/SilphGauntlet7F.asm +++ b/data/maps/objects/SilphGauntlet7F.asm @@ -2,9 +2,11 @@ SilphGauntlet7F_Object: db $d ; border block def_warp_events + warp_event 5, 6, SAFFRON_CITY, 1 def_bg_events def_object_events + object_event 5, 1, SPRITE_SILPH_PRESIDENT, STAY, DOWN, 1 ; person def_warps_to SILPH_GAUNTLET_7F diff --git a/data/trainers/parties.asm b/data/trainers/parties.asm index 48f658da..9cf3b47b 100644 --- a/data/trainers/parties.asm +++ b/data/trainers/parties.asm @@ -489,7 +489,7 @@ BirdKeeperData: ChiefData: ; New - this will be used in the Silph Gauntlet - db $FF, 73, MAGNEZONE, 72, LAPRAS, 73, SCIZOR, 73, EXEGGUTOR, 75, PORYGON2, 77, OMEGA, 0 + db $FF, 73, MAGNEZONE, 72, LAPRAS, 73, SCIZOR, 73, PORYGON2, 75, PORYGONZ, 77, OMEGA, 0 ScientistData: ; Unused - this will be used in the Silph Gauntlet diff --git a/data/trainers/pic_pointers_money.asm b/data/trainers/pic_pointers_money.asm index 6c5ee303..9b8b207c 100644 --- a/data/trainers/pic_pointers_money.asm +++ b/data/trainers/pic_pointers_money.asm @@ -32,7 +32,7 @@ TrainerPicAndMoneyPointers:: pic_money BlackbeltPic, 2500 pic_money Rival1Pic, 3500 pic_money ProfOakPic, 9900 - pic_money ChiefPic, 3000 + pic_money ChiefPic, 9900 pic_money ScientistPic, 5000 pic_money GiovanniPic, 9900 pic_money RocketPic, 3000 diff --git a/ram/wram.asm b/ram/wram.asm index 26d4a1ed..62cb8155 100644 --- a/ram/wram.asm +++ b/ram/wram.asm @@ -1998,7 +1998,7 @@ wMtMoonB2FCurScript:: db wSSAnne1FRoomsCurScript:: db wSSAnne2FRoomsCurScript:: db wRoute22CurScript:: db - ds 1 +wSilphGauntlet7FCurScript:: db wRedsHouse2FCurScript:: db wViridianMartCurScript:: db wRoute22GateCurScript:: db diff --git a/scripts/SilphGauntlet7F.asm b/scripts/SilphGauntlet7F.asm index c2b35357..f2150196 100644 --- a/scripts/SilphGauntlet7F.asm +++ b/scripts/SilphGauntlet7F.asm @@ -1,6 +1,113 @@ +; Much of this is a recoded version of the Champion's room, which serves the same purpose. + SilphGauntlet7F_Script: - jp EnableAutoTextBoxDrawing + call EnableAutoTextBoxDrawing + ld hl, SilphGauntlet7F_ScriptPointers + ld a, [wSilphGauntlet7FCurScript] + jp CallFunctionInTable + +ResetChiefScript: + xor a + ld [wJoyIgnore], a + ld [wSilphGauntlet7FCurScript], a + ret + +SilphGauntlet7F_ScriptPointers: + ;dw ChiefScript0 + dw ChiefScript1 + dw ChiefScript2 + dw ChiefScript3 + +ChiefScript0: + ret + +ChiefScript1: + ld a, $ff + ld [wJoyIgnore], a + ld hl, wSimulatedJoypadStatesEnd + ld de, ChiefEntrance_RLEMovement + call DecodeRLEList + dec a + ld [wSimulatedJoypadStatesIndex], a + call StartSimulatingJoypadStates + ld a, $2 + ld [wSilphGauntlet7FCurScript], a + ret + +ChiefEntrance_RLEMovement: + db D_UP, 4 + db -1 ; end + +ChiefScript2: + ld a, [wSimulatedJoypadStatesIndex] + and a + ret nz + call Delay3 + xor a + ld [wJoyIgnore], a + ld hl, wOptions + res 7, [hl] ; Turn on battle animations like with Blue + ld a, $1 + ldh [hSpriteIndexOrTextID], a + call DisplayTextID + call Delay3 + ld hl, wd72d + set 6, [hl] + set 7, [hl] + ld hl, ChiefDefeatedText + ld de, ChiefVictoryText + call SaveEndBattleTextPointers + + ld a, OPP_CHIEF + ld [wCurOpponent], a + ld a, 1 + ld [wTrainerNo], a + ld [wIsTrainerBattle], a + ld a, $1 + + xor a + ldh [hJoyHeld], a + ld a, $3 + ld [wSilphGauntlet7FCurScript], a + ret + +ChiefScript3: + ld a, [wIsInBattle] + cp $ff + jp z, ResetChiefScript + xor a + ld [wIsTrainerBattle], a + call UpdateSprites + SetEvent EVENT_BEAT_CHIEF + ld a, $f0 + ld [wJoyIgnore], a + ld a, $1 + ldh [hSpriteIndexOrTextID], a + call GaryScript_760c8 + ld a, $1 + ldh [hSpriteIndex], a + call SetSpriteMovementBytesToFF + ld a, $4 + ld [wSilphGauntlet7FCurScript], a + ret SilphGauntlet7F_TextPointers: + dw ChiefMonologue + +ChiefMonologue: + text_far _ChiefMonologue + text_end + +ChiefDefeatedText: + text_far _ChiefDefeatedText + text_end + +ChiefVictoryText: + text_far _ChiefVictoryText + text_end + +ChiefAfterBattleText: + text_far _ChiefAfterBattleText + text_end text_end \ No newline at end of file diff --git a/text.asm b/text.asm index e896b32c..5b1a9782 100644 --- a/text.asm +++ b/text.asm @@ -284,6 +284,7 @@ INCLUDE "text/CitrineRocketHouse.asm" INCLUDE "text/CitrineTradebackHouse.asm" INCLUDE "text/tradeback_move_tutor.asm" INCLUDE "text/BrunswickTrail.asm" +INCLUDE "text/SilphGauntlet7F.asm" SECTION "Pokédex Text", ROMX diff --git a/text/SilphGauntlet7F.asm b/text/SilphGauntlet7F.asm new file mode 100644 index 00000000..0bcb118c --- /dev/null +++ b/text/SilphGauntlet7F.asm @@ -0,0 +1,69 @@ +_ChiefMonologue:: + text "!" + line "Congratulations" + cont "for making it" + cont "this far. I'm" + cont "sure it was an" + cont "arduous task." + + para "However, I can't" + line "let you leave" + cont "this place. You" + cont "are still looking" + cont "for the ultimate" + cont "#MON, aren't" + cont "you?" + + para "That MASTER" + line "BALL... I should" + cont "never have given" + cont "it to you! With" + cont "MEWTWO loose and" + cont "GIOVANNI gone," + cont "our company is" + cont "going under! Now" + cont "there is only one" + cont "way to catch" + cont "MEWTWO, and it's" + cont "in your hand!" + + para "! Give me" + line "that BALL!" + prompt + +_ChiefDefeatedText:: + text "No!" + line "I...I..." + prompt + +_ChiefVictoryText:: + text "Ha!" + line "Now hand it over!" + prompt + +_ChiefAfterBattleText:: + text "I suppose the" + line "child to bring" + cont "down GIOVANNI has" + cont "to be stronger" + cont "than me. There is" + cont "no product of mine" + cont "can trounce you." + + para "I wanted to make the" + line "ultimate BALL for a" + cont "perfect POKèMON." + + para "Something we could" + line "mass produce." + + para "Perhaps it wasn't" + line "meant to be..." + + para "Go." + + para "Otherwise..." + line "MEWTWO's hatred will" + cont "crush this world." + + done