fix strength cry

This commit is contained in:
Thorn Avery 2023-09-25 12:37:59 +10:00
parent 62ce1723dc
commit 875adc18fd
2 changed files with 23 additions and 0 deletions

View file

@ -177,6 +177,18 @@ StartMenu_Pokemon::
.strength .strength
bit BIT_RAINBOWBADGE, a bit BIT_RAINBOWBADGE, a
jp z, .newBadgeRequired jp z, .newBadgeRequired
ld a, [wWhichPokemon]
ld hl, wPartySpecies
; bumping hl by a, need to make sure carry happens
ld c, a
ld a, l
add a, c
ld l, a
jr nc, .strengthNoCarry
inc h
.strengthNoCarry
ld a, [hl]
ld [wcf91], a
predef PrintStrengthTxt predef PrintStrengthTxt
call GBPalWhiteOutWithDelay3 call GBPalWhiteOutWithDelay3
jp .goBackToMap jp .goBackToMap

View file

@ -30,6 +30,17 @@ BoulderText::
pop af pop af
ld [wWhichPokemon], a ld [wWhichPokemon], a
call GetPartyMonName2 call GetPartyMonName2
ld a, [wWhichPokemon]
ld hl, wPartySpecies
ld c, a
ld a, l
add a, c
ld l, a
jr nc, .noCarry
inc h
.noCarry
ld a, [hl]
ld [wcf91], a
predef PrintStrengthTxt predef PrintStrengthTxt
.done .done
jp TextScriptEnd jp TextScriptEnd