Implement Surf technique, avoid facing-tile events when player has yet to STEP_TURN or while not in BOARDEVENT_HANDLE_BOARD [bugfix to previous two commits] (#34)

new tile permission SPACE_TILE added, which acts as WATER_TILE while on PLAYER_SURF or PLAYER_SURF_PIKA state, as LAND_TILE otherwise
This commit is contained in:
xCrystal
2023-12-30 00:27:50 +01:00
parent 303deca959
commit aa91909388
9 changed files with 96 additions and 38 deletions

View File

@@ -408,6 +408,16 @@ SurfFunction:
ld a, $80
ret
SurfAutoScript::
readmem wSurfingPlayerState
writevar VAR_MOVEMENT
special UpdatePlayerSprite
special PlayMapMusic
; step into the water (slow_step DIR, step_end)
special SurfStartStep
applymovement PLAYER, wMovementBuffer
end
SurfFromMenuScript:
special UpdateTimePals
@@ -456,7 +466,7 @@ GetSurfType:
ld a, PLAYER_SURF
ret
CheckDirection:
CheckDirection::
; Return carry if a tile permission prevents you
; from moving in the direction you're facing.