LGPE Beauty Event

This is basically done, but has a few glitches to iron out that I don't have time to do today. So, I'm sending this in as-is with the intent to finish (or someone else can idc) it later.

I initially thought to restrict this to after Vermilion Gym but Persian is really bad and Arcanine doesn't compare to the L30 Dugtrio, so I think it's ok. Just barely balances itself out.

Bugs:
- GiveMonName doesn't work properly for the Vermilion Beauty after receiving the Pokemon, jank ensues.
- Text scrolls immediately when receiving the Pokemon from the Vermilion Beauty.
This commit is contained in:
Llinos Evans 2023-06-07 11:17:47 +01:00
parent cd8f73b99f
commit 35851ef6a9
12 changed files with 243 additions and 25 deletions

View file

@ -153,7 +153,8 @@
const_next $150 const_next $150
const_skip const_skip
const EVENT_GOT_BIKE_VOUCHER const EVENT_GOT_BIKE_VOUCHER
const_skip 4 const EVENT_VERMILION_BEAUTY_DONE
const_skip 3
const EVENT_SEEL_FAN_BOAST const EVENT_SEEL_FAN_BOAST
const EVENT_PIKACHU_FAN_BOAST const EVENT_PIKACHU_FAN_BOAST
const_skip 8 const_skip 8

View file

@ -35,8 +35,8 @@ DEF PC_ITEM_CAPACITY EQU 50
; TwoOptionMenuStrings indexes (see data/yes_no_menu_strings.asm) ; TwoOptionMenuStrings indexes (see data/yes_no_menu_strings.asm)
const_def const_def
const YES_NO_MENU ; 0 const YES_NO_MENU ; 0
const NORTH_WEST_MENU ; 1 const BOY_GIRL_MENU ; 1
const SOUTH_EAST_MENU ; 2 const CATS_DOGS_MENU ; 2
const WIDE_YES_NO_MENU ; 3 const WIDE_YES_NO_MENU ; 3
const NORTH_EAST_MENU ; 4 const NORTH_EAST_MENU ; 4
const TRADE_CANCEL_MENU ; 5 const TRADE_CANCEL_MENU ; 5

View file

@ -30,5 +30,6 @@ VermilionCity_Object:
object_event 29, 9, SPRITE_MONSTER, WALK, UP_DOWN, 5 ; person object_event 29, 9, SPRITE_MONSTER, WALK, UP_DOWN, 5 ; person
object_event 25, 27, SPRITE_SAILOR, WALK, LEFT_RIGHT, 6 ; person object_event 25, 27, SPRITE_SAILOR, WALK, LEFT_RIGHT, 6 ; person
object_event 31, 27, SPRITE_COOLTRAINER_F, WALK, LEFT_RIGHT, 14 ; person object_event 31, 27, SPRITE_COOLTRAINER_F, WALK, LEFT_RIGHT, 14 ; person
object_event 12, 13, SPRITE_BEAUTY, STAY, DOWN, 15 ; person
def_warps_to VERMILION_CITY def_warps_to VERMILION_CITY

View file

@ -1740,7 +1740,7 @@ _OakSpeechText2B::
prompt prompt
_IntroducePlayerText:: _IntroducePlayerText::
text "Next, what is" text "Now, what is"
line "your name?" line "your name?"
prompt prompt

View file

@ -1,16 +1,30 @@
; The Wild Data here has been redesigned to fit the Vermilion Beauty quest.
; Meowth and Growlithe have 19.6% chances of appearing.
; I've limited the amount of Pokemon that can appear by proxy, making it so it's easier to get what the player wants.
; Oh, and the water encounters are a mishmash of what's seen here over the franchise.
Route6WildMons: Route6WildMons:
def_grass_wildmons 15 ; encounter rate def_grass_wildmons 15 ; encounter rate
db 13, ODDISH db 13, RATTATA
db 13, PSYDUCK db 13, PIDGEY
db 15, PIDGEOTTO db 15, PIDGEOTTO
db 10, MANKEY db 10, MEOWTH
db 12, MANKEY db 12, MEOWTH
db 15, BELLSPROUT db 15, GROWLITHE
db 16, BELLSPROUT db 16, GROWLITHE
db 16, PSYDUCK db 16, JIGGLYPUFF
db 14, JIGGLYPUFF db 14, GROWLITHE
db 16, MEOWTH db 16, ABRA
end_grass_wildmons end_grass_wildmons
def_water_wildmons 0 ; encounter rate def_water_wildmons 10 ; encounter rate
db 12, PSYDUCK
db 12, SLOWPOKE
db 15, PSYDUCK
db 15, SLOWPOKE
db 15, GOLDEEN
db 15, WEIRDUCK
db 15, WEIRDUCK
db 16, SEAKING
db 15, GOLDUCK
db 20, GOLDUCK
end_water_wildmons end_water_wildmons

View file

@ -9,7 +9,7 @@ TwoOptionMenuStrings:
; width, height, blank line before first menu item?, text pointer ; width, height, blank line before first menu item?, text pointer
two_option_menu 4, 3, FALSE, .YesNoMenu two_option_menu 4, 3, FALSE, .YesNoMenu
two_option_menu 5, 3, FALSE, .BoyGirlMenu two_option_menu 5, 3, FALSE, .BoyGirlMenu
two_option_menu 6, 3, FALSE, .SouthEastMenu two_option_menu 6, 3, TRUE, .CatsDogsMenu
two_option_menu 6, 3, FALSE, .YesNoMenu two_option_menu 6, 3, FALSE, .YesNoMenu
two_option_menu 6, 3, FALSE, .NorthEastMenu two_option_menu 6, 3, FALSE, .NorthEastMenu
two_option_menu 7, 3, FALSE, .TradeCancelMenu two_option_menu 7, 3, FALSE, .TradeCancelMenu
@ -26,13 +26,16 @@ TwoOptionMenuStrings:
next "NO@" next "NO@"
; There is probably a better way to word this... ; There is probably a better way to word this...
; Replaced North/West
.BoyGirlMenu: .BoyGirlMenu:
db "BOY" db "BOY"
next "GIRL@" next "GIRL@"
.SouthEastMenu: ; For the Vermilion Beauty event.
db "SOUTH" ; Replaced South/East
next "EAST@" .CatsDogsMenu:
db "CATS"
next "DOGS@"
.NorthEastMenu: .NorthEastMenu:
db "NORTH" db "NORTH"

View file

@ -2379,6 +2379,7 @@ UseBagItem:
ret ret
.returnAfterCapturingMon .returnAfterCapturingMon
call VermilionBeautyCheck ; before you go, would you like to talk about our lord and saviour LGPE?
call GBPalNormal call GBPalNormal
xor a xor a
ld [wCapturedMonSpecies], a ld [wCapturedMonSpecies], a
@ -7225,3 +7226,22 @@ StupidBattleTentFix:
text "Oops! Better" text "Oops! Better"
line "luck next time!" line "luck next time!"
prompt prompt
; Vermilion Beauty functionality.
; If we have a Meowth or Growlithe on our hands, increment the counter.
VermilionBeautyCheck:
ld a, [wBeautyChoice] ; Firstly, was this even started?
jr z, .skipCounting ; Yeah? Alright, skip.
ld a, [wBeautyCounter] ; Now to cap this at 5.
cp 5 ; First, we check if we're at 5...
jr z, .skipCounting ; and if so, we skip doing this at all.
ld a, [wCapturedMonSpecies] ; Now to check the species.
ld hl, wBeautyChoice
cp [hl] ; Is it our guy?
jr nz, .skipCounting ; Fuck right off then.
ld a, [wBeautyCounter] ; Ok, now grab the counter...
inc a ; Increment it...
ld [wBeautyCounter], a ; and get the FUCK out of my office!!!
.skipCounting
ret

View file

@ -48,6 +48,14 @@ IF DEF(_DEBUG)
ld a, 39 ld a, 39
ld [wCandyJarCount], a ld [wCandyJarCount], a
; Test Vermilion Beauty
; Set a to 4 to test increments.
; Set BeautyChoice to GROWLITHE to test the other choice.
ld a, 5
ld [wBeautyCounter], a
ld a, MEOWTH
ld [wBeautyChoice], 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
@ -165,15 +173,14 @@ DebugSetPokedexEntries:
ret ret
DebugItemsList: DebugItemsList:
db POKE_BALL, 99 db MASTER_BALL, 99
db MYSTERY_BOX, 1 db MYSTERY_BOX, 1
db CANDY_JAR, 1 db CANDY_JAR, 1
db BICYCLE, 1 db BICYCLE, 1
db FULL_RESTORE, 99 db FULL_RESTORE, 99
db MAX_REPEL, 99 db MAX_REPEL, 99
db RARE_CANDY, 99 db RARE_CANDY, 99
db MASTER_BALL, 99 db POKE_BALL, 99 ; test ball miss text with this
db ULTRA_BALL, 99
db SECRET_KEY, 1 db SECRET_KEY, 1
db CARD_KEY, 1 db CARD_KEY, 1
db S_S_TICKET, 1 db S_S_TICKET, 1

