You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Implement Waterfall technique (#34)
This commit is contained in:
@@ -769,6 +769,22 @@ CheckFacingTileEvent:
|
||||
ret ; c
|
||||
|
||||
.next_event_1
|
||||
;; Waterfall
|
||||
ld a, [wFacingTileID]
|
||||
call CheckWaterfallTile
|
||||
jr nz, .next_event_2
|
||||
|
||||
; Must be facing up and facing a waterfall tile to trigger the waterfall up sequence.
|
||||
; Otherwise HI_NYBBLE_CURRENT collision (forced walking in walking direction) applies.
|
||||
farcall CheckMapCanWaterfall
|
||||
jr c, .next_event_2
|
||||
|
||||
ld a, BANK(Script_WaterfallAuto)
|
||||
ld hl, Script_WaterfallAuto
|
||||
call CallScript
|
||||
ret ; c
|
||||
|
||||
.next_event_2
|
||||
.no_event
|
||||
xor a
|
||||
ret ; nc
|
||||
|
||||
@@ -340,7 +340,7 @@ DoPlayerMovement::
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld [wWalkingDirection], a
|
||||
jr .continue_walk
|
||||
jr .continue_fast_slide
|
||||
|
||||
.water_table
|
||||
db RIGHT ; COLL_WATERFALL_RIGHT
|
||||
@@ -414,8 +414,15 @@ DoPlayerMovement::
|
||||
xor a
|
||||
ret
|
||||
|
||||
.continue_fast_slide
|
||||
ld a, STEP_ICE
|
||||
jr .continue_step
|
||||
|
||||
.continue_walk
|
||||
ld a, STEP_WALK
|
||||
; fallthrough
|
||||
|
||||
.continue_step
|
||||
call .DoStep
|
||||
ld a, PLAYERMOVEMENT_CONTINUE
|
||||
scf
|
||||
|
||||
Reference in New Issue
Block a user