Safari Game battle type & bug fix

This adds the restoration of the Safari Zone from Pokemon October. There isn't a proper place for this yet, but there will be soon!

It seems to have issues with tiles, which I am assuming to either be the tilemap clearing or something relating to Zeta's custom ball palettes, since I had to add the Safari Ball. Can you get to that, @ZetaNull?

2ff835730b

also fixed the unnumbered route errors.
This commit is contained in:
Llinos Evans 2024-07-21 23:36:56 +01:00
parent 74506bd7b0
commit d3fbd1f846
13 changed files with 197 additions and 44 deletions

View file

@ -58,7 +58,7 @@ ItemEffects:
dw SuperRepelEffect ; SUPER_REPEL
dw MaxRepelEffect ; MAX_REPEL
dw DireHitEffect ; DIRE_HIT
dw NoEffect ; ITEM_2D
dw PokeBallEffect ; SAFARI_BALL, was ITEM_2D
dw RestoreHPEffect ; FRESH_WATER
dw RestoreHPEffect ; SODA_POP
dw RestoreHPEffect ; LEMONADE
@ -240,6 +240,8 @@ PokeBallEffect:
ld a, [wBattleType]
cp BATTLETYPE_CONTEST ; Fixes the Park Ball corrupting graphics when used outside of a Contest
call nz, ReturnToBattle_UseBall
cp BATTLETYPE_SAFARI
call nz, ReturnToBattle_UseBall
ld hl, wOptions
res NO_TEXT_SCROLL, [hl]
@ -691,8 +693,8 @@ PokeBallEffect:
ld a, [wBattleType]
cp BATTLETYPE_TUTORIAL
ret z
cp BATTLETYPE_DEBUG
ret z
cp BATTLETYPE_SAFARI
jr z, .used_safari_ball
cp BATTLETYPE_CONTEST
jr z, .used_park_ball
@ -714,6 +716,11 @@ PokeBallEffect:
dec [hl]
ret
.used_safari_ball
ld hl, wSafariBallsRemaining
dec [hl]
ret
BallMultiplierFunctionTable:
; table of routines that increase or decrease the catch rate based on
; which ball is used in a certain situation.