Candy Jar in Indigo Plateau, plus improvements!

The Candy Jar is now obtainable in the Indigo Plateau, instead of being an item obtained from Chief. I've removed most Chief-related stuff but expect some instability after you beat him, as I don't believe I completely removed the function to call the text.

The Candy Jar will now not collect candies in the following instances;
- It isn't in the bag.
- The total would go over 40.
Just makes sense and ensures players are engaging with the proper intentions. The 40 total is necessary, as over 40 stops the jar from working. This does mean some candies are "lost", but the players see that.

There's a bug where Meltan will have the moves of the Pokemon it's replacing and I don't know why. I've tried a bunch of fixes in `LoadEnemyMonData` but it didn't seem to want to work.
This commit is contained in:
Llinos Evans 2023-06-01 18:40:32 +01:00
parent ed5e6b4867
commit 01737d7b77
8 changed files with 130 additions and 90 deletions

View file

@ -18,6 +18,7 @@ IndigoPlateauLobby_TextPointers:
dw IndigoHealNurseText
dw IndigoPlateauLobbyText2
dw IndigoPlateauLobbyText3
dw CandyJarGuy
dw IndigoCashierText
dw IndigoTradeNurseText
dw ExeggutorTrade
@ -51,3 +52,43 @@ IndigoPlateauLobbyText4:
text_asm
callfar PokecenterChanseyText
jp TextScriptEnd
CandyJarGuy:
text_asm
CheckEvent EVENT_GOT_CANDY_JAR
jr nz, .got_item
ld hl, CandyJarPreReceiveText
call PrintText
lb bc, CANDY_JAR, 1
call GiveItem
jr nc, .bag_full
ld hl, ReceivedCandyJarText
call PrintText
SetEvent EVENT_GOT_CANDY_JAR
jr .done
.bag_full
ld hl, CandyJarNoRoomText
call PrintText
jr .done
.got_item
ld hl, CandyJarExplanationText
call PrintText
.done
jp TextScriptEnd
CandyJarPreReceiveText:
text_far _CandyJarPreReceiveText
text_end
ReceivedCandyJarText:
text_far _ReceivedCandyJarText
sound_get_item_1
text_end
CandyJarExplanationText:
text_far _CandyJarExplanationText
text_end
CandyJarNoRoomText:
text_far _CandyJarNoRoomText
text_end

View file

@ -96,7 +96,7 @@ ChiefScript_That_Seems_Needed:
SilphGauntlet7F_TextPointers:
dw ChiefText1
dw ChiefText2
; dw ChiefText2
ChiefText1:
text_asm
@ -143,44 +143,44 @@ ChiefAfterBattleText:
text_far _ChiefAfterBattleText
text_end
ChiefText2:
text_asm
CheckEvent EVENT_GOT_CANDY_JAR
jr nz, .got_item
ld hl, CandyJarPreReceiveText
call PrintText
lb bc, CANDY_JAR, 1
call GiveItem
jr nc, .bag_full
ld hl, ReceivedCandyJarText
call PrintText
SetEvent EVENT_GOT_CANDY_JAR
jr .done
.bag_full
ld hl, CandyJarNoRoomText
call PrintText
jr .done
.got_item
ld hl, CandyJarExplanationText
call PrintText
.done
jp TextScriptEnd
;ChiefText2:
; text_asm
; CheckEvent EVENT_GOT_CANDY_JAR
; jr nz, .got_item
; ld hl, CandyJarPreReceiveText
; call PrintText
; lb bc, CANDY_JAR, 1
; call GiveItem
; jr nc, .bag_full
; ld hl, ReceivedCandyJarText
; call PrintText
; SetEvent EVENT_GOT_CANDY_JAR
; jr .done
;.bag_full
; ld hl, CandyJarNoRoomText
; call PrintText
; jr .done
;.got_item
; ld hl, CandyJarExplanationText
; call PrintText
;.done
; jp TextScriptEnd
CandyJarPreReceiveText:
text_far _CandyJarPreReceiveText
text_end
;CandyJarPreReceiveText:
; text_far _CandyJarPreReceiveText
; text_end
ReceivedCandyJarText:
text_far _ReceivedCandyJarText
sound_get_item_1
text_end
;ReceivedCandyJarText:
; text_far _ReceivedCandyJarText
; sound_get_item_1
; text_end
CandyJarExplanationText:
text_far _CandyJarExplanationText
text_end
;CandyJarExplanationText:
; text_far _CandyJarExplanationText
; text_end
CandyJarNoRoomText:
text_far _CandyJarNoRoomText
text_end
;CandyJarNoRoomText:
; text_far _CandyJarNoRoomText
; text_end
text_end
; text_end