mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00
Groundwork for Galarian Bird event
This adds the first half of an event where you will find the Galarian Birds. It is not finished yet. It currently bugs out when Galarian Zapdos tries to run away and I don't know why. Frame-by-frame, it seems to be when the player has to move. I've tried different things to make this less bad, but they don't work. Here's how it's meant to go: 1) Articuno flies away (done) 2) Zapdos barges past the player like Silver does in GSC (bugs out) 3) Moltres moves in front of the player and engages (not done) If anyone has a better way to do this, please let me know! Minor changes; - Connection for Brunswick-Citrine looks nicer - Celeste has a few changes to make the event run easier.
This commit is contained in:
parent
234f3e120d
commit
f65e0dd3bf
|
@ -788,6 +788,7 @@
|
|||
const_next $880
|
||||
const EVENT_GOT_HM03
|
||||
const EVENT_GOT_MELTAN
|
||||
const EVENT_BIRDS_FOUND ; hehe
|
||||
|
||||
; Cerulean Cave events
|
||||
const_next $8C0
|
||||
|
|
|
@ -35,9 +35,9 @@ DEF SHOW EQU $15
|
|||
const HS_SAFFRON_CITY_E ; 17
|
||||
const HS_SAFFRON_CITY_F ; 18
|
||||
const HS_SAFFRON_CITY_UP_GRADE ; 19
|
||||
const HS_ROUTE_9_ITEM ; 1C X
|
||||
const HS_CELESTE_ARTICUNO_G ; 1C was unused HS_ROUTE_9_ITEM
|
||||
const HS_ROUTE_12_SNORLAX ; 1D
|
||||
const HS_ROUTE_12_ITEM_1 ; 1E X
|
||||
const HS_CELESTE_ZAPDOS_G ; 1E X was unused HS_ROUTE_12_ITEM_1
|
||||
const HS_ROUTE_12_ITEM_2 ; 1F X
|
||||
const HS_ROUTE_15_ITEM ; 20 X
|
||||
const HS_ROUTE_16_SNORLAX ; 21
|
||||
|
|
|
@ -24,7 +24,7 @@ MapHSPointers:
|
|||
dw NoHS
|
||||
dw NoHS
|
||||
dw NoHS
|
||||
dw Route9HS
|
||||
dw NoHS ; Route9HS made unnecessary from replacements
|
||||
dw NoHS
|
||||
dw NoHS
|
||||
dw Route12HS
|
||||
|
@ -80,7 +80,7 @@ MapHSPointers:
|
|||
dw NoHS
|
||||
dw NoHS
|
||||
dw NoHS
|
||||
dw NoHS
|
||||
dw CelesteHillHS
|
||||
dw NoHS
|
||||
dw NoHS
|
||||
dw NoHS
|
||||
|
@ -298,11 +298,9 @@ SaffronCityHS:
|
|||
;db ROUTE_2, $02, SHOW
|
||||
;Route4HS:
|
||||
;db ROUTE_4, $03, SHOW
|
||||
Route9HS:
|
||||
db ROUTE_9, $0A, SHOW
|
||||
Route12HS:
|
||||
db ROUTE_12, $01, SHOW
|
||||
db ROUTE_12, $09, SHOW
|
||||
;db ROUTE_12, $09, SHOW
|
||||
db ROUTE_12, $0A, SHOW
|
||||
Route15HS:
|
||||
db ROUTE_15, $0B, SHOW
|
||||
|
@ -602,6 +600,9 @@ ViridianPreGymHS:
|
|||
db VIRIDIAN_PRE_GYM, $02, HIDE ; Yujirou Rematch
|
||||
UnderwaterTunnelHS:
|
||||
db UNDERWATER_TUNNEL, $01, SHOW
|
||||
CelesteHillHS:
|
||||
db CELESTE_HILL, $02, SHOW ; Zapdos
|
||||
db CELESTE_HILL, $03, SHOW ; Articuno
|
||||
|
||||
db $FF, $01, SHOW ; end
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ BrunswickTrail_Object:
|
|||
db $43 ; border block
|
||||
|
||||
def_warp_events
|
||||
warp_event 24, 11, CELESTE_HILL, 1
|
||||
warp_event 24, 11, CELESTE_HILL, 2
|
||||
|
||||
def_bg_events
|
||||
|
||||
|
|
|
@ -6,7 +6,12 @@ CelesteHill_Object:
|
|||
warp_event 13, 23, BRUNSWICK_TRAIL, 1
|
||||
|
||||
def_bg_events
|
||||
bg_event 12, 20, 2
|
||||
bg_event 12, 8, 3
|
||||
|
||||
def_object_events
|
||||
object_event 12, 7, SPRITE_BIRD, STAY, DOWN, 1 ; person
|
||||
object_event 13, 6, SPRITE_BIRD, STAY, DOWN, 1 ; person
|
||||
object_event 11, 6, SPRITE_BIRD, STAY, DOWN, 1, MOLTRES_G, 70 | OW_POKEMON ; person
|
||||
|
||||
def_warps_to CELESTE_HILL
|
|
@ -290,3 +290,8 @@ RivalIDs:
|
|||
db OPP_RIVAL2
|
||||
db OPP_RIVAL3
|
||||
db -1 ; end
|
||||
|
||||
RLEList_PlayerGZapMovement::
|
||||
db D_DOWN, 1
|
||||
db D_LEFT, 1
|
||||
db -1 ; end
|
||||
|
|
|
@ -252,7 +252,7 @@ DoFlyAnimation:
|
|||
jr nz, DoFlyAnimation
|
||||
ret
|
||||
|
||||
LoadBirdSpriteGraphics:
|
||||
LoadBirdSpriteGraphics:: ; Made this farcallable for the Galarian Articuno animation.
|
||||
ld de, BirdSprite
|
||||
ld hl, vNPCSprites
|
||||
lb bc, BANK(BirdSprite), 12
|
||||
|
|
Binary file not shown.
|
@ -1 +1 @@
|
|||
<@B>@@BB@@nU_U_oBB@@%"#$BB@@qZqBB@D<>rUZ%_r<5F>FB@<1D>anoa<6F>B@<1D>iU((_i<5F>B@<1D>j<EFBFBD><6A><EFBFBD><EFBFBD><EFBFBD><EFBFBD>B@<1D><><EFBFBD>s.<2E><><EFBFBD>B@B@BDEEEEFYDEEEF
|
||||
<@B>@@BB@@U_U_BB@@%"#$BB@@|}}BB@D‚rU_„FB@ƒa%a…B@ƒiU.)_i…B@ƒj<C692><6A>€<EFBFBD>ˆ…B@†<><E280A0>s.†<>‡B@B@BDEEEEFYDEEEF
|
|
@ -33,4 +33,4 @@ D#####"
|
|||
|
||||
|
||||
|
||||
n'meCTTTTTF-1eCxxxxxxc>>>>>>>1>>>>>>>>
|
||||
n'meCTTTTTF-'eCxxxxxxc>>>>>>>'>>>>>>>>
|
|
@ -412,7 +412,7 @@ wRelearnableMoves::
|
|||
; Try not to use this stack.
|
||||
; A good amount of space is needed to store data for the move relearner.
|
||||
; If it's like, 2, it'll lag like crazy and show garbage from elsewhere.
|
||||
|
||||
|
||||
wLuckySlotHiddenObjectIndex:: db
|
||||
|
||||
NEXTU
|
||||
|
@ -2074,7 +2074,7 @@ wMtMoonCraterCurScript:: db
|
|||
wSilphGauntlet1FCurScript:: db
|
||||
wSilphCo10FCurScript:: db
|
||||
wSilphCo11FCurScript:: db
|
||||
ds 1
|
||||
wCelesteHillCurScript:: db
|
||||
wFuchsiaGymCurScript:: db
|
||||
wSaffronGymCurScript:: db
|
||||
wBrunswickTrailCurScript:: db
|
||||
|
|
|
@ -38,8 +38,8 @@ FakeTreePrompt:
|
|||
text_end
|
||||
|
||||
; Ok, so here's how it is.
|
||||
; So look, I tried to make the text work more efficiently with FakeTreeEvent.
|
||||
; But one bug literally took me back to the fucking title screen and at that point I gave up and decided to do it this hacky way.
|
||||
; I tried to make the text work more efficiently here, but nothing worked.
|
||||
; One bug literally took me back to the fucking title screen and at that point I gave up.
|
||||
; I wanted to have some text before the CUT check. It did not work. It was terrifying.
|
||||
; So instead I have two different versions of the same text, despite some being the same.
|
||||
; It is inefficient, but it works. There's a lot to see in this life, and I'm not wasting it in Notepad++.
|
||||
|
|
|
@ -1,7 +1,192 @@
|
|||
CelesteHill_Script:
|
||||
jp EnableAutoTextBoxDrawing
|
||||
call EnableAutoTextBoxDrawing
|
||||
ld hl, CelesteHill_ScriptPointers
|
||||
ld a, [wCelesteHillCurScript]
|
||||
jp CallFunctionInTable
|
||||
|
||||
CelesteHill_ScriptPointers:
|
||||
dw GalarianBirdScript1
|
||||
|
||||
CelesteHillCoords1:
|
||||
dbmapcoord 13, 8
|
||||
db -1 ; end
|
||||
|
||||
GalarianBirdScript1:
|
||||
; CheckEvent EVENT_BIRDS_FOUND
|
||||
; jr z, .cont
|
||||
; jr nz, .done
|
||||
;.cont - This code is unfinished and bad.
|
||||
; If you have any ideas lmk :3
|
||||
ld hl, CelesteHillCoords1
|
||||
call ArePlayerCoordsInArray
|
||||
jp nc, .done
|
||||
|
||||
ld [wJoyIgnore], a
|
||||
SetEvent EVENT_BIRDS_FOUND
|
||||
ld a, $1
|
||||
ldh [hSpriteIndexOrTextID], a
|
||||
call DisplayTextID
|
||||
|
||||
ld a, ARTICUNO_G
|
||||
call PlayCry
|
||||
call WaitForSoundToFinish
|
||||
pop hl
|
||||
ld de, BirdSprite
|
||||
ld hl, vNPCSprites
|
||||
lb bc, BANK(BirdSprite), $0c
|
||||
call CopyVideoData
|
||||
farcall LoadBirdSpriteGraphics
|
||||
ld a, SFX_FLY
|
||||
call PlaySound
|
||||
ld hl, wFlyAnimUsingCoordList
|
||||
xor a ; is using coord list
|
||||
ld [hli], a ; wFlyAnimUsingCoordList
|
||||
ld a, 12
|
||||
ld [hli], a ; wFlyAnimCounter
|
||||
ld [hl], $8 ; wFlyAnimBirdSpriteImageIndex (facing right)
|
||||
xor a ; is using coord list
|
||||
ld [hli], a ; wFlyAnimUsingCoordList
|
||||
ld a, $c
|
||||
ld [hli], a ; wFlyAnimCounter
|
||||
ld [hl], $c ; wFlyAnimBirdSpriteImageIndex (facing right)
|
||||
ld de, GalarianArticunoFlyScreenCoords1
|
||||
call GalarianArticunoFlyLoop
|
||||
ld c, 40
|
||||
call DelayFrames
|
||||
ld hl, wFlyAnimCounter
|
||||
ld a, 11
|
||||
ld [hli], a ; wFlyAnimCounter
|
||||
ld [hl], $8 ; wFlyAnimBirdSpriteImageIndex (facing left)
|
||||
ld de, GalarianArticunoFlyScreenCoords2
|
||||
call GalarianArticunoFlyLoop
|
||||
|
||||
ld a, HS_CELESTE_ARTICUNO_G
|
||||
ld [wMissableObjectIndex], a
|
||||
predef ShowObject
|
||||
|
||||
ld a, ZAPDOS_G
|
||||
call PlayCry
|
||||
call ZapdosRunThrough
|
||||
|
||||
ld a, HS_CELESTE_ZAPDOS_G
|
||||
ld [wMissableObjectIndex], a
|
||||
predef ShowObject
|
||||
|
||||
ld a, $1
|
||||
ldh [hSpriteIndex], a
|
||||
call SetSpriteMovementBytesToFF
|
||||
ld a, [wXCoord]
|
||||
|
||||
jr .done
|
||||
.done
|
||||
ret
|
||||
|
||||
; DoFlyAnimation clone, but for Articuno.
|
||||
GalarianArticunoFlyLoop:
|
||||
ld a, [wFlyAnimBirdSpriteImageIndex]
|
||||
xor $1 ; make the bird flap its wings
|
||||
ld [wFlyAnimBirdSpriteImageIndex], a
|
||||
ld [wSprite03StateData1ImageIndex], a
|
||||
call Delay3
|
||||
ld a, [wFlyAnimUsingCoordList]
|
||||
cp $ff
|
||||
jr z, .skipCopyingCoords ; if the bird is flapping its wings in place
|
||||
ld hl, wSprite03StateData1YPixels
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hli], a ; y
|
||||
inc hl
|
||||
ld a, [de]
|
||||
inc de
|
||||
ld [hl], a ; x
|
||||
.skipCopyingCoords
|
||||
ld a, [wFlyAnimCounter]
|
||||
dec a
|
||||
ld [wFlyAnimCounter], a
|
||||
jr nz, GalarianArticunoFlyLoop
|
||||
ret
|
||||
|
||||
; Clones of the initial part of the Fly animation.
|
||||
GalarianArticunoFlyScreenCoords1:
|
||||
; y, x pairs
|
||||
db $06, $0B ; 6, 11 $3C, $48
|
||||
db $3C, $50
|
||||
db $3B, $58
|
||||
db $3A, $60
|
||||
db $39, $68
|
||||
db $37, $70
|
||||
db $37, $78
|
||||
db $33, $80
|
||||
db $30, $88
|
||||
db $2D, $90
|
||||
db $2A, $98
|
||||
db $27, $A0
|
||||
|
||||
GalarianArticunoFlyScreenCoords2:
|
||||
db $1A, $90
|
||||
db $19, $80
|
||||
db $17, $70
|
||||
db $15, $60
|
||||
db $12, $50
|
||||
db $0F, $40
|
||||
db $0C, $30
|
||||
db $09, $20
|
||||
db $05, $10
|
||||
db $00, $00
|
||||
|
||||
db $F0, $00
|
||||
|
||||
ZapdosRunThrough:
|
||||
call Delay3
|
||||
ld a, $2
|
||||
ldh [hSpriteIndex], a
|
||||
ld de, GalarianZapdosMovement1
|
||||
call MoveSprite
|
||||
|
||||
ld hl, wSimulatedJoypadStatesEnd
|
||||
ld de, RLEList_PlayerGZapMovement
|
||||
call DecodeRLEList
|
||||
dec a
|
||||
ld [wSimulatedJoypadStatesIndex], a
|
||||
call StartSimulatingJoypadStates
|
||||
ld a, $1
|
||||
ldh [hSpriteIndex], a
|
||||
xor a
|
||||
ldh [hSpriteFacingDirection], a
|
||||
call SetSpriteFacingDirectionAndDelay
|
||||
|
||||
ld a, $2
|
||||
ldh [hSpriteIndex], a
|
||||
ld de, GalarianZapdosMovement2
|
||||
call MoveSprite
|
||||
ret
|
||||
|
||||
GalarianZapdosMovement1:
|
||||
db NPC_MOVEMENT_DOWN
|
||||
db -1
|
||||
|
||||
GalarianZapdosMovement2:
|
||||
db NPC_MOVEMENT_DOWN
|
||||
db NPC_MOVEMENT_DOWN
|
||||
db NPC_MOVEMENT_DOWN
|
||||
db -1
|
||||
|
||||
CelesteHill_TextPointers:
|
||||
dw CelesteHillGalarianBirdScreech
|
||||
dw CelesteHillSign1
|
||||
dw CelesteHillSign2
|
||||
|
||||
CelesteHillGalarianBirdScreech:
|
||||
text_far _CelesteHillGalarianBirdScreech
|
||||
text_end
|
||||
|
||||
CelesteHillSign1:
|
||||
text_far _CelesteHillSign1
|
||||
text_end
|
||||
|
||||
CelesteHillSign2:
|
||||
text_far _CelesteHillSign2
|
||||
text_end
|
||||
|
||||
text_end ; unused
|
||||
|
1
text.asm
1
text.asm
|
@ -283,6 +283,7 @@ SECTION "Text 12", ROMX
|
|||
INCLUDE "text/CitrineRocketHouse.asm"
|
||||
INCLUDE "text/CitrineTradebackHouse.asm"
|
||||
INCLUDE "text/tradeback_move_tutor.asm"
|
||||
INCLUDE "text/CelesteHill.asm"
|
||||
INCLUDE "text/BrunswickTrail.asm"
|
||||
INCLUDE "text/SilphGauntlet1F.asm"
|
||||
INCLUDE "text/SilphGauntlet7F.asm"
|
||||
|
|
|
@ -34,7 +34,7 @@ _FakeTreeAttack::
|
|||
prompt
|
||||
|
||||
_GalarianZapdosBattleText::
|
||||
text "Gyaoo!" ; making the cries consistent with the other legendary birds
|
||||
text "Gyaoo!"
|
||||
prompt
|
||||
|
||||
; Martha can do the text for her things...
|
||||
|
|
19
text/CelesteHill.asm
Normal file
19
text/CelesteHill.asm
Normal file
|
@ -0,0 +1,19 @@
|
|||
_CelesteHillGalarianBirdScreech:: ; I think others should be made a single text_7 thing but this is different as it needs a "done"
|
||||
text "Gyaoo!"
|
||||
done
|
||||
|
||||
_CelesteHillSign1::
|
||||
text "SOUTH: BRUNSWICK"
|
||||
line "TRAIL"
|
||||
done
|
||||
|
||||
_CelesteHillSign2::
|
||||
text "When the sun"
|
||||
line "shines upon this"
|
||||
cont "HILL, the cruel"
|
||||
cont "pretenders to"
|
||||
cont "the winged"
|
||||
cont "mirages will"
|
||||
cont "come to roost."
|
||||
done
|
||||
|
Loading…
Reference in a new issue