Merge branch 'mistress' into renewables

This commit is contained in:
Thorn Avery 2024-01-01 13:11:44 +11:00
commit 95f83287fe
69 changed files with 553 additions and 322 deletions

View file

@ -25,8 +25,21 @@ MewtwoTrainerHeader:
MewtwoText:
text_asm
ld a, 5
ld [wMusicFade], a
xor a
ld [wMusicFadeID], a
.waitloop
ld a, [wMusicFade]
and a
jr nz, .waitloop
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
ld hl, MewtwoTrainerHeader
call TalkToTrainer
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
jp TextScriptEnd
MewtwoBattleText:

View file

@ -80,8 +80,8 @@ GaryScript2:
jr .saveTrainerId
.Charmander
cp STARTER1 ; changes start here
ld a, $3
jr nz, .Pikachu
ld a, $3
jr .saveTrainerId
.Pikachu ;
cp STARTER4

View file

@ -3,28 +3,12 @@ CinnabarLabTradeRoom_Script:
CinnabarLabTradeRoom_TextPointers:
dw Lab2Text1
dw Lab2Text2
; dw Lab2Text3
dw CinnabarLabTrader
Lab2Text1:
text_far _Lab2Text1
text_end
Lab2Text2:
text_asm
ld a, TRADE_FOR_JENNY
ld [wWhichTrade], a
jr Lab2DoTrade
;Lab2Text3:
; text_asm
; ld a, TRADE_FOR_CRINKLES
; ld [wWhichTrade], a
Lab2DoTrade:
predef DoInGameTradeDialogue
jp TextScriptEnd
CinnabarLabTrader:
text_asm
ld a, TRADE_WITH_SELF

View file

@ -40,7 +40,7 @@ PoryZSalesmanText:
jp nz, .choseNo
ldh [hMoney], a
ldh [hMoney + 2], a
ld a, $21
ld a, $30
ldh [hMoney + 1], a
call HasEnoughMoney
jr nc, .enoughMoney
@ -49,11 +49,13 @@ PoryZSalesmanText:
.enoughMoney
lb bc, DUBIOUS_DISC, 1
call GiveItem
jr nc, .done
jr nc, .BagFull
ld hl, ReceivedDubiousDiscText
call PrintText
xor a
ld [wPriceTemp], a
ld [wPriceTemp + 2], a
ld a, $21
ld a, $30
ld [wPriceTemp + 1], a
ld hl, wPriceTemp + 2
ld de, wPlayerMoney + 2
@ -65,10 +67,17 @@ PoryZSalesmanText:
SetEvent EVENT_BOUGHT_DUBIOUS_DISC
jr .done
.choseNo
ld hl, .RefuseText
jr .printText
ld hl, RefuseText2
call PrintText
jr .done
.alreadyBoughtPoryZ
ld hl, .Text2
call PrintText
jr .done
.BagFull
ld hl, PoryZBagFull
call PrintText
jr .done
.printText
call PrintText
.done
@ -77,17 +86,22 @@ PoryZSalesmanText:
.Text1
text_far _PoryZSalesmanText1
text_end
.RefuseText
text_far _PoryZSalesmanNoText
.Text2
text_far _PoryZSalesmanText2
text_end
.NoMoneyText
text_far _PoryZSalesmanNoMoneyText
text_end
.Text2
text_far _PoryZSalesmanText2
RefuseText2:
text_far _PoryZSalesmanNoText
text_end
ReceivedDubiousDiscText:
text_far _ReceivedDubiousDiscText
sound_get_item_1
text_end
PoryZBagFull:

View file

@ -190,7 +190,9 @@ SafariBallSalesman:
.enoughMoney
lb bc, SAFARI_BALL, 3
call GiveItem
jr nc, .done
jr nc, .BagFull
ld hl, ReceivedSafariBallsText
call PrintText
xor a
ld [wPriceTemp], a
ld [wPriceTemp + 2], a
@ -205,7 +207,13 @@ SafariBallSalesman:
call DisplayTextBoxID
jr .done
.choseNo
ld hl, .RefuseText
ld hl, RefuseText
call PrintText
jr .done
.BagFull
ld hl, SafariBallBagFull
call PrintText
jr .done
.printText
call PrintText
.done
@ -214,13 +222,18 @@ SafariBallSalesman:
.Text1
text_far _SafariBallSalesmanText1
text_end
.NoMoneyText
text_far _SafariBallSalesmanNoMoneyText
text_end
.RefuseText
RefuseText:
text_far _SafariBallSalesmanNoText
text_end
.NoMoneyText
text_far _SafariBallSalesmanNoMoneyText
ReceivedSafariBallsText:
text_far _ReceivedSafariBallsText
sound_get_item_1
text_end
SafariBallBagFull:

View file

@ -220,7 +220,6 @@ ObjectsToHide:
db HS_BILLS_NIDORINO ; Bill's Garden access
db HS_MANSION_GUARD ; Pokemon Mansion basement access
db HS_MT_MOON_CRATER_GUARD ; Mt. Moon Crater access
db HS_CERULEAN_CAVE_GUY ; Cerulean Cave access
db -1 ; end
; Farcalling this caused weird issues so I'm just using a clone

15
scripts/Route10Gate.asm Normal file
View file

@ -0,0 +1,15 @@
Route10Gate_Script:
jp EnableAutoTextBoxDrawing
Route10Gate_TextPointers:
dw Route10GateText1
Route10GateText1:
text_asm
ld a, TRADE_FOR_JENNY
ld [wWhichTrade], a
jr Route10GateDoTrade
Route10GateDoTrade:
predef DoInGameTradeDialogue
jp TextScriptEnd

View file

