From 75b59760dff6405faf87b5ba901ffe879f501da6 Mon Sep 17 00:00:00 2001 From: May Evans <36418502+PlagueVonKarma@users.noreply.github.com> Date: Sat, 17 Dec 2022 19:00:21 +0000 Subject: [PATCH] Corrected gym scaling for Brock Thanks to Chatot4444! --- README.md | 1 + scripts/PewterGym.asm | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b36fb00..d85bfb25 100644 --- a/README.md +++ b/README.md @@ -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! diff --git a/scripts/PewterGym.asm b/scripts/PewterGym.asm index 79d41ace..0b7ffff8 100644 --- a/scripts/PewterGym.asm +++ b/scripts/PewterGym.asm @@ -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