mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-11-12 08:15:00 +13:00
Candy Jar finished
- Fixed a bug where the Candy Jar would load `wIsInBattle`'s 01, causing it to zero itself out every time. - Fixed a bug where the Candy Jar would display `wMysteryBoxActive` due to the way `text_bcd` was being used. Replaced with `text_decimal` so it actually displays properly as well. No hex!! - Added a test function for the evolution in the debug party because that's cool
This commit is contained in:
parent
228de2b718
commit
9c953339af
|
|
@ -1838,6 +1838,6 @@ _MysteryBoxCloseText::
|
||||||
_CandyJarCount::
|
_CandyJarCount::
|
||||||
text "MELTAN CANDY:"
|
text "MELTAN CANDY:"
|
||||||
line "@"
|
line "@"
|
||||||
text_bcd wCandyJarCount, 2 | LEADING_ZEROES | LEFT_ALIGN
|
text_decimal wCandyJarCount, 1, 2
|
||||||
text "0"
|
text "0"
|
||||||
prompt
|
prompt
|
||||||
|
|
@ -846,15 +846,16 @@ FaintEnemyPokemon:
|
||||||
cp $E7 ; Is it Meltan?
|
cp $E7 ; Is it Meltan?
|
||||||
jr nz, .skip ; Continue as normal if not.
|
jr nz, .skip ; Continue as normal if not.
|
||||||
|
|
||||||
|
; Increment the Candy Jar count.
|
||||||
|
ld a, [wCandyJarCount]
|
||||||
|
inc a
|
||||||
|
ld [wCandyJarCount], a
|
||||||
|
|
||||||
; For engine\overworld\clear_variables.asm
|
; For engine\overworld\clear_variables.asm
|
||||||
; Needed so the Mystery Box effect isn't cleared upon leaving battle.
|
; Needed so the Mystery Box effect isn't cleared upon leaving battle.
|
||||||
ld a, $01
|
ld a, $01
|
||||||
ld [wDontSwitchOffMysteryBoxYet], a
|
ld [wDontSwitchOffMysteryBoxYet], a
|
||||||
|
|
||||||
ld a, [wCandyJarCount]
|
|
||||||
inc a
|
|
||||||
ld [wCandyJarCount], a
|
|
||||||
|
|
||||||
ld hl, MeltanIncrement ; Load text to show it's going up.
|
ld hl, MeltanIncrement ; Load text to show it's going up.
|
||||||
call PrintText ; Yep text.
|
call PrintText ; Yep text.
|
||||||
call PrintEmptyString ; vs text likes this.
|
call PrintEmptyString ; vs text likes this.
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,10 @@ IF DEF(_DEBUG)
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wPlayerSex], a
|
ld [wPlayerSex], a
|
||||||
|
|
||||||
|
; Test Candy Jar Evolution
|
||||||
|
ld a, 39
|
||||||
|
ld [wCandyJarCount], a
|
||||||
|
|
||||||
; Get all badges except Earth Badge.
|
; Get all badges except Earth Badge.
|
||||||
ld a, ~(1 << BIT_EARTHBADGE)
|
ld a, ~(1 << BIT_EARTHBADGE)
|
||||||
ld [wObtainedBadges], a
|
ld [wObtainedBadges], a
|
||||||
|
|
|
||||||
|
|
@ -144,7 +144,7 @@ ItemUseCandyJar:
|
||||||
and a
|
and a
|
||||||
jp nz, ItemUseNotTime
|
jp nz, ItemUseNotTime
|
||||||
|
|
||||||
ld [wCandyJarCount], a ; Get the Candy count
|
ld a, [wCandyJarCount] ; Get the Candy count
|
||||||
cp 40 ; Is it 40? (represented as 400)
|
cp 40 ; Is it 40? (represented as 400)
|
||||||
jr z, .Evolve ; If yes, jump to Evo Stone Script
|
jr z, .Evolve ; If yes, jump to Evo Stone Script
|
||||||
ld hl, CandyJarCount ; Otherwise, load the Candy total...
|
ld hl, CandyJarCount ; Otherwise, load the Candy total...
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue