2020-05-21 00:40:33 +00:00
|
|
|
PokemonTower7F_Script:
|
2014-05-18 18:19:10 +00:00
|
|
|
call EnableAutoTextBoxDrawing
|
2020-05-21 00:40:33 +00:00
|
|
|
ld hl, PokemonTower7F_ScriptPointers
|
|
|
|
ld a, [wPokemonTower7FCurScript]
|
|
|
|
call CallFunctionInTable
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-08 11:44:58 +00:00
|
|
|
PokemonTower7Script_60d01:
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7Script_60d05:
|
2020-05-21 00:40:33 +00:00
|
|
|
ld [wPokemonTower7FCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2020-05-21 00:40:33 +00:00
|
|
|
PokemonTower7F_ScriptPointers:
|
2016-06-08 11:44:58 +00:00
|
|
|
dw PokemonTower7Script0
|
|
|
|
dw PokemonTower7Script1
|
|
|
|
dw PokemonTower7Script2
|
|
|
|
dw PokemonTower7Script3
|
|
|
|
dw PokemonTower7Script4
|
|
|
|
dw PokemonTower7Script5
|
|
|
|
dw PokemonTower7Script6
|
|
|
|
dw PokemonTower7Script7
|
|
|
|
dw PokemonTower7Script8
|
|
|
|
dw PokemonTower7Script9
|
|
|
|
dw PokemonTower7Script10
|
|
|
|
dw PokemonTower7Script11
|
2016-06-01 21:24:31 +00:00
|
|
|
|
|
|
|
PokemonTower7Script0:
|
|
|
|
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_0
|
|
|
|
call z, PokemonTower7Script_60d2a
|
|
|
|
ret
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7Script_60d2a:
|
|
|
|
ld a, [wYCoord]
|
|
|
|
cp $c
|
|
|
|
ret nz
|
|
|
|
ResetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
|
|
|
|
ld a, [wXCoord]
|
|
|
|
cp $a
|
|
|
|
jr z, .asm_60d47
|
|
|
|
ld a, [wXCoord] ; why?
|
|
|
|
cp $b
|
|
|
|
ret nz
|
|
|
|
SetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
|
|
|
|
.asm_60d47
|
|
|
|
call StopAllMusic
|
2016-06-06 08:22:40 +00:00
|
|
|
ld c, BANK(Music_MeetJessieJames)
|
|
|
|
ld a, MUSIC_MEET_JESSIE_JAMES
|
2016-06-01 21:24:31 +00:00
|
|
|
call PlayMusic
|
|
|
|
xor a
|
2020-11-04 06:06:44 +00:00
|
|
|
ldh [hJoyHeld], a
|
2016-06-01 21:24:31 +00:00
|
|
|
ld a, $FF ^ (A_BUTTON | B_BUTTON)
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2020-05-21 00:40:33 +00:00
|
|
|
ld a, HS_POKEMON_TOWER_7F_JESSIE
|
2016-06-01 21:24:31 +00:00
|
|
|
call PokemonTower7Script_60eaf
|
2020-05-21 00:40:33 +00:00
|
|
|
ld a, HS_POKEMON_TOWER_7F_JAMES
|
2016-06-01 21:24:31 +00:00
|
|
|
call PokemonTower7Script_60eaf
|
|
|
|
ld a, $1
|
|
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
|
|
|
ld a, $4
|
2020-11-04 06:06:44 +00:00
|
|
|
ldh [hSpriteIndexOrTextID], a
|
2014-05-18 18:19:10 +00:00
|
|
|
call DisplayTextID
|
2016-06-01 21:24:31 +00:00
|
|
|
ld a, $ff
|
|
|
|
ld [wJoyIgnore], a
|
|
|
|
ld a, $1
|
|
|
|
call PokemonTower7Script_60d05
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7MovementData_60d7a:
|
|
|
|
db $4
|
|
|
|
PokemonTower7MovementData_60d7b:
|
|
|
|
db $4
|
|
|
|
db $4
|
|
|
|
db $4
|
|
|
|
db $FF
|
|
|
|
|
|
|
|
PokemonTower7Script1:
|
|
|
|
ld de, PokemonTower7MovementData_60d7b
|
|
|
|
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
|
|
|
|
jr z, .asm_60d8c
|
|
|
|
ld de, PokemonTower7MovementData_60d7a
|
|
|
|
.asm_60d8c
|
|
|
|
ld a, $1
|
2020-11-04 06:06:44 +00:00
|
|
|
ldh [hSpriteIndexOrTextID], a
|
2016-06-01 21:24:31 +00:00
|
|
|
call MoveSprite
|
|
|
|
ld a, $ff
|
|
|
|
ld [wJoyIgnore], a
|
|
|
|
ld a, $2
|
|
|
|
call PokemonTower7Script_60d05
|
|
|
|
ret
|
|
|
|
|
|
|
|
PokemonTower7Script2:
|
|
|
|
ld a, $ff
|
|
|
|
ld [wJoyIgnore], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld a, [wd730]
|
2014-05-18 18:19:10 +00:00
|
|
|
bit 0, a
|
|
|
|
ret nz
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7Script3:
|
|
|
|
ld a, $0
|
2020-11-06 16:01:21 +00:00
|
|
|
ld [wSprite01StateData1FacingDirection], a
|
2016-06-01 21:24:31 +00:00
|
|
|
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
|
|
|
|
jr z, .asm_60dba
|
|
|
|
ld a, $c
|
2020-11-06 16:01:21 +00:00
|
|
|
ld [wSprite01StateData1FacingDirection], a
|
2016-06-01 21:24:31 +00:00
|
|
|
.asm_60dba
|
|
|
|
ld a, $2
|
2020-11-06 16:01:21 +00:00
|
|
|
ld [wSprite01StateData1MovementStatus], a
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7Script4:
|
|
|
|
ld de, PokemonTower7MovementData_60d7a
|
|
|
|
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
|
|
|
|
jr z, .asm_60dcc
|
|
|
|
ld de, PokemonTower7MovementData_60d7b
|
|
|
|
.asm_60dcc
|
|
|
|
ld a, $2
|
2020-11-04 06:06:44 +00:00
|
|
|
ldh [hSpriteIndexOrTextID], a
|
2016-06-01 21:24:31 +00:00
|
|
|
call MoveSprite
|
|
|
|
ld a, $ff
|
|
|
|
ld [wJoyIgnore], a
|
|
|
|
ld a, $5
|
|
|
|
call PokemonTower7Script_60d05
|
|
|
|
ret
|
|
|
|
PokemonTower7Script5:
|
|
|
|
ld a, $ff
|
|
|
|
ld [wJoyIgnore], a
|
|
|
|
ld a, [wd730]
|
|
|
|
bit 0, a
|
|
|
|
ret nz
|
|
|
|
PokemonTower7Script6:
|
|
|
|
ld a, $2
|
2020-11-06 16:01:21 +00:00
|
|
|
ld [wSprite02StateData1MovementStatus], a
|
2016-06-01 21:24:31 +00:00
|
|
|
ld a, $8
|
2020-11-06 16:01:21 +00:00
|
|
|
ld [wSprite02StateData1FacingDirection], a
|
2016-06-01 21:24:31 +00:00
|
|
|
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
|
|
|
|
jr z, .asm_60dff
|
|
|
|
ld a, $0
|
2020-11-06 16:01:21 +00:00
|
|
|
ld [wSprite02StateData1FacingDirection], a
|
2016-06-01 21:24:31 +00:00
|
|
|
.asm_60dff
|
|
|
|
call Delay3
|
|
|
|
ld a, $FF ^ (A_BUTTON | B_BUTTON)
|
|
|
|
ld [wJoyIgnore], a
|
|
|
|
ld a, $5
|
2020-11-04 06:06:44 +00:00
|
|
|
ldh [hSpriteIndexOrTextID], a
|
2016-06-01 21:24:31 +00:00
|
|
|
call DisplayTextID
|
|
|
|
PokemonTower7Script7:
|
|
|
|
ld hl, wd72d
|
|
|
|
set 6, [hl]
|
|
|
|
set 7, [hl]
|
2016-06-08 11:44:58 +00:00
|
|
|
ld hl, PokemonTower7JessieJamesEndBattleText
|
|
|
|
ld de, PokemonTower7JessieJamesEndBattleText
|
2016-06-01 21:24:31 +00:00
|
|
|
call SaveEndBattleTextPointers
|
|
|
|
ld a, OPP_ROCKET
|
|
|
|
ld [wCurOpponent], a
|
|
|
|
ld a, $2c
|
|
|
|
ld [wTrainerNo], a
|
|
|
|
xor a
|
2020-11-04 06:06:44 +00:00
|
|
|
ldh [hJoyHeld], a
|
2016-06-01 21:24:31 +00:00
|
|
|
ld [wJoyIgnore], a
|
|
|
|
ld a, $8
|
|
|
|
call PokemonTower7Script_60d05
|
|
|
|
ret
|
|
|
|
|
|
|
|
PokemonTower7Script8:
|
|
|
|
ld a, $ff
|
|
|
|
ld [wJoyIgnore], a
|
|
|
|
ld a, [wIsInBattle]
|
|
|
|
cp $ff
|
|
|
|
jp z, PokemonTower7Script_60d01
|
|
|
|
ld a, $2
|
2020-11-06 16:01:21 +00:00
|
|
|
ld [wSprite01StateData1MovementStatus], a
|
|
|
|
ld [wSprite02StateData1MovementStatus], a
|
2016-06-01 21:24:31 +00:00
|
|
|
xor a
|
2020-11-06 16:01:21 +00:00
|
|
|
ld [wSprite01StateData1FacingDirection], a
|
|
|
|
ld [wSprite02StateData1FacingDirection], a
|
2016-06-01 21:24:31 +00:00
|
|
|
ld a, $FF ^ (A_BUTTON | B_BUTTON)
|
|
|
|
ld [wJoyIgnore], a
|
|
|
|
ld a, $1
|
|
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
|
|
|
ld a, $6
|
2020-11-04 06:06:44 +00:00
|
|
|
ldh [hSpriteIndexOrTextID], a
|
2016-06-01 21:24:31 +00:00
|
|
|
call DisplayTextID
|
|
|
|
xor a
|
|
|
|
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
|
|
|
call StopAllMusic
|
2016-06-06 08:22:40 +00:00
|
|
|
ld c, BANK(Music_MeetJessieJames)
|
|
|
|
ld a, MUSIC_MEET_JESSIE_JAMES
|
2016-06-01 21:24:31 +00:00
|
|
|
call PlayMusic
|
|
|
|
ld a, $ff
|
|
|
|
ld [wJoyIgnore], a
|
|
|
|
ld a, $9
|
|
|
|
call PokemonTower7Script_60d05
|
|
|
|
ret
|
|
|
|
|
|
|
|
PokemonTower7Script9:
|
|
|
|
ld a, $ff
|
|
|
|
ld [wJoyIgnore], a
|
|
|
|
call GBFadeOutToBlack
|
2020-05-21 00:40:33 +00:00
|
|
|
ld a, HS_POKEMON_TOWER_7F_JESSIE
|
2016-06-01 21:24:31 +00:00
|
|
|
call PokemonTower7Script_60ebe
|
2020-05-21 00:40:33 +00:00
|
|
|
ld a, HS_POKEMON_TOWER_7F_JAMES
|
2016-06-01 21:24:31 +00:00
|
|
|
call PokemonTower7Script_60ebe
|
|
|
|
call UpdateSprites
|
|
|
|
call Delay3
|
|
|
|
call GBFadeInFromBlack
|
|
|
|
ld a, $a
|
|
|
|
call PokemonTower7Script_60d05
|
|
|
|
ret
|
|
|
|
|
|
|
|
PokemonTower7Script10:
|
|
|
|
call PlayDefaultMusic
|
2014-05-18 18:19:10 +00:00
|
|
|
xor a
|
2020-11-04 06:06:44 +00:00
|
|
|
ldh [hJoyHeld], a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2016-06-01 21:24:31 +00:00
|
|
|
SetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_0
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $0
|
2016-06-01 21:24:31 +00:00
|
|
|
call PokemonTower7Script_60d05
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7Script_60eaf:
|
|
|
|
ld [wMissableObjectIndex], a
|
|
|
|
predef ShowObject
|
|
|
|
call UpdateSprites
|
|
|
|
call Delay3
|
|
|
|
ret
|
|
|
|
|
2020-11-04 06:06:44 +00:00
|
|
|
PokemonTower7Script_60ebe:
|
2016-06-01 21:24:31 +00:00
|
|
|
ld [wMissableObjectIndex], a
|
|
|
|
predef HideObject
|
|
|
|
ret
|
|
|
|
|
|
|
|
PokemonTower7Script11:
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $ff
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [wJoyIgnore], a
|
2020-05-21 00:40:33 +00:00
|
|
|
ld a, HS_POKEMON_TOWER_7F_MR_FUJI
|
2015-07-25 03:27:59 +00:00
|
|
|
ld [wMissableObjectIndex], a
|
2014-06-16 20:57:26 +00:00
|
|
|
predef HideObject
|
2015-07-04 05:44:12 +00:00
|
|
|
ld a, SPRITE_FACING_UP
|
2018-11-19 00:24:53 +00:00
|
|
|
ld [wSpritePlayerStateData1FacingDirection], a
|
2020-05-21 00:40:33 +00:00
|
|
|
ld a, MR_FUJIS_HOUSE
|
2020-11-04 06:06:44 +00:00
|
|
|
ldh [hWarpDestinationMap], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ld a, $1
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wDestinationWarpID], a
|
2014-05-19 14:38:20 +00:00
|
|
|
ld a, LAVENDER_TOWN
|
|
|
|
ld [wLastMap], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd72d
|
2014-05-18 18:19:10 +00:00
|
|
|
set 3, [hl]
|
|
|
|
ld a, $0
|
2020-05-21 00:40:33 +00:00
|
|
|
ld [wPokemonTower7FCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2020-05-21 00:40:33 +00:00
|
|
|
PokemonTower7F_TextPointers:
|
2014-05-18 18:19:10 +00:00
|
|
|
dw PokemonTower7Text1
|
|
|
|
dw PokemonTower7Text2
|
|
|
|
dw PokemonTower7Text3
|
2016-06-01 21:24:31 +00:00
|
|
|
dw PokemonTower7Text4
|
|
|
|
dw PokemonTower7Text5
|
|
|
|
dw PokemonTower7Text6
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7Text1:
|
|
|
|
PokemonTower7Text2:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7Text4:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_far _PokemonTowerJessieJamesText1
|
|
|
|
text_asm
|
2016-06-01 21:24:31 +00:00
|
|
|
ld c, 10
|
|
|
|
call DelayFrames
|
|
|
|
ld a, PLAYER_DIR_UP
|
|
|
|
ld [wPlayerMovingDirection], a
|
|
|
|
ld a, $0
|
|
|
|
ld [wEmotionBubbleSpriteIndex], a
|
2016-08-16 05:19:23 +00:00
|
|
|
ld a, EXCLAMATION_BUBBLE
|
2016-06-01 21:24:31 +00:00
|
|
|
ld [wWhichEmotionBubble], a
|
|
|
|
predef EmotionBubble
|
|
|
|
ld c, 20
|
|
|
|
call DelayFrames
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7Text5:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_far _PokemonTowerJessieJamesText2
|
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7JessieJamesEndBattleText:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_far _PokemonTowerJessieJamesText3
|
|
|
|
text_end
|
2016-06-01 21:24:31 +00:00
|
|
|
|
|
|
|
PokemonTower7Text6:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_far _PokemonTowerJessieJamesText4
|
|
|
|
text_asm
|
2016-06-01 21:24:31 +00:00
|
|
|
ld c, 64
|
|
|
|
call DelayFrames
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7Text3:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_asm
|
2016-06-01 21:24:31 +00:00
|
|
|
ld hl, PokemonTower7Text_60f75
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEvent EVENT_RESCUED_MR_FUJI
|
|
|
|
SetEvent EVENT_RESCUED_MR_FUJI_2
|
2020-05-21 00:40:33 +00:00
|
|
|
ld a, HS_MR_FUJIS_HOUSE_MR_FUJI
|
2015-07-25 03:27:59 +00:00
|
|
|
ld [wMissableObjectIndex], a
|
2014-06-16 20:57:26 +00:00
|
|
|
predef ShowObject
|
2014-09-25 23:21:49 +00:00
|
|
|
ld a, HS_SAFFRON_CITY_E
|
2015-07-25 03:27:59 +00:00
|
|
|
ld [wMissableObjectIndex], a
|
2014-06-16 20:57:26 +00:00
|
|
|
predef HideObject
|
2014-09-25 23:21:49 +00:00
|
|
|
ld a, HS_SAFFRON_CITY_F
|
2015-07-25 03:27:59 +00:00
|
|
|
ld [wMissableObjectIndex], a
|
2014-06-16 20:57:26 +00:00
|
|
|
predef ShowObject
|
2016-06-01 21:24:31 +00:00
|
|
|
ld a, $b
|
2020-05-21 00:40:33 +00:00
|
|
|
ld [wPokemonTower7FCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
jp TextScriptEnd
|
|
|
|
|
2016-06-01 21:24:31 +00:00
|
|
|
PokemonTower7Text_60f75:
|
2020-11-04 06:06:44 +00:00
|
|
|
text_far _TowerRescueFujiText
|
|
|
|
text_end
|