View file

@ -1 +1 @@
CCC ! ! !1 !11111111Ckk7~|r7~17~wVwww111Cd1111111111111111C-111111111IH111CCC-111111DE111CCC !C !11 !111111Cd|~1|~11|swwwwVwCd1111111111111111Cd1 1111 !TCdVm1|~edTeCCCCd11111ed111e-T.CCCCd11111e-.CTCdC-.CCCCCCTCdCCCCTTTTTTTTTTTC-gCCCCTxxxTxxxxxxCCCkkkTkTkkkkkkkCCCCCCCCCCCCCCCCCCCCCCCCTCCCTCCCCCCCCCC CCC ! ! !1 !11111111Ckk7~|r7~17~wVwww111Cd1111111111111111C-111111111IH111CCC-111111DE111CCC !C !11 !111111Cd|~1|~11|swwwwVwCd1111111111111111Cd1 1111 !TCdV21|~edTeCCCCd11111ed111e-T.CCCCd11111e-.CTCdC-.CCCCCCTCdCCCCTTTTTTTTTTTC-gCCCCTxxxTxxxxxxCCCkkkTkTkkkkkkkCCCCCCCCCCCCCCCCCCCCCCCCTCCCTCCCCCCCCCC

View file

@ -1948,12 +1948,15 @@ wBoxItems:: ds PC_ITEM_CAPACITY * 2 + 1
; bit 7: whether the player has changed boxes before ; bit 7: whether the player has changed boxes before
wCurrentBoxNum:: db wCurrentBoxNum:: db
ds 1
; number of HOF teams ; number of HOF teams
wNumHoFTeams:: db wNumHoFTeams:: db
ds 1 ; was wUnusedD5A3, removed when putting the Mystery Box in. ; LGPE Vermilion Beauty event-related stuff.
; wBeautyChoice stores either MEOWTH or GROWLITHE, which the counter will increment with.
; We use wBeautyChoice to spit out text during the cutscene too.
; wBeautyCounter will count up to 5 and gives the player a L16 Persian or Arcanine depending on what counts up.
wBeautyChoice:: db ; Stores the ID of the Pokemon chosen.
wBeautyCounter:: db ; was wUnusedD5A3, removed when putting the Mystery Box in.
wPlayerCoins:: ds 2 ; BCD wPlayerCoins:: ds 2 ; BCD

View file

