Corrected gym scaling for Brock

Thanks to Chatot4444!
This commit is contained in:
May Evans 2022-12-17 19:00:21 +00:00
parent f582550f55
commit 75b59760df
2 changed files with 7 additions and 1 deletions

View file

@ -153,6 +153,7 @@ Credits
* Albatross - Several of the new sprites used in the hack (Electivire, Magmortar, Rhyperior, Tangrowth, Glaceon, Sylveon...)
* ZumiIsawhat? - Restorations of beta OST
* Helix Chamber, RacieBeep, et al - Prototype Pokémon sprites
* Chatot4444 - Assisting with gym scaling code
* Vortyne - Reused a bit of code from their pureRGB hack, which was used to assist with making MissingNo. stable. Assisted in bug fixes.
* Rangi - Reused a bit of code from their Red* / Blue* hack to make HMs usable in the overworld!

View file

@ -123,7 +123,12 @@ BrockText:
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
ld a, OPP_BROCK
ld [wCurOpponent], a
ld a, NUM_BADGES + 1 ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge!
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
ld b, 1
call CountSetBits
ld a, [wNumSetBits]
inc a
ld [wTrainerNo], a
ld a, 1