Strong Arm, Water Sport, and more HMs.

This adds Rock Climb functionality to Strong Arm and Dive functionality to Water Sport, as discussed in the server. HMs have been added, but we need 16bit Items to add Wind Ride, and I haven't finished their functionality.

The Rock Climb tile is a bit terrible, it's not easy to notice. Maybe change so that it works well with yellow or another colour?

This does not build due to issues with effect_commands.asm, but since Zeta is meant to be working on the mapping and Water Sport anyway, it seems to be up his alley.

I ported over much of the underwater assets Rangi was using as they looked very pretty. I imagine it'll be fun to utilise going forward. May as well, right?

I shall now lay down in a dark room.

Review: c21561ea71 (diff-5508f3b794fc68821ba35e94b6a293b2aaaa16c02a1b34fac70d03fd2f74c4b2R113)
This commit is contained in:
Llinos Evans 2024-12-28 06:26:01 +00:00
parent 4b11121836
commit 093bda0253
77 changed files with 993 additions and 97 deletions

View file

@ -1143,13 +1143,22 @@ TryTileCollisionEvent::
.headbutt
ld a, [wFacingTileID]
call CheckHeadbuttTreeTile
jr nz, .surf
jr nz, .strong_arm
farcall TryHeadbuttOW
jr c, .done
jr .noevent
.strong_arm
ld a, [wFacingTileID]
call CheckRockyWallTile
jr nz, .surf
farcall TryStrongArmOW
jr .done
.surf
farcall TrySurfOW
jr c, .done
farcall TryWaterSportOW
jr nc, .noevent
jr .done

View file

@ -98,6 +98,8 @@ CheckUpdatePlayerSprite:
jr c, .ok
call .CheckSurfing
jr c, .ok
call .CheckDiving
jr c, .ok
call .CheckSurfing2
jr c, .ok
ret
@ -116,6 +118,18 @@ CheckUpdatePlayerSprite:
scf
ret
.CheckDiving:
ld a, [wMapTileset]
cp TILESET_UNDERWATER
jr nz, .not_underwater
ld a, PLAYER_WATER_SPORT
ld [wPlayerState], a
scf
ret
.not_underwater
and a
ret
.CheckSurfing2:
ld a, [wPlayerState]
cp PLAYER_NORMAL

View file

@ -33,6 +33,8 @@ DoPlayerMovement::
ld a, [wPlayerState]
cp PLAYER_NORMAL
jr z, .Normal
cp PLAYER_WATER_SPORT
jr z, .Normal
cp PLAYER_SURF
jr z, .Surf
cp PLAYER_SURF_PIKA

View file

@ -237,6 +237,8 @@ ScriptCommandTable:
dw Script_trainerpic ; aa
dw Script_loadmonindex ; ab
dw Script_checkmaplockedmons ; ac
dw Script_divemap
dw Script_divewarp
assert_table_length NUM_EVENT_COMMANDS
StartScript:
@ -2414,3 +2416,38 @@ LoadScriptPokemonID:
jp nz, GetPokemonIDFromIndex
ld a, [wScriptVar]
ret
Script_divemap:
call GetScriptByte
ld [wDiveMapGroup], a
call GetScriptByte
ld [wDiveMapNumber], a
call GetScriptByte
ld [wDiveDeltaX], a
call GetScriptByte
ld [wDiveDeltaY], a
ret
Script_divewarp:
ld a, [wDiveMapGroup]
ld [wMapGroup], a
ld a, [wDiveMapNumber]
ld [wMapNumber], a
ld a, [wXCoord]
ld b, a
ld a, [wDiveDeltaX]
add b
ld [wXCoord], a
ld a, [wYCoord]
ld b, a
ld a, [wDiveDeltaY]
add b
ld [wYCoord], a
ld a, -1
ld [wDefaultSpawnpoint], a
ld a, MAPSETUP_WARP
ld [hMapEntryMethod], a
ld a, 1
call LoadMapStatus
call StopScript
ret

View file

@ -64,6 +64,7 @@ CheckGrassCollision::
db COLL_LONG_GRASS
db COLL_CUT_28
db COLL_WATER
db COLL_DIVE_DOWN
db COLL_GRASS_48
db COLL_GRASS_49
db COLL_GRASS_4A

View file

@ -4,6 +4,7 @@ HandleNewMap:
call ResetFlashIfOutOfCave
call GetCurrentMapSceneID
call ResetBikeFlags
call ResetDiveMap
call ResetMapLockedIDs
ld a, MAPCALLBACK_NEWMAP
call RunMapCallback