@ -274,6 +274,7 @@ VermilionCity_TextPointers:
dw VermilionCityText12 dw VermilionCityText12
dw VermilionCityText13 dw VermilionCityText13
dw RoingusText dw RoingusText
dw VermilionBeauty
VermilionCityText1: VermilionCityText1:
text_far _VermilionCityText1 text_far _VermilionCityText1
@ -459,3 +460,120 @@ EventVermillionCitySSTicket:
PassRefuse: PassRefuse:
text_far _VermillionCityHarborRefuse text_far _VermillionCityHarborRefuse
text_end text_end
; LGPE Beauty who gives you a Persian or Arcanine depending on the game.
; Here, we make it a Cats vs Dogs question and change based on that.
; The way it works is it makes the player catch the opposite Pokemon, and then get the one they picked.
; So Meowth gets Arcanine, and Growlithe gets Persian.
; This code is kind of schizophrenic but it does the job.
VermilionBeauty:
text_asm
CheckEvent EVENT_VERMILION_BEAUTY_DONE ; First, check if the event is actually done.
jp nz, BeautyDone ; Yes? Alright, no need for this.
ld a, [wBeautyChoice] ; Next, we check if wBeautyChoice has been set. This saves an event constant.
cp 0 ; It will never be 0 if the player has made their choice.
jr z, .eventStart ; If it is, then the event needs to start.
; We need to do 2 skips here which triggers me but it works.
; You could put the finish check before the choice check, but then it gets a little weird.
; All it really achieves is weird architecture for like 3-4 less machine cycles.
ld a, [wBeautyCounter] ; Alright, if you got here, then the event is in progress.
cp 5 ; Do you have 5 of the scrunklies?
jr z, .eventIsFinished ; Big if true.
jr nz, .eventInProgress ; Small if false.
.eventStart
ld hl, BeautyText1 ; Let's open the text.
call PrintText
call CatsDogsChoice
ld a, [wCurrentMenuItem] ; Let's load what they picked. 0 is cats, 1 is dogs.
and a
jr nz, .getArcanine ; Skip storing Growlithe if dogs.
ld a, GROWLITHE ; If they picked cats, then store Growlithe.
jr .skip ; I know this looks bad, but if it isn't here, it'd store Growlithe and then go to Meowth anyway.
.getArcanine ; If they get here, they picked dogs, so we store Meowth.
ld a, MEOWTH
.skip ; Now we land here.
ld [wBeautyChoice], a ; Finally store the choice in wBeautyChoice.
ld hl, BeautyText2 ; Now spit it out.
call PrintText
.eventInProgress ; This is a jump point for if the event was already started.
ld a, [wBeautyChoice]
ld [wd11e], a
call GetMonName
ld hl, BeautyChoice
call PrintText
jr .done ; no give pokemon. bad.
.eventIsFinished
call SaveScreenTilesToBuffer1 ; saves us from some corruption disasters if nicknaming.
ld a, [wBeautyChoice]
ld [wd11e], a
call GetMonName
ld hl, BeautyFinish
call PrintText
lb bc, PERSIAN, 16
ld a, [wBeautyChoice] ; Let's make sure they actually need Persian.
cp PERSIAN ; Do they?
jr z, .skip2 ; electric boogaloo
lb bc, ARCANINE, 16 ; ok but skip2 means arc never gets loaded in. very good sequel. disney would NEVER.
.skip2
call GivePokemon
call LoadScreenTilesFromBuffer1 ; saves us from some corruption disasters if nicknaming.
SetEvent EVENT_VERMILION_BEAUTY_DONE ; and now we can finally rest.
.done
jp TextScriptEnd
; This needs to be separate for reasons I refuse to elaborate on for fear of angering God.
BeautyDone:
text_asm
ld a, [wBeautyChoice]
ld [wd11e], a
call GetMonName
ld hl, BeautyExplain
call PrintText
jp TextScriptEnd
; displays cats/dogs choice
CatsDogsChoice:
call SaveScreenTilesToBuffer1
call InitCatsDogsTextBoxParameters
jr DisplayCatsDogsChoice
InitCatsDogsTextBoxParameters:
ld a, $2 ; loads the value for the unused SOUTH/EAST choice, that was changed to say CATS/DOGS
ld [wTwoOptionMenuID], a
hlcoord 12, 8
lb bc, 10, 13
ret
DisplayCatsDogsChoice:
ld a, $14
ld [wTextBoxID], a
call DisplayTextBoxID
jp LoadScreenTilesFromBuffer1
BeautyText1:
text_far _BeautyText1
text_end
BeautyText2:
text_far _BeautyText2
text_end
BeautyChoice:
text_far _BeautyChoice
text_end
BeautyFinish:
text_far _BeautyFinish
text_end
BeautyExplain:
text_far _BeautyExplain
text_end

View file

@ -175,3 +175,54 @@ _VermillionCityHarborRefuse::
text "Alright! Have a" text "Alright! Have a"
line "nice day!" line "nice day!"
done done
_BeautyText1::
text "Hey! Do you like"
line "cats or dogs?"
prompt
_BeautyText2::
text "Ah! I knew it!"
para "Sorry, it was a"
line "silly question..."
prompt ; needed for text to scroll correctly - it looks and acts fine in-game, don't worry.
_BeautyChoice:: ; this is separate for the in-progress event.
text "If you catch 5"
line "@"
text_ram wcd6d ; efficiency - means we don't need two separate texts...
text ", I'll"
cont "give you a great"
cont "#MON!"
para "See you then!"
done
_BeautyFinish::
text "Oh! You've caught"
line "5 "
text_ram wcd6d
text "!"
prompt
_BeautyExplain::
text "When "
text_ram wcd6d
line "evolves, it will"
cont "look like this."
para "Hm? Why did I"
line "make you catch"
cont "the opposite"
cont "#MON?"
para "Well, I wanted"
line "to see if your"
cont "preferences"
cont "stayed the same."
para "It seems I was"
line "wrong!"
done