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

@ -387,6 +387,8 @@ AI_Smart_EffectHandlers:
dbw EFFECT_SOLARBEAM, AI_Smart_Solarbeam
dbw EFFECT_THUNDER, AI_Smart_Thunder
dbw EFFECT_FLY, AI_Smart_Fly
dbw EFFECT_SURF, AI_Smart_Surf
dbw EFFECT_WHIRLPOOL, AI_Smart_Whirlpool
db -1 ; end
AI_Smart_Sleep:
@ -1137,15 +1139,19 @@ AI_Smart_SpDefenseUp2:
ret
AI_Smart_Fly:
; Fly, Dig
; Fly, Dig, Dive, Bounce
; Greatly encourage this move if the player is
; flying or underground, and slower than the enemy.
ld a, [wPlayerSubStatus3]
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
jr nz, .player_hidden
ld a, [wPlayerSubStatus4]
and 1 << SUBSTATUS_UNDERWATER
ret z
.player_hidden
call AICompareSpeed
ret nc
@ -1637,10 +1643,13 @@ AI_Smart_PriorityHit:
call AICompareSpeed
ret c
; Dismiss this move if the player is flying or underground.
; Dismiss this move if the player is flying, underwater, or underground.
ld a, [wPlayerSubStatus3]
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
jp nz, AIDiscourageMove
ld a, [wPlayerSubStatus4]
and 1 << SUBSTATUS_UNDERWATER
jp nz, AIDiscourageMove
; Greatly encourage this move if it will KO the player.
ld a, 1
@ -1663,6 +1672,30 @@ AI_Smart_PriorityHit:
dec [hl]
dec [hl]
ret
AI_Smart_Surf:
AI_Smart_Whirlpool:
; Greatly encourage this move if the player is underwater and the enemy is faster.
ld a, [wLastPlayerCounterMove]
cp DIVE
ret nz
ld a, [wPlayerSubStatus4]
bit SUBSTATUS_UNDERWATER, a
jr z, .could_dive
call AICompareSpeed
ret nc
dec [hl]
dec [hl]
ret
.could_dive
; Try to predict if the player will use Dive this turn.
; 50% chance to encourage this move if the enemy is slower than the player.
call AICompareSpeed
ret c
call AI_50_50
ret c
dec [hl]
ret
AI_Smart_Thief:
; Don't use Thief unless it's the only move available.
@ -2633,15 +2666,19 @@ AI_Smart_Gust:
AI_Smart_FutureSight:
; Greatly encourage this move if the player is
; flying or underground, and slower than the enemy.
; flying, underwater, or underground, and slower than the enemy.
call AICompareSpeed
ret nc
ld a, [wPlayerSubStatus3]
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
jr nz, .player_hidden
ld a, [wPlayerSubStatus4]
and 1 << SUBSTATUS_UNDERWATER
ret z
.player_hidden
dec [hl]
dec [hl]
ret