2019-01-01 20:06:23 +00:00
|
|
|
CeruleanCity_Script:
|
2014-05-18 18:19:10 +00:00
|
|
|
call EnableAutoTextBoxDrawing
|
2019-01-01 20:06:23 +00:00
|
|
|
ld hl, CeruleanCity_ScriptPointers
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wCeruleanCityCurScript]
|
2014-05-18 18:19:10 +00:00
|
|
|
jp CallFunctionInTable
|
|
|
|
|
2023-11-19 00:44:03 +00:00
|
|
|
CeruleanCityClearScripts:
|
2023-07-14 01:27:56 +00:00
|
|
|
xor a ; SCRIPT_CERULEANCITY_DEFAULT
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCeruleanCityCurScript], a
|
2014-09-25 23:21:49 +00:00
|
|
|
ld a, HS_CERULEAN_RIVAL
|
2015-07-25 03:27:59 +00:00
|
|
|
ld [wMissableObjectIndex], a
|
2014-06-16 20:57:26 +00:00
|
|
|
predef_jump HideObject
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
CeruleanCity_ScriptPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_script_pointers
|
|
|
|
dw_const CeruleanCityDefaultScript, SCRIPT_CERULEANCITY_DEFAULT
|
|
|
|
dw_const CeruleanCityRivalBattleScript, SCRIPT_CERULEANCITY_RIVAL_BATTLE
|
|
|
|
dw_const CeruleanCityRivalDefeatedScript, SCRIPT_CERULEANCITY_RIVAL_DEFEATED
|
|
|
|
dw_const CeruleanCityRivalCleanupScript, SCRIPT_CERULEANCITY_RIVAL_CLEANUP
|
|
|
|
dw_const CeruleanCityRocketDefeatedScript, SCRIPT_CERULEANCITY_ROCKET_DEFEATED
|
|
|
|
|
|
|
|
CeruleanCityRocketDefeatedScript:
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wIsInBattle]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $ff
|
2023-11-19 00:44:03 +00:00
|
|
|
jp z, CeruleanCityClearScripts
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, TEXT_CERULEANCITY_ROCKET
|
2024-09-19 01:01:18 +00:00
|
|
|
ldh [hTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
2023-07-14 01:27:56 +00:00
|
|
|
xor a ; SCRIPT_CERULEANCITY_DEFAULT
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCeruleanCityCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityDefaultScript:
|
2020-07-15 17:35:39 +00:00
|
|
|
IF DEF(_DEBUG)
|
|
|
|
call DebugPressedOrHeldB
|
|
|
|
ret nz
|
|
|
|
ENDC
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF
|
2021-05-31 15:41:36 +00:00
|
|
|
jr nz, .skipRocketThiefEncounter
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, CeruleanCityCoords1
|
|
|
|
call ArePlayerCoordsInArray
|
2021-05-31 15:41:36 +00:00
|
|
|
jr nc, .skipRocketThiefEncounter
|
2015-07-19 03:49:52 +00:00
|
|
|
ld a, [wCoordIndex]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $1
|
2015-07-20 00:52:26 +00:00
|
|
|
ld a, PLAYER_DIR_UP
|
2015-07-17 07:52:25 +00:00
|
|
|
ld b, SPRITE_FACING_DOWN
|
2021-05-31 15:41:36 +00:00
|
|
|
jr nz, .playerBelowRocketThief
|
2015-07-20 00:52:26 +00:00
|
|
|
ld a, PLAYER_DIR_DOWN
|
2015-07-17 07:52:25 +00:00
|
|
|
ld b, SPRITE_FACING_UP
|
2021-05-31 15:41:36 +00:00
|
|
|
.playerBelowRocketThief
|
2015-07-20 00:52:26 +00:00
|
|
|
ld [wPlayerMovingDirection], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, b
|
2020-07-05 21:29:11 +00:00
|
|
|
ld [wSprite02StateData1FacingDirection], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call Delay3
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, TEXT_CERULEANCITY_ROCKET
|
2024-09-19 01:01:18 +00:00
|
|
|
ldh [hTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
jp DisplayTextID
|
2021-05-31 15:41:36 +00:00
|
|
|
.skipRocketThiefEncounter
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_BEAT_CERULEAN_RIVAL
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
|
|
|
ld hl, CeruleanCityCoords2
|
|
|
|
call ArePlayerCoordsInArray
|
|
|
|
ret nc
|
2014-09-13 07:50:56 +00:00
|
|
|
ld a, [wWalkBikeSurfState]
|
2014-05-18 18:19:10 +00:00
|
|
|
and a
|
2021-05-31 15:41:36 +00:00
|
|
|
jr z, .walking
|
2020-07-03 20:37:47 +00:00
|
|
|
ld a, SFX_STOP_ALL_MUSIC
|
2015-08-09 05:32:44 +00:00
|
|
|
ld [wNewSoundID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call PlaySound
|
2021-05-31 15:41:36 +00:00
|
|
|
.walking
|
2014-05-18 18:19:10 +00:00
|
|
|
ld c, BANK(Music_MeetRival)
|
|
|
|
ld a, MUSIC_MEET_RIVAL
|
|
|
|
call PlayMusic
|
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hJoyHeld], a
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wXCoord]
|
2021-05-31 20:00:32 +00:00
|
|
|
cp 20 ; is the player standing on the right side of the bridge?
|
2021-05-31 15:41:36 +00:00
|
|
|
jr z, .playerOnRightSideOfBridge
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, CERULEANCITY_RIVAL
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteIndex], a
|
2020-08-30 20:33:14 +00:00
|
|
|
ld a, SPRITESTATEDATA2_MAPX
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteDataOffset], a
|
2014-09-10 03:55:19 +00:00
|
|
|
call GetPointerWithinSpriteStateData2
|
2020-08-30 20:33:14 +00:00
|
|
|
ld [hl], 25
|
2021-05-31 15:41:36 +00:00
|
|
|
.playerOnRightSideOfBridge
|
2014-09-25 23:21:49 +00:00
|
|
|
ld a, HS_CERULEAN_RIVAL
|
2015-07-25 03:27:59 +00:00
|
|
|
ld [wMissableObjectIndex], a
|
2014-06-16 20:57:26 +00:00
|
|
|
predef ShowObject
|
2014-05-18 18:19:10 +00:00
|
|
|
ld de, CeruleanCityMovement1
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, CERULEANCITY_RIVAL
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call MoveSprite
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, SCRIPT_CERULEANCITY_RIVAL_BATTLE
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCeruleanCityCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeruleanCityCoords1:
|
2020-07-16 16:32:19 +00:00
|
|
|
dbmapcoord 30, 7
|
|
|
|
dbmapcoord 30, 9
|
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeruleanCityCoords2:
|
2020-07-16 16:32:19 +00:00
|
|
|
dbmapcoord 20, 6
|
|
|
|
dbmapcoord 21, 6
|
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeruleanCityMovement1:
|
2015-07-17 07:52:25 +00:00
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
2020-07-16 16:32:19 +00:00
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-11-19 00:44:03 +00:00
|
|
|
CeruleanCityFaceRivalScript:
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, CERULEANCITY_RIVAL
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteIndex], a
|
2015-07-17 07:52:25 +00:00
|
|
|
xor a ; SPRITE_FACING_DOWN
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteFacingDirection], a
|
2014-09-10 03:55:19 +00:00
|
|
|
jp SetSpriteFacingDirectionAndDelay ; face object
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityRivalBattleScript:
|
2024-07-16 17:02:54 +00:00
|
|
|
ld a, [wStatusFlags5]
|
|
|
|
bit BIT_SCRIPTED_NPC_MOVEMENT, a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
|
|
|
xor a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, TEXT_CERULEANCITY_RIVAL
|
2024-09-19 01:01:18 +00:00
|
|
|
ldh [hTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
2024-07-16 17:02:54 +00:00
|
|
|
ld hl, wStatusFlags3
|
|
|
|
set BIT_TALKED_TO_TRAINER, [hl]
|
|
|
|
set BIT_PRINT_END_BATTLE_TEXT, [hl]
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, CeruleanCityRivalDefeatedText
|
|
|
|
ld de, CeruleanCityRivalVictoryText
|
2014-09-14 18:29:18 +00:00
|
|
|
call SaveEndBattleTextPointers
|
2020-07-17 17:27:27 +00:00
|
|
|
ld a, OPP_RIVAL1
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCurOpponent], a
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
; select which team to use during the encounter
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wRivalStarter]
|
2014-05-21 12:48:30 +00:00
|
|
|
cp STARTER2
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nz, .NotSquirtle
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $7
|
|
|
|
jr .done
|
|
|
|
.NotSquirtle
|
2014-05-21 12:48:30 +00:00
|
|
|
cp STARTER3
|
2015-07-03 19:38:12 +00:00
|
|
|
jr nz, .Charmander
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $8
|
|
|
|
jr .done
|
|
|
|
.Charmander
|
|
|
|
ld a, $9
|
|
|
|
.done
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wTrainerNo], a
|
2014-05-18 18:19:10 +00:00
|
|
|
|
|
|
|
xor a
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hJoyHeld], a
|
2023-11-19 00:44:03 +00:00
|
|
|
call CeruleanCityFaceRivalScript
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, SCRIPT_CERULEANCITY_RIVAL_DEFEATED
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCeruleanCityCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityRivalDefeatedScript:
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wIsInBattle]
|
2014-05-18 18:19:10 +00:00
|
|
|
cp $ff
|
2023-11-19 00:44:03 +00:00
|
|
|
jp z, CeruleanCityClearScripts
|
|
|
|
call CeruleanCityFaceRivalScript
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, D_RIGHT | D_LEFT | D_UP | D_DOWN
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_BEAT_CERULEAN_RIVAL
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, TEXT_CERULEANCITY_RIVAL
|
2024-09-19 01:01:18 +00:00
|
|
|
ldh [hTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
2020-07-03 20:37:47 +00:00
|
|
|
ld a, SFX_STOP_ALL_MUSIC
|
2015-08-09 05:32:44 +00:00
|
|
|
ld [wNewSoundID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call PlaySound
|
2020-07-07 01:18:22 +00:00
|
|
|
farcall Music_RivalAlternateStart
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, CERULEANCITY_RIVAL
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call SetSpriteMovementBytesToFF
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wXCoord]
|
2021-05-31 20:00:32 +00:00
|
|
|
cp 20 ; is the player standing on the right side of the bridge?
|
2021-05-31 15:41:36 +00:00
|
|
|
jr nz, .playerOnRightSideOfBridge
|
2014-05-18 18:19:10 +00:00
|
|
|
ld de, CeruleanCityMovement4
|
2021-05-31 15:41:36 +00:00
|
|
|
jr .skip
|
|
|
|
.playerOnRightSideOfBridge
|
2014-05-18 18:19:10 +00:00
|
|
|
ld de, CeruleanCityMovement3
|
2021-05-31 15:41:36 +00:00
|
|
|
.skip
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, CERULEANCITY_RIVAL
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [hSpriteIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call MoveSprite
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, SCRIPT_CERULEANCITY_RIVAL_CLEANUP
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCeruleanCityCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeruleanCityMovement3:
|
2015-07-17 07:52:25 +00:00
|
|
|
db NPC_MOVEMENT_LEFT
|
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
2020-07-16 16:32:19 +00:00
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CeruleanCityMovement4:
|
2015-07-17 07:52:25 +00:00
|
|
|
db NPC_MOVEMENT_RIGHT
|
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
|
|
|
db NPC_MOVEMENT_DOWN
|
2020-07-16 16:32:19 +00:00
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityRivalCleanupScript:
|
2024-07-16 17:02:54 +00:00
|
|
|
ld a, [wStatusFlags5]
|
|
|
|
bit BIT_SCRIPTED_NPC_MOVEMENT, a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
2014-09-25 23:21:49 +00:00
|
|
|
ld a, HS_CERULEAN_RIVAL
|
2015-07-25 03:27:59 +00:00
|
|
|
ld [wMissableObjectIndex], a
|
2014-06-16 20:57:26 +00:00
|
|
|
predef HideObject
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2014-09-10 03:55:19 +00:00
|
|
|
call PlayDefaultMusic
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, SCRIPT_CERULEANCITY_DEFAULT
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCeruleanCityCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
CeruleanCity_TextPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_text_pointers
|
|
|
|
dw_const CeruleanCityRivalText, TEXT_CERULEANCITY_RIVAL
|
|
|
|
dw_const CeruleanCityRocketText, TEXT_CERULEANCITY_ROCKET
|
|
|
|
dw_const CeruleanCityCooltrainerMText, TEXT_CERULEANCITY_COOLTRAINER_M
|
|
|
|
dw_const CeruleanCitySuperNerd1Text, TEXT_CERULEANCITY_SUPER_NERD1
|
|
|
|
dw_const CeruleanCitySuperNerd2Text, TEXT_CERULEANCITY_SUPER_NERD2
|
|
|
|
dw_const CeruleanCityGuardText, TEXT_CERULEANCITY_GUARD1
|
|
|
|
dw_const CeruleanCityCooltrainerF1Text, TEXT_CERULEANCITY_COOLTRAINER_F1
|
|
|
|
dw_const CeruleanCitySlowbroText, TEXT_CERULEANCITY_SLOWBRO
|
|
|
|
dw_const CeruleanCityCooltrainerF2Text, TEXT_CERULEANCITY_COOLTRAINER_F2
|
|
|
|
dw_const CeruleanCitySuperNerd3Text, TEXT_CERULEANCITY_SUPER_NERD3
|
|
|
|
dw_const CeruleanCityGuardText, TEXT_CERULEANCITY_GUARD2
|
|
|
|
dw_const CeruleanCitySignText, TEXT_CERULEANCITY_SIGN
|
|
|
|
dw_const CeruleanCityTrainerTipsText, TEXT_CERULEANCITY_TRAINER_TIPS
|
|
|
|
dw_const MartSignText, TEXT_CERULEANCITY_MART_SIGN
|
|
|
|
dw_const PokeCenterSignText, TEXT_CERULEANCITY_POKECENTER_SIGN
|
|
|
|
dw_const CeruleanCityBikeShopSign, TEXT_CERULEANCITY_BIKESHOP_SIGN
|
|
|
|
dw_const CeruleanCityGymSign, TEXT_CERULEANCITY_GYM_SIGN
|
|
|
|
|
|
|
|
CeruleanCityRivalText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_BEAT_CERULEAN_RIVAL
|
2014-05-18 18:19:10 +00:00
|
|
|
; do pre-battle text
|
2023-07-14 01:27:56 +00:00
|
|
|
jr z, .PreBattle
|
2014-05-18 18:19:10 +00:00
|
|
|
; or talk about bill
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, CeruleanCityRivalIWentToBillsText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2015-07-03 19:38:12 +00:00
|
|
|
jr .end
|
2023-07-14 01:27:56 +00:00
|
|
|
.PreBattle
|
|
|
|
ld hl, .PreBattleText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2015-07-03 19:38:12 +00:00
|
|
|
.end
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.PreBattleText:
|
|
|
|
text_far _CeruleanCityRivalPreBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityRivalDefeatedText:
|
|
|
|
text_far _CeruleanCityRivalDefeatedText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityRivalVictoryText:
|
|
|
|
text_far _CeruleanCityRivalVictoryText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityRivalIWentToBillsText:
|
|
|
|
text_far _CeruleanCityRivalIWentToBillsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityRocketText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_BEAT_CERULEAN_ROCKET_THIEF
|
2021-05-31 15:41:36 +00:00
|
|
|
jr nz, .beatRocketThief
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .Text
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2024-07-16 17:02:54 +00:00
|
|
|
ld hl, wStatusFlags3
|
|
|
|
set BIT_TALKED_TO_TRAINER, [hl]
|
|
|
|
set BIT_PRINT_END_BATTLE_TEXT, [hl]
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .IGiveUpText
|
|
|
|
ld de, .IGiveUpText
|
2014-09-14 18:29:18 +00:00
|
|
|
call SaveEndBattleTextPointers
|
2024-09-19 01:01:18 +00:00
|
|
|
ldh a, [hTextID]
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wSpriteIndex], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call EngageMapTrainer
|
|
|
|
call InitBattleEnemyParameters
|
2023-07-14 01:27:56 +00:00
|
|
|
ld a, SCRIPT_CERULEANCITY_ROCKET_DEFEATED
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCeruleanCityCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
2021-05-31 15:41:36 +00:00
|
|
|
.beatRocketThief
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .IllReturnTheTMText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2020-07-06 02:52:27 +00:00
|
|
|
lb bc, TM_DIG, 1
|
2014-05-18 18:19:10 +00:00
|
|
|
call GiveItem
|
|
|
|
jr c, .Success
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .TM28NoRoomText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jr .Done
|
|
|
|
.Success
|
|
|
|
ld a, $1
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .ReceivedTM28Text
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2020-07-07 01:18:22 +00:00
|
|
|
farcall CeruleanHideRocket
|
2014-05-18 18:19:10 +00:00
|
|
|
.Done
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.Text:
|
|
|
|
text_far _CeruleanCityRocketText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.ReceivedTM28Text:
|
|
|
|
text_far _CeruleanCityRocketReceivedTM28Text
|
2020-07-04 21:09:35 +00:00
|
|
|
sound_get_item_1
|
2023-07-14 01:27:56 +00:00
|
|
|
text_far _CeruleanCityRocketIBetterGetMovingText
|
2020-07-06 16:39:29 +00:00
|
|
|
text_waitbutton
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.TM28NoRoomText:
|
|
|
|
text_far _CeruleanCityRocketTM28NoRoomText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.IGiveUpText:
|
|
|
|
text_far _CeruleanCityRocketIGiveUpText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.IllReturnTheTMText:
|
|
|
|
text_far _CeruleanCityRocketIllReturnTheTMText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityCooltrainerMText:
|
|
|
|
text_far _CeruleanCityCooltrainerMText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCitySuperNerd1Text:
|
|
|
|
text_far _CeruleanCitySuperNerd1Text
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCitySuperNerd2Text:
|
|
|
|
text_far _CeruleanCitySuperNerd2Text
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityGuardText:
|
|
|
|
text_far _CeruleanCityGuardText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityCooltrainerF1Text:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh a, [hRandomAdd]
|
2021-05-31 20:00:32 +00:00
|
|
|
cp 180 ; 76/256 chance of 1st dialogue
|
2021-05-31 15:41:36 +00:00
|
|
|
jr c, .notFirstText
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .SlowbroUseSonicboomText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2021-05-31 15:41:36 +00:00
|
|
|
jr .end
|
|
|
|
.notFirstText
|
2021-05-31 20:00:32 +00:00
|
|
|
cp 100 ; 80/256 chance of 2nd dialogue
|
2021-05-31 15:41:36 +00:00
|
|
|
jr c, .notSecondText
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .SlowbroPunchText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2021-05-31 15:41:36 +00:00
|
|
|
jr .end
|
|
|
|
.notSecondText
|
2021-05-31 20:00:32 +00:00
|
|
|
; 100/256 chance of 3rd dialogue
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .SlowbroWithdrawText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2021-05-31 15:41:36 +00:00
|
|
|
.end
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.SlowbroUseSonicboomText:
|
|
|
|
text_far _CeruleanCityCooltrainerF1SlowbroUseSonicboomText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.SlowbroPunchText:
|
|
|
|
text_far _CeruleanCityCooltrainerF1SlowbroPunchText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.SlowbroWithdrawText:
|
|
|
|
text_far _CeruleanCityCooltrainerF1SlowbroWithdrawText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCitySlowbroText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh a, [hRandomAdd]
|
2021-05-31 20:00:32 +00:00
|
|
|
cp 180 ; 76/256 chance of 1st dialogue
|
2021-05-31 15:41:36 +00:00
|
|
|
jr c, .notFirstText
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .TookASnoozeText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2021-05-31 15:41:36 +00:00
|
|
|
jr .end
|
|
|
|
.notFirstText
|
2021-05-31 20:00:32 +00:00
|
|
|
cp 120 ; 60/256 chance of 2nd dialogue
|
2021-05-31 15:41:36 +00:00
|
|
|
jr c, .notSecondText
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .IsLoafingAroundText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2021-05-31 15:41:36 +00:00
|
|
|
jr .end
|
|
|
|
.notSecondText
|
2021-05-31 20:00:32 +00:00
|
|
|
cp 60 ; 60/256 chance of 3rd dialogue
|
2021-05-31 15:41:36 +00:00
|
|
|
jr c, .notThirdText
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .TurnedAwayText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2021-05-31 15:41:36 +00:00
|
|
|
jr .end
|
|
|
|
.notThirdText
|
2021-05-31 20:00:32 +00:00
|
|
|
; 60/256 chance of 4th dialogue
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .IgnoredOrdersText
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2021-05-31 15:41:36 +00:00
|
|
|
.end
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.TookASnoozeText:
|
|
|
|
text_far _CeruleanCitySlowbroTookASnoozeText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.IsLoafingAroundText:
|
|
|
|
text_far _CeruleanCitySlowbroIsLoafingAroundText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.TurnedAwayText:
|
|
|
|
text_far _CeruleanCitySlowbroTurnedAwayText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.IgnoredOrdersText:
|
|
|
|
text_far _CeruleanCitySlowbroIgnoredOrdersText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityCooltrainerF2Text:
|
|
|
|
text_far _CeruleanCityCooltrainerF2Text
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCitySuperNerd3Text:
|
|
|
|
text_far _CeruleanCitySuperNerd3Text
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCitySignText:
|
|
|
|
text_far _CeruleanCitySignText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityTrainerTipsText:
|
|
|
|
text_far _CeruleanCityTrainerTipsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityBikeShopSign:
|
|
|
|
text_far _CeruleanCityBikeShopSign
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
CeruleanCityGymSign:
|
|
|
|
text_far _CeruleanCityGymSign
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|