mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-21 14:48:43 +13:00
Merge branch 'mistress' into renewables
This commit is contained in:
commit
967e835aa3
19 changed files with 392 additions and 141 deletions
|
|
@ -615,6 +615,7 @@ BattleTentGuy_After:
|
|||
call PrintText
|
||||
ld a, [wBTRewards]
|
||||
ld b, RARE_CANDY
|
||||
ld c, a
|
||||
call GiveItem
|
||||
jr nc, .bag_full ; could use money instead here
|
||||
ld hl, ReceivedRewardText
|
||||
|
|
@ -626,6 +627,7 @@ BattleTentGuy_After:
|
|||
ld [wBTRewards], a
|
||||
;ld b, POWER_FEED
|
||||
ld b, BOTTLE_CAP
|
||||
ld c, a
|
||||
call GiveItem
|
||||
jr nc, .bag_full
|
||||
ld hl, ReceivedRewardText
|
||||
|
|
@ -889,7 +891,7 @@ BattleTentGuy2_Heal:
|
|||
done
|
||||
|
||||
ReceivedRewardPreamble:
|
||||
text "Take these"
|
||||
text "Take these,"
|
||||
line "on the house!"
|
||||
prompt
|
||||
text_end
|
||||
|
|
|
|||
|
|
@ -13,6 +13,10 @@ BrunswickGlade_ScriptPointers:
|
|||
dw EndTrainerBattle
|
||||
|
||||
BrunswickGlade_TextPointers:
|
||||
dw BrunswickGladeTrainer1
|
||||
dw BrunswickGladeTrainer2
|
||||
dw BrunswickGladeTrainer3
|
||||
dw BrunswickGladeTrainer4
|
||||
dw GZapRun1
|
||||
dw GZapRun2
|
||||
dw GZapRun3
|
||||
|
|
@ -20,20 +24,16 @@ BrunswickGlade_TextPointers:
|
|||
dw PickUpItemText
|
||||
dw PickUpItemText
|
||||
dw PickUpItemText
|
||||
dw BrunswickGladeTrainer1
|
||||
dw BrunswickGladeTrainer2
|
||||
dw BrunswickGladeTrainer3
|
||||
dw BrunswickGladeTrainer4
|
||||
dw BrunswickGladeSign1
|
||||
|
||||
BrunswickGladeTrainerHeaders:
|
||||
def_trainers
|
||||
BrunswickGladeTrainerHeader0:
|
||||
trainer EVENT_BEAT_BRUNSWICK_GLADE_COOLTRAINER_F, 1, BrunswickGladeBattleText1, BrunswickGladeEndBattleText1, BrunswickGladeAfterBattleText1
|
||||
BrunswickGladeTrainerHeader2: ; don't ask
|
||||
trainer EVENT_BEAT_BRUNSWICK_GLADE_GENTLEMAN, 4, BrunswickGladeBattleText3, BrunswickGladeEndBattleText3, BrunswickGladeAfterBattleText3
|
||||
BrunswickGladeTrainerHeader1:
|
||||
trainer EVENT_BEAT_BRUNSWICK_GLADE_BEAUTY, 4, BrunswickGladeBattleText2, BrunswickGladeEndBattleText2, BrunswickGladeAfterBattleText2
|
||||
trainer EVENT_BEAT_BRUNSWICK_GLADE_GENTLEMAN, 4, BrunswickGladeBattleText2, BrunswickGladeEndBattleText2, BrunswickGladeAfterBattleText2
|
||||
BrunswickGladeTrainerHeader2:
|
||||
trainer EVENT_BEAT_BRUNSWICK_GLADE_BEAUTY, 4, BrunswickGladeBattleText3, BrunswickGladeEndBattleText3, BrunswickGladeAfterBattleText3
|
||||
BrunswickGladeTrainerHeader3:
|
||||
trainer EVENT_BEAT_BRUNSWICK_GLADE_COOLTRAINER_M, 3, BrunswickGladeBattleText4, BrunswickGladeEndBattleText4, BrunswickGladeAfterBattleText4
|
||||
db -1 ; end
|
||||
|
|
|
|||
|
|
@ -128,8 +128,6 @@ FightingDojoText1: ; gym scaling can be removed to make space
|
|||
ld [wTrainerNo], a
|
||||
ld a, 1
|
||||
ld [wIsTrainerBattle], a
|
||||
ld a, $1
|
||||
ld [wGymLeaderNo], a
|
||||
jr .asm_9dba4
|
||||
.normalProcessing
|
||||
CheckEvent EVENT_DEFEATED_FIGHTING_DOJO
|
||||
|
|
@ -164,15 +162,12 @@ FightingDojoText1: ; gym scaling can be removed to make space
|
|||
ld [wTrainerNo], a
|
||||
ld a, 1
|
||||
ld [wIsTrainerBattle], a
|
||||
ld a, $1
|
||||
ld [wGymLeaderNo], a ; play gym music
|
||||
|
||||
;ends here
|
||||
|
||||
ld a, $3
|
||||
ld [wFightingDojoCurScript], a
|
||||
ld [wCurMapScript], a
|
||||
SetEvent EVENT_DEFEATED_FIGHTING_DOJO
|
||||
jr .asm_9dba4
|
||||
.continue1
|
||||
ld hl, FightingDojoText_5ce9d
|
||||
|
|
@ -181,6 +176,7 @@ FightingDojoText1: ; gym scaling can be removed to make space
|
|||
.continue2
|
||||
ld hl, FightingDojoText8
|
||||
call PrintText
|
||||
SetEvent EVENT_DEFEATED_FIGHTING_DOJO
|
||||
.asm_9dba4
|
||||
jp TextScriptEnd
|
||||
|
||||
|
|
|
|||
|
|
@ -23,15 +23,27 @@ ViridianPreGym_ScriptPointers:
|
|||
ViridianGymYujirouPostBattle:
|
||||
ld a, [wIsInBattle]
|
||||
cp $ff
|
||||
jp z, ViridianGymResetScripts
|
||||
jp z, ViridianPreGymResetScripts
|
||||
ld a, $f0
|
||||
ld [wJoyIgnore], a
|
||||
; SetEvents EVENT_BEAT_YUJIROU, EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_0, EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_1 ; Needs to be set here for the correct text to pop up.
|
||||
; ld a, $3
|
||||
; ld [hSpriteIndex], a
|
||||
; call DisplayTextID
|
||||
; xor a
|
||||
; ld [wViridianPreGymCurScript], a
|
||||
ViridianPreGymScriptReceiveBottleCap:
|
||||
ld a, $b
|
||||
ldh [hSpriteIndexOrTextID], a
|
||||
call DisplayTextID
|
||||
SetEvent EVENT_BEAT_YUJIROU
|
||||
lb bc, BOTTLE_CAP, 1
|
||||
call GiveItem
|
||||
jr nc, .BagFull
|
||||
ld a, $c
|
||||
ldh [hSpriteIndexOrTextID], a
|
||||
call DisplayTextID
|
||||
SetEvent EVENT_GOT_YUJIROU_BOTTLE_CAP
|
||||
jp ViridianPreGymResetScripts
|
||||
.BagFull
|
||||
ld a, $d
|
||||
ldh [hSpriteIndexOrTextID], a
|
||||
call DisplayTextID
|
||||
jp ViridianPreGymResetScripts
|
||||
|
||||
ViridianPreGym_TextPointers:
|
||||
dw ViridianPreGymText1
|
||||
|
|
@ -44,6 +56,9 @@ ViridianPreGym_TextPointers:
|
|||
dw ViridianPreGymSign4
|
||||
dw ViridianPreGymStatue1
|
||||
dw ViridianPreGymStatue2
|
||||
dw BeforeReceivedBottleCapText
|
||||
dw ReceivedBottleCapText
|
||||
dw BottleCapNoRoomText
|
||||
|
||||
ViridianPreGymTrainerHeaders:
|
||||
def_trainers
|
||||
|
|
@ -55,44 +70,15 @@ ViridianPreGymTrainerHeader1:
|
|||
|
||||
YujirouText:
|
||||
text_asm
|
||||
CheckEvent EVENT_BEAT_YUJIROU
|
||||
jp z, .yujirouNotBeaten
|
||||
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff
|
||||
jr nz, .rematchMode
|
||||
CheckEvent EVENT_BEAT_YUJIROU
|
||||
jp nz, .YujirouBeaten
|
||||
ld hl, YujirouIntro
|
||||
call PrintText
|
||||
|
||||
ld c, BANK(Music_MeetMaleTrainer)
|
||||
ld a, MUSIC_MEET_MALE_TRAINER
|
||||
call PlayMusic
|
||||
|
||||
ld hl, wd72d
|
||||
set 6, [hl]
|
||||
set 7, [hl]
|
||||
ld hl, YujirouLoseText
|
||||
ld de, YujirouWinText
|
||||
call SaveEndBattleTextPointers
|
||||
ldh a, [hSpriteIndex]
|
||||
ld [wSpriteIndex], a
|
||||
call EngageMapTrainer
|
||||
|
||||
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
|
||||
ld a, OPP_YUJIROU
|
||||
ld [wCurOpponent], a
|
||||
|
||||
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
|
||||
ld b, 1
|
||||
call CountSetBits
|
||||
ld a, [wNumSetBits]
|
||||
inc a
|
||||
ld [wTrainerNo], a
|
||||
|
||||
ld a, 1
|
||||
ld [wIsTrainerBattle], a
|
||||
ld a, $3
|
||||
ld [wViridianPreGymCurScript], a
|
||||
ld [wCurMapScript], a
|
||||
jr .done
|
||||
CheckEventReuseA EVENT_GOT_YUJIROU_BOTTLE_CAP
|
||||
jr nz, .yujirouBeaten
|
||||
call z, ViridianPreGymScriptReceiveBottleCap
|
||||
call DisableWaitingAfterTextDisplay
|
||||
jp .done ; needed due to the rematch script length.
|
||||
.rematchMode ; Rematch functionality. Just loads pre-battle text and his trainer.
|
||||
ld hl, YujirouIntro2
|
||||
call PrintText
|
||||
|
|
@ -105,7 +91,7 @@ YujirouText:
|
|||
ldh a, [hSpriteIndex]
|
||||
ld [wSpriteIndex], a
|
||||
ld hl, YujirouLoseText2
|
||||
ld de, YujirouWinText
|
||||
ld de, YujirouLoseText2
|
||||
call SaveEndBattleTextPointers
|
||||
call EngageMapTrainer
|
||||
ld a, OPP_YUJIROU
|
||||
|
|
@ -114,12 +100,46 @@ YujirouText:
|
|||
ld [wTrainerNo], a
|
||||
ld a, 1
|
||||
ld [wIsTrainerBattle], a
|
||||
ld a, $1
|
||||
ld [wGymLeaderNo], a
|
||||
jr .done
|
||||
.YujirouBeaten
|
||||
.yujirouBeaten
|
||||
ld hl, YujirouAfterBattleText
|
||||
call PrintText
|
||||
jr .done
|
||||
.yujirouNotBeaten
|
||||
ld hl, YujirouIntro
|
||||
call PrintText
|
||||
ld hl, wd72d
|
||||
set 6, [hl]
|
||||
set 7, [hl]
|
||||
ld hl, YujirouLoseText
|
||||
ld de, YujirouLoseText
|
||||
call SaveEndBattleTextPointers
|
||||
ldh a, [hSpriteIndex]
|
||||
ld [wSpriteIndex], a
|
||||
call EngageMapTrainer
|
||||
|
||||
|
||||
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
|
||||
ld a, OPP_YUJIROU
|
||||
ld [wCurOpponent], a
|
||||
|
||||
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
|
||||
ld b, 1
|
||||
call CountSetBits
|
||||
ld a, [wNumSetBits]
|
||||
inc a
|
||||
|
||||
ld [wTrainerNo], a
|
||||
ld a, 1
|
||||
ld [wIsTrainerBattle], a
|
||||
|
||||
;ends here
|
||||
|
||||
xor a
|
||||
ldh [hJoyHeld], a
|
||||
ld a, $3
|
||||
ld [wViridianPreGymCurScript], a
|
||||
ld [wCurMapScript], a
|
||||
.done
|
||||
jp TextScriptEnd
|
||||
|
||||
|
|
@ -131,14 +151,24 @@ YujirouLoseText::
|
|||
text_far _YujirouLoseText
|
||||
text_end
|
||||
|
||||
YujirouWinText::
|
||||
text_far _YujirouWinText
|
||||
text_end
|
||||
|
||||
YujirouAfterBattleText::
|
||||
text_far _YujirouAfterBattleText
|
||||
text_end
|
||||
|
||||
BeforeReceivedBottleCapText:
|
||||
text_far _BeforeReceivedBottleCapText
|
||||
text_end
|
||||
|
||||
ReceivedBottleCapText:
|
||||
text_far _ReceivedBottleCapText
|
||||
sound_get_item_1
|
||||
text_far _BottleCapExplanationText
|
||||
text_end
|
||||
|
||||
BottleCapNoRoomText:
|
||||
text_far _BottleCapNoRoomText
|
||||
text_end
|
||||
|
||||
YujirouIntro2::
|
||||
text_far _YujirouIntro2
|
||||
text_end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue