Johto Boy and HP Fix

Mildly scuffed implementation of blue checking your gender to be able to call you Johto Boy/Girl/Kid

Also fixed how fucking slow HP drain is when you have a lot. May require a make tidy to go into effect.
This commit is contained in:
Zeta_Null 2024-12-10 15:57:25 -05:00
parent 28b35d93f8
commit 7efbb642d5
2 changed files with 38 additions and 7 deletions

View file

@ -179,12 +179,12 @@ LongAnim_UpdateVariables:
ld c, a
ld a, [hli]
ld b, a
; BUG: HP bar animation is slow for high HP (see docs/bugs_and_glitches.md)
; BUG: HP bar animation is slow for high HP (see docs/bugs_and_glitches.md) - Fixed
call ComputeHPBarPixels
ld a, e
pop bc
pop de
pop hl
ld a, e
ld hl, wCurHPBarPixels
cp [hl]
jr z, .loop
@ -370,13 +370,14 @@ ShortHPBar_CalcPixelFrame:
ld b, 0
.loop
; BUG: HP bar animation off-by-one error for low HP (see docs/bugs_and_glitches.md)
; BUG: HP bar animation off-by-one error for low HP (see docs/bugs_and_glitches.md) - Fixed
ld a, l
sub HP_BAR_LENGTH_PX
ld l, a
ld a, h
sbc $0
ld h, a
jr z, .done
jr c, .done
inc b
jr .loop

View file

@ -13,8 +13,27 @@ ViridianGymBlueScript:
checkflag ENGINE_EARTHBADGE
iftrue .FightDone
writetext LeaderBlueBeforeText
readvar VAR_PLAYERGENDER
ifequal FEMALE, .PlayerIsFemale
ifequal ENBY, .PlayerIsEnby
writetext LeaderBlueJohtoBoyText
waitbutton
closetext
sjump .cont
.PlayerIsFemale:
writetext LeaderBlueJohtoGirlText
waitbutton
closetext
sjump .cont
.PlayerIsEnby:
writetext LeaderBlueJohtoNBText
waitbutton
closetext
sjump .cont
.cont:
winlosstext LeaderBlueWinText, 0
loadtrainer BLUE, BLUE1
startbattle
@ -90,8 +109,19 @@ LeaderBlueBeforeText:
para "battling you right"
line "now."
para "Ready, JOHTO"
line "CHAMP?"
para "" ; This is a stupid workaround because the game immediately overwrites the last bit of text after it's written with how I've coded this.
done ; I /could/ just have three copies of the same script but I hate that and don't want to. It's stupid and annoying.
LeaderBlueJohtoBoyText:
text "Ready, JOHTO boy?"
done
LeaderBlueJohtoGirlText:
text "Ready, JOHTO girl?"
done
LeaderBlueJohtoNBText:
text "Ready, JOHTO kid?"
done
LeaderBlueWinText: