mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Implement Waterfall technique (#34)
This commit is contained in:
parent
aa91909388
commit
a40f7cdde7
@ -51,7 +51,7 @@ if DEF(_DEBUG)
|
||||
|
||||
newgroup DEBUGLEVEL_2
|
||||
map_const DEBUGLEVEL_2_MAP_1, 15, 10 ; 1
|
||||
map_const DEBUGLEVEL_2_MAP_2, 5, 5 ; 2
|
||||
map_const DEBUGLEVEL_2_MAP_2, 5, 8 ; 2
|
||||
endgroup
|
||||
|
||||
newgroup DEBUGLEVEL_3
|
||||
|
@ -4,9 +4,11 @@
|
||||
const TECHNIQUE_FLASH_F
|
||||
const TECHNIQUE_SURF_F
|
||||
const TECHNIQUE_ROCK_SMASH_F
|
||||
const TECHNIQUE_WATERFALL_F
|
||||
DEF NUM_TECHNIQUES EQU const_value
|
||||
|
||||
DEF TECHNIQUE_CUT EQU 1 << TECHNIQUE_CUT_F
|
||||
DEF TECHNIQUE_FLASH EQU 1 << TECHNIQUE_FLASH_F
|
||||
DEF TECHNIQUE_SURF EQU 1 << TECHNIQUE_SURF_F
|
||||
DEF TECHNIQUE_ROCK_SMASH EQU 1 << TECHNIQUE_ROCK_SMASH_F
|
||||
DEF TECHNIQUE_WATERFALL EQU 1 << TECHNIQUE_WATERFALL_F
|
||||
|
@ -112,10 +112,10 @@ if DEF(_DEBUG)
|
||||
connection north, DebugLevel1_Map1, DEBUGLEVEL_1_MAP_1, 0
|
||||
|
||||
map_attributes DebugLevel2_Map1, DEBUGLEVEL_2_MAP_1, $00, WEST
|
||||
connection west, DebugLevel2_Map2, DEBUGLEVEL_2_MAP_2, 3
|
||||
connection west, DebugLevel2_Map2, DEBUGLEVEL_2_MAP_2, 0
|
||||
|
||||
map_attributes DebugLevel2_Map2, DEBUGLEVEL_2_MAP_2, $00, EAST
|
||||
connection east, DebugLevel2_Map1, DEBUGLEVEL_2_MAP_1, -3
|
||||
connection east, DebugLevel2_Map1, DEBUGLEVEL_2_MAP_1, 0
|
||||
|
||||
map_attributes DebugLevel3_Map1, DEBUGLEVEL_3_MAP_1, $00, 0
|
||||
|
||||
|
@ -130,7 +130,7 @@
|
||||
tilecoll BLUE_SPACE, FLOOR, WARP_CARPET_DOWN, FLOOR ; 81
|
||||
tilecoll BLUE_SPACE, FLOOR, FLOOR, FLOOR ; 82
|
||||
tilecoll BLUE_SPACE, FLOOR, FLOOR, FLOOR ; 83
|
||||
tilecoll BLUE_SPACE, FLOOR, FLOOR, FLOOR ; 84
|
||||
tilecoll BLUE_SPACE, WATER, WATER, WATER ; 84
|
||||
tilecoll BLUE_SPACE, FLOOR, FLOOR, FLOOR ; 85
|
||||
tilecoll BLUE_SPACE, FLOOR, FLOOR, FLOOR ; 86
|
||||
tilecoll BLUE_SPACE, FLOOR, FLOOR, FLOOR ; 87
|
||||
@ -162,7 +162,7 @@
|
||||
tilecoll POKEMON_SPACE, FLOOR, WARP_CARPET_DOWN, FLOOR ; a1
|
||||
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a2
|
||||
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a3
|
||||
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a4
|
||||
tilecoll POKEMON_SPACE, WATER, WATER, WATER ; a4
|
||||
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a5
|
||||
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a6
|
||||
tilecoll POKEMON_SPACE, FLOOR, FLOOR, FLOOR ; a7
|
||||
@ -194,7 +194,7 @@
|
||||
tilecoll GREEN_SPACE, FLOOR, WARP_CARPET_DOWN, FLOOR ; c1
|
||||
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; c2
|
||||
tilecoll MINIGAME_SPACE, FLOOR, FLOOR, FLOOR ; c3
|
||||
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; c4
|
||||
tilecoll GREEN_SPACE, WATER, WATER, WATER ; c4
|
||||
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; c5
|
||||
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; c6
|
||||
tilecoll MINIGAME_SPACE, FLOOR, FLOOR, FLOOR ; c7
|
||||
@ -205,7 +205,7 @@
|
||||
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; cc
|
||||
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; cd
|
||||
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; ce
|
||||
tilecoll FLOOR, FLOOR, FLOOR, FLOOR ; cf
|
||||
tilecoll MINIGAME_SPACE, FLOOR, FLOOR, FLOOR ; cf
|
||||
tilecoll END_SPACE, FLOOR, FLOOR, FLOOR ; d0
|
||||
tilecoll GREEN_SPACE, FLOOR, FLOOR, FLOOR ; d1
|
||||
tilecoll ITEM_SPACE, FLOOR, FLOOR, FLOOR ; d2
|
||||
@ -226,7 +226,7 @@
|
||||
tilecoll GREY_SPACE, FLOOR, WARP_CARPET_DOWN, FLOOR ; e1
|
||||
tilecoll GREY_SPACE, FLOOR, FLOOR, FLOOR ; e2
|
||||
tilecoll GREY_SPACE, FLOOR, FLOOR, FLOOR ; e3
|
||||
tilecoll GREY_SPACE, FLOOR, FLOOR, FLOOR ; e4
|
||||
tilecoll GREY_SPACE, WATER, WATER, WATER ; e4
|
||||
tilecoll GREY_SPACE, FLOOR, FLOOR, FLOOR ; e5
|
||||
tilecoll GREY_SPACE, FLOOR, FLOOR, FLOOR ; e6
|
||||
tilecoll GREY_SPACE, FLOOR, FLOOR, FLOOR ; e7
|
||||
|
@ -3,4 +3,4 @@
|
||||
&&&67&&67&&&&$$$$*+:;$$$$"#23
()89
!01
$$&&&&
@@@@@@@@@@@@@@@@%&&&%&&&%&&&%&&&&&&&&&&&&&&&&&&&&&&'&&&'&&&'&&&'67&&67&&$$%&&'%'
&&&&&&&&
|
||||
&
|
||||
67'67&'&&&&&&&&&&&&%&&&&&&&&&&'&&&
|
||||
&&&$$()89IIIIJJJJNO^_JJJJNO^_JJZZZZYYYYZZZZYYYYJJZZZZYYYYLL;;;;====;;;;====;;;KLLL===LLLM;;;KLLL===LLLM\LLL===LLL];;;LLLLLLLL====;;;;LL>?E>?>?>?>?>?>?>?>?>?E>?>?>?>?>?>?>?>?E>?>?>?>?>?>?>?>?>?E>?;;<<;;<<;;<<;;<<<<==<<==<<==<<==<+,,+;<<;;<<;;<<,,-<<<=-<<==<<==;;<<;;<<;KLLKLLL<<==<<==LLM=LLLM<<<<<<<<LL<<L;<<<<<<<<<<<<LL<<=L,,,,<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<LLLLLLLL<<<<<<<<FGLLVWLL;KL囹=LLLMLLLL789:NO^_MK6666HHHHHHHHRRRR蒟<01>珮<01>粤<05>タチミムタチミムタチミムタチミムタチNOミム^_タチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノNOリル^_ネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモフヘワントナヤユニヌヨラハヒレロトナNOヤユ^_トナヤユニヌヨラハヒレロフヘワントナヤユニヌヨラハヒレロトナヤユトナヤユニヌヨラハヒレロフヘワントナヤユニヌヨラハヒレロトナヤユトナヤユニヌヨラハヒレロフヘワントナヤユニヌヨラハヒレロトナヤユトナヤユニヌヨラハヒレロホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマNO゙゚^_ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚
|
||||
&&&$$()89IIIIJJJJNO^_JJJJNO^_JJZZZZYYYYZZZZYYYYJJZZZZYYYYLL;;;;====;;;;====;;;KLLL===LLLM;;;KLLL===LLLM\LLL===LLL];;;LLLLLLLL====;;;;LL>?E>?>?>?>?>?>?>?>?>?E>?>?>?>?>?>?>?>?E>?>?>?>?>?>?>?>?>?E>?;;<<;;<<;;<<;;<<<<==<<==<<==<<==<+,,+;<<;;<<;;<<,,-<<<=-<<==<<==;;<<;;<<;KLLKLLL<<==<<==LLM=LLLM<<<<<<<<LL<<L;<<<<<<<<<<<<LL<<=L,,,,<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<LLLLLLLL<<<<<<<<FGLLVWLL;KL囹=LLLMLLLL789:NO^_MK6666HHHHHHHHRRRR蒟<01>珮<01>粤<05>タチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムタチミムネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルネノリルツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモツテメモフヘワントナヤユニヌヨラハヒレロトナヤユトナヤユニヌヨラハヒレロフヘワントナヤユニヌヨラハヒレロトナヤユトナヤユニヌヨラハヒレロフヘワントナヤユニヌヨラハヒレロトナヤユトナヤユニヌヨラハヒレロフヘワントナヤユニヌヨラハヒレロトナヤユトナヤユニヌヨラハヒレロホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚ホマ゙゚
|
@ -667,7 +667,7 @@ WaterfallFunction:
|
||||
ld a, $80
|
||||
ret
|
||||
|
||||
CheckMapCanWaterfall:
|
||||
CheckMapCanWaterfall::
|
||||
ld a, [wPlayerDirection]
|
||||
and $c
|
||||
cp FACE_UP
|
||||
@ -682,6 +682,19 @@ CheckMapCanWaterfall:
|
||||
scf
|
||||
ret
|
||||
|
||||
Script_WaterfallAuto::
|
||||
.loop
|
||||
playsound SFX_SURF
|
||||
applymovement PLAYER, .SlowStepUp
|
||||
callasm CheckContinueWaterfall
|
||||
iffalse .loop
|
||||
callasm SFXChannelsOff ; end SFX_SURF if still playing
|
||||
end
|
||||
|
||||
.SlowStepUp:
|
||||
slow_step UP
|
||||
step_end
|
||||
|
||||
Script_WaterfallFromMenu:
|
||||
reloadmappart
|
||||
special UpdateTimePals
|
||||
@ -693,12 +706,16 @@ Script_UsedWaterfall:
|
||||
closetext
|
||||
playsound SFX_BUBBLEBEAM
|
||||
.loop
|
||||
applymovement PLAYER, .WaterfallStep
|
||||
callasm .CheckContinueWaterfall
|
||||
applymovement PLAYER, WaterfallStep
|
||||
callasm CheckContinueWaterfall
|
||||
iffalse .loop
|
||||
end
|
||||
|
||||
.CheckContinueWaterfall:
|
||||
.UseWaterfallText:
|
||||
text_far _UseWaterfallText
|
||||
text_end
|
||||
|
||||
CheckContinueWaterfall:
|
||||
xor a
|
||||
ldh [hScriptVar], a
|
||||
ld a, [wPlayerTile]
|
||||
@ -708,14 +725,10 @@ Script_UsedWaterfall:
|
||||
ldh [hScriptVar], a
|
||||
ret
|
||||
|
||||
.WaterfallStep:
|
||||
WaterfallStep:
|
||||
turn_waterfall UP
|
||||
step_end
|
||||
|
||||
.UseWaterfallText:
|
||||
text_far _UseWaterfallText
|
||||
text_end
|
||||
|
||||
TryWaterfallOW::
|
||||
ld d, WATERFALL
|
||||
call CheckPartyMove
|
||||
|
@ -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
|
||||
|
@ -26,7 +26,7 @@ DebugLevel2_Map1_MapEvents:
|
||||
def_bg_events
|
||||
|
||||
def_object_events
|
||||
object_event 4, 13, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_ROCK, 0, ObjectEvent, -1
|
||||
object_event 6, 13, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_ROCK, 0, ObjectEvent, -1
|
||||
object_event 5, 12, SPRITE_ROCK, SPRITEMOVEDATA_SMASHABLE_ROCK, 0, 0, -1, -1, 0, OBJECTTYPE_ROCK, 0, ObjectEvent, -1
|
||||
|
||||
DebugLevel2_Map1_MapSpaces:
|
||||
|
@ -11,7 +11,7 @@ DebugLevel2_Map2_MapEvents:
|
||||
def_warp_events
|
||||
|
||||
def_anchor_events
|
||||
anchor_event 9, 6, 0
|
||||
anchor_event 9, 12, 0
|
||||
|
||||
def_coord_events
|
||||
|
||||
@ -20,8 +20,14 @@ DebugLevel2_Map2_MapEvents:
|
||||
def_object_events
|
||||
|
||||
DebugLevel2_Map2_MapSpaces:
|
||||
space 8, 6, $0, 1 ; 0
|
||||
space 6, 6, $0, 2 ; 1
|
||||
space 4, 6, $0, 3 ; 2
|
||||
space 2, 6, $0, 4 ; 3
|
||||
space 0, 6, $0, 4 ; 4
|
||||
space 8, 12, $0, 1 ; 0
|
||||
space 6, 12, $0, 2 ; 1
|
||||
space 4, 12, $0, 3 ; 2
|
||||
space 2, 12, $0, 4 ; 3
|
||||
space 2, 10, $0, 5 ; 4
|
||||
space 2, 8, $0, 6 ; 5
|
||||
space 2, 2, $0, 7 ; 6
|
||||
space 4, 2, $0, 8 ; 7
|
||||
space 6, 2, $0, 9 ; 8
|
||||
space 6, 6, $0, 10 ; 9
|
||||
space 6, 8, $0, 10 ; 10
|
||||
|
@ -1 +1 @@
|
||||
!!!!!À€€€€
|
||||
„„„,,,„„À!„!!!„„€€
|
Loading…
Reference in New Issue
Block a user