mirror of
https://github.com/thornAvery/jep-hack.git
synced 2025-09-17 02:30:50 +12:00
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:
parent
28b35d93f8
commit
7efbb642d5
|
@ -179,12 +179,12 @@ LongAnim_UpdateVariables:
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld b, a
|
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
|
call ComputeHPBarPixels
|
||||||
|
ld a, e
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
ld a, e
|
|
||||||
ld hl, wCurHPBarPixels
|
ld hl, wCurHPBarPixels
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .loop
|
jr z, .loop
|
||||||
|
@ -370,13 +370,14 @@ ShortHPBar_CalcPixelFrame:
|
||||||
|
|
||||||
ld b, 0
|
ld b, 0
|
||||||
.loop
|
.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
|
ld a, l
|
||||||
sub HP_BAR_LENGTH_PX
|
sub HP_BAR_LENGTH_PX
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, h
|
ld a, h
|
||||||
sbc $0
|
sbc $0
|
||||||
ld h, a
|
ld h, a
|
||||||
|
jr z, .done
|
||||||
jr c, .done
|
jr c, .done
|
||||||
inc b
|
inc b
|
||||||
jr .loop
|
jr .loop
|
||||||
|
|
|
@ -13,8 +13,27 @@ ViridianGymBlueScript:
|
||||||
checkflag ENGINE_EARTHBADGE
|
checkflag ENGINE_EARTHBADGE
|
||||||
iftrue .FightDone
|
iftrue .FightDone
|
||||||
writetext LeaderBlueBeforeText
|
writetext LeaderBlueBeforeText
|
||||||
|
readvar VAR_PLAYERGENDER
|
||||||
|
ifequal FEMALE, .PlayerIsFemale
|
||||||
|
ifequal ENBY, .PlayerIsEnby
|
||||||
|
writetext LeaderBlueJohtoBoyText
|
||||||
waitbutton
|
waitbutton
|
||||||
closetext
|
closetext
|
||||||
|
sjump .cont
|
||||||
|
|
||||||
|
.PlayerIsFemale:
|
||||||
|
writetext LeaderBlueJohtoGirlText
|
||||||
|
waitbutton
|
||||||
|
closetext
|
||||||
|
sjump .cont
|
||||||
|
|
||||||
|
.PlayerIsEnby:
|
||||||
|
writetext LeaderBlueJohtoNBText
|
||||||
|
waitbutton
|
||||||
|
closetext
|
||||||
|
sjump .cont
|
||||||
|
|
||||||
|
.cont:
|
||||||
winlosstext LeaderBlueWinText, 0
|
winlosstext LeaderBlueWinText, 0
|
||||||
loadtrainer BLUE, BLUE1
|
loadtrainer BLUE, BLUE1
|
||||||
startbattle
|
startbattle
|
||||||
|
@ -90,8 +109,19 @@ LeaderBlueBeforeText:
|
||||||
para "battling you right"
|
para "battling you right"
|
||||||
line "now."
|
line "now."
|
||||||
|
|
||||||
para "Ready, JOHTO"
|
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.
|
||||||
line "CHAMP?"
|
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
|
done
|
||||||
|
|
||||||
LeaderBlueWinText:
|
LeaderBlueWinText:
|
||||||
|
|
Loading…
Reference in a new issue