@ -173,10 +173,6 @@ MissableObjectIDs_6219b:
db HS_SILPH_CO_7F_2
db HS_SILPH_CO_7F_3
db HS_SILPH_CO_7F_4
db HS_SILPH_CO_10F_1
db HS_SILPH_CO_10F_2
db HS_SILPH_CO_11F_1
db HS_SILPH_CO_11F_3
db -1 ; end
SilphCo11Script_62185:
@ -633,8 +629,6 @@ SaffronCityRockets:
db HS_SILPH_CO_7F_2
db HS_SILPH_CO_7F_3
db HS_SILPH_CO_7F_4
db HS_SILPH_CO_10F_1
db HS_SILPH_CO_10F_2
db HS_SILPH_CO_11F_1
db HS_SILPH_CO_11F_3
db -1 ; end

View file

@ -21,6 +21,17 @@ SilphGauntlet7F_ScriptPointers:
ChiefScript1:
CheckEvent EVENT_BEAT_CHIEF
jr nz, .skip
ld a, 5
ld [wMusicFade], a
xor a
ld [wMusicFadeID], a
.waitloop
ld a, [wMusicFade]
and a
jr nz, .waitloop
ld a, SFX_STOP_ALL_MUSIC
call PlaySound
ld a, PLAYER_DIR_UP
ld [wPlayerMovingDirection], a
call UpdateSprites
@ -95,6 +106,7 @@ ChiefScript4:
ld a, HS_CERULEAN_CAVE_GUY
ld [wMissableObjectIndex], a
predef HideObject
SetEvent EVENT_MEWTWO_UNLOCKED
ResetEventRange SILPH_GAUNTLET_EVENTS_START, SILPH_GAUNTLET_EVENTS_END, 1
ld a, $0
@ -117,8 +129,10 @@ SilphGauntlet7F_TextPointers:
ChiefText1:
text_asm
CheckEvent EVENT_MEWTWO_UNLOCKED
jr nz, .chiefSecondFight
CheckEvent EVENT_BEAT_CHIEF ; Check if Chief was beaten
jr nz, .chiefBeaten ; If Chief has been beaten, skip the trainer loading
jr nz, .chiefBeaten1 ; If Chief has been beaten, skip the trainer loading
; standard processing
ld hl, ChiefMonologue
call PrintText
@ -127,6 +141,9 @@ ChiefText1:
call z, WaitForTextScrollButtonPress ; and here.
call EnableAutoTextBoxDrawing ; and here.
CheckEvent EVENT_GOT_MASTER_BALL ; Check if Master Ball was collected.
ld hl, ChiefMonologueMasterBallNotCollected ; If no, load this text...
jr z, .masterBallSkip ; ...then skip.
CheckEvent EVENT_USED_MASTER_BALL ; Check if the Master Ball has been used.
ld hl, ChiefMonologueMasterBallNotUsed ; Load not used by default.
jr z, .masterBallSkip ; In which case, we can skip.
@ -153,12 +170,48 @@ ChiefText1:
ld de, ChiefVictoryText
call SaveEndBattleTextPointers
jr .done
.chiefBeaten
ld hl, ChiefAfterBattleText
.chiefBeaten1
CheckEvent EVENT_GOT_MASTER_BALL ; Check if Master Ball was collected.
ld hl, ChiefAltAfterBattleText ; If no, load this text...
jr z, .noMBallskip ; ...then skip.
ld hl, ChiefAfterBattleText ; otherwise, load this.
.noMBallskip
call PrintText
; fallthrough
.done
jp TextScriptEnd
.chiefSecondFight
CheckEvent EVENT_BEAT_CHIEF ; Check if Chief was beaten
jr nz, .chiefBeaten2 ; If Chief has been beaten, skip the trainer loading
ld hl, ChiefMonologueRematch
call PrintText
ld a, [wSimulatedJoypadStatesEnd] ; ensuring that the text doesn't autoskip.
and a ; yep, here too.
call z, WaitForTextScrollButtonPress ; and here.
call EnableAutoTextBoxDrawing ; and here.
ld c, BANK(Music_MeetEvilTrainer)
ld a, MUSIC_MEET_EVIL_TRAINER
call PlayMusic
call Delay3
ld hl, wd72d
set 6, [hl]
set 7, [hl]
ld a, OPP_CHIEF
ld [wCurOpponent], a
ld a, 2
ld [wTrainerNo], a
ld [wIsTrainerBattle], a
ld a, $1
ld [wSilphGauntlet7FCurScript], a
ld hl, ChiefDefeatedText2
ld de, ChiefVictoryText2
call SaveEndBattleTextPointers
jr .done
.chiefBeaten2
ld hl, ChiefAfterBattleText2
call PrintText
jr .done
ChiefMonologue:
text_far _ChiefMonologue
@ -171,6 +224,10 @@ ChiefMonologueMasterBallUsed:
ChiefMonologueMasterBallNotUsed:
text_far _ChiefMonologueMasterBallNotUsed
text_end
ChiefMonologueMasterBallNotCollected:
text_far _ChiefMonologueMasterBallNotCollected
text_end
ChiefDefeatedText:
text_far _ChiefDefeatedText
@ -183,6 +240,26 @@ ChiefVictoryText:
ChiefAfterBattleText:
text_far _ChiefAfterBattleText
text_end
ChiefAltAfterBattleText:
text_far _ChiefAltAfterBattleText
text_end
ChiefMonologueRematch:
text_far _ChiefMonologueRematch
text_end
ChiefDefeatedText2:
text_far _ChiefDefeatedText2
text_end
ChiefVictoryText2:
text_far _ChiefVictoryText2
text_end
ChiefAfterBattleText2:
text_far _ChiefAfterBattleText2
text_end
ChiefPC:
text_far _ChiefPCText