mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-01-12 20:14:02 +13:00
Yujirou is now marginally less of a twat
He now gives you a Bottle Cap when you win, but still crashes the game when you lose for some reason...
This commit is contained in:
parent
2a714f3dff
commit
9b4a9d5839
|
|
@ -36,8 +36,9 @@
|
||||||
const EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_0
|
const EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_0
|
||||||
const EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_1
|
const EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_1
|
||||||
const EVENT_GOT_TM42
|
const EVENT_GOT_TM42
|
||||||
|
const EVENT_GOT_YUJIROU_BOTTLE_CAP
|
||||||
const EVENT_BEAT_YUJIROU
|
const EVENT_BEAT_YUJIROU
|
||||||
const_skip 11
|
const_skip 10
|
||||||
const EVENT_OAK_GOT_PARCEL
|
const EVENT_OAK_GOT_PARCEL
|
||||||
const EVENT_GOT_OAKS_PARCEL
|
const EVENT_GOT_OAKS_PARCEL
|
||||||
const_skip 22
|
const_skip 22
|
||||||
|
|
|
||||||
|
|
@ -128,8 +128,6 @@ FightingDojoText1: ; gym scaling can be removed to make space
|
||||||
ld [wTrainerNo], a
|
ld [wTrainerNo], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wIsTrainerBattle], a
|
ld [wIsTrainerBattle], a
|
||||||
ld a, $1
|
|
||||||
ld [wGymLeaderNo], a
|
|
||||||
jr .asm_9dba4
|
jr .asm_9dba4
|
||||||
.normalProcessing
|
.normalProcessing
|
||||||
CheckEvent EVENT_DEFEATED_FIGHTING_DOJO
|
CheckEvent EVENT_DEFEATED_FIGHTING_DOJO
|
||||||
|
|
@ -164,8 +162,6 @@ FightingDojoText1: ; gym scaling can be removed to make space
|
||||||
ld [wTrainerNo], a
|
ld [wTrainerNo], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wIsTrainerBattle], a
|
ld [wIsTrainerBattle], a
|
||||||
ld a, $1
|
|
||||||
ld [wGymLeaderNo], a ; play gym music
|
|
||||||
|
|
||||||
;ends here
|
;ends here
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,24 @@ ViridianGymYujirouPostBattle:
|
||||||
jp z, ViridianGymResetScripts
|
jp z, ViridianGymResetScripts
|
||||||
ld a, $f0
|
ld a, $f0
|
||||||
ld [wJoyIgnore], a
|
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.
|
ViridianPreGymScriptReceiveBottleCap:
|
||||||
; ld a, $3
|
ld a, $b
|
||||||
; ld [hSpriteIndex], a
|
ldh [hSpriteIndexOrTextID], a
|
||||||
; call DisplayTextID
|
call DisplayTextID
|
||||||
; xor a
|
SetEvent EVENT_BEAT_YUJIROU
|
||||||
; ld [wViridianPreGymCurScript], a
|
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:
|
ViridianPreGym_TextPointers:
|
||||||
dw ViridianPreGymText1
|
dw ViridianPreGymText1
|
||||||
|
|
@ -44,6 +56,9 @@ ViridianPreGym_TextPointers:
|
||||||
dw ViridianPreGymSign4
|
dw ViridianPreGymSign4
|
||||||
dw ViridianPreGymStatue1
|
dw ViridianPreGymStatue1
|
||||||
dw ViridianPreGymStatue2
|
dw ViridianPreGymStatue2
|
||||||
|
dw BeforeReceivedBottleCapText
|
||||||
|
dw ReceivedBottleCapText
|
||||||
|
dw BottleCapNoRoomText
|
||||||
|
|
||||||
ViridianPreGymTrainerHeaders:
|
ViridianPreGymTrainerHeaders:
|
||||||
def_trainers
|
def_trainers
|
||||||
|
|
@ -58,41 +73,12 @@ YujirouText:
|
||||||
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff
|
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff
|
||||||
jr nz, .rematchMode
|
jr nz, .rematchMode
|
||||||
CheckEvent EVENT_BEAT_YUJIROU
|
CheckEvent EVENT_BEAT_YUJIROU
|
||||||
jp nz, .YujirouBeaten
|
jp z, .yujirouNotBeaten
|
||||||
ld hl, YujirouIntro
|
CheckEventReuseA EVENT_GOT_YUJIROU_BOTTLE_CAP
|
||||||
call PrintText
|
jr nz, .yujirouBeaten
|
||||||
|
call z, PewterGymScriptReceiveTM34
|
||||||
ld c, BANK(Music_MeetMaleTrainer)
|
call DisableWaitingAfterTextDisplay
|
||||||
ld a, MUSIC_MEET_MALE_TRAINER
|
jp .done ; needed due to the rematch script length.
|
||||||
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
|
|
||||||
.rematchMode ; Rematch functionality. Just loads pre-battle text and his trainer.
|
.rematchMode ; Rematch functionality. Just loads pre-battle text and his trainer.
|
||||||
ld hl, YujirouIntro2
|
ld hl, YujirouIntro2
|
||||||
call PrintText
|
call PrintText
|
||||||
|
|
@ -105,7 +91,7 @@ YujirouText:
|
||||||
ldh a, [hSpriteIndex]
|
ldh a, [hSpriteIndex]
|
||||||
ld [wSpriteIndex], a
|
ld [wSpriteIndex], a
|
||||||
ld hl, YujirouLoseText2
|
ld hl, YujirouLoseText2
|
||||||
ld de, YujirouWinText
|
ld de, YujirouLoseText2
|
||||||
call SaveEndBattleTextPointers
|
call SaveEndBattleTextPointers
|
||||||
call EngageMapTrainer
|
call EngageMapTrainer
|
||||||
ld a, OPP_YUJIROU
|
ld a, OPP_YUJIROU
|
||||||
|
|
@ -114,12 +100,46 @@ YujirouText:
|
||||||
ld [wTrainerNo], a
|
ld [wTrainerNo], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wIsTrainerBattle], a
|
ld [wIsTrainerBattle], a
|
||||||
ld a, $1
|
|
||||||
ld [wGymLeaderNo], a
|
|
||||||
jr .done
|
jr .done
|
||||||
.YujirouBeaten
|
.yujirouBeaten
|
||||||
ld hl, YujirouAfterBattleText
|
ld hl, YujirouAfterBattleText
|
||||||
call PrintText
|
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
|
.done
|
||||||
jp TextScriptEnd
|
jp TextScriptEnd
|
||||||
|
|
||||||
|
|
@ -131,14 +151,24 @@ YujirouLoseText::
|
||||||
text_far _YujirouLoseText
|
text_far _YujirouLoseText
|
||||||
text_end
|
text_end
|
||||||
|
|
||||||
YujirouWinText::
|
|
||||||
text_far _YujirouWinText
|
|
||||||
text_end
|
|
||||||
|
|
||||||
YujirouAfterBattleText::
|
YujirouAfterBattleText::
|
||||||
text_far _YujirouAfterBattleText
|
text_far _YujirouAfterBattleText
|
||||||
text_end
|
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::
|
YujirouIntro2::
|
||||||
text_far _YujirouIntro2
|
text_far _YujirouIntro2
|
||||||
text_end
|
text_end
|
||||||
|
|
|
||||||
|
|
@ -35,10 +35,9 @@ _FightingDojoText_5ce98::
|
||||||
done
|
done
|
||||||
|
|
||||||
_FightingDojoText_5ce9d::
|
_FightingDojoText_5ce9d::
|
||||||
text "Ho!"
|
text "Hyah!"
|
||||||
|
line "Stay and train at"
|
||||||
para "Stay and train at"
|
cont "karate with us!"
|
||||||
line "Karate with us!"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
_FightingDojoBattleText1::
|
_FightingDojoBattleText1::
|
||||||
|
|
@ -139,7 +138,7 @@ _OiMateText::
|
||||||
done
|
done
|
||||||
|
|
||||||
_KoichiRematchPreBattleText::
|
_KoichiRematchPreBattleText::
|
||||||
text "Ho, <PLAYER>!"
|
text "<PLAYER>!"
|
||||||
|
|
||||||
para "Did you return"
|
para "Did you return"
|
||||||
line "to spar with us"
|
line "to spar with us"
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,19 @@ _YujirouLoseText::
|
||||||
line "I lost?!"
|
line "I lost?!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
_YujirouWinText::
|
|
||||||
text "Ha!"
|
|
||||||
line "Small fry!"
|
|
||||||
prompt
|
|
||||||
|
|
||||||
_YujirouAfterBattleText::
|
_YujirouAfterBattleText::
|
||||||
|
text "I won't give up!"
|
||||||
|
line "I'll train with"
|
||||||
|
cont "my #MON until"
|
||||||
|
cont "we're the best"
|
||||||
|
cont "there is!"
|
||||||
|
|
||||||
|
para "One day, we will"
|
||||||
|
line "beat you!"
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
_BeforeReceivedBottleCapText::
|
||||||
text "I lost..."
|
text "I lost..."
|
||||||
|
|
||||||
para "..."
|
para "..."
|
||||||
|
|
@ -36,6 +43,33 @@ _YujirouAfterBattleText::
|
||||||
para "One day, we will"
|
para "One day, we will"
|
||||||
line "beat you!"
|
line "beat you!"
|
||||||
|
|
||||||
|
para "Oh yeah! You can"
|
||||||
|
line "have this for"
|
||||||
|
cont "winning!"
|
||||||
|
done
|
||||||
|
|
||||||
|
_ReceivedBottleCapText::
|
||||||
|
text "<PLAYER> received"
|
||||||
|
line "BOTTLE CAP!@"
|
||||||
|
text_end
|
||||||
|
|
||||||
|
_BottleCapExplanationText::
|
||||||
|
text_start
|
||||||
|
|
||||||
|
para "I know it's not"
|
||||||
|
line "a real BADGE..."
|
||||||
|
cont "but look at how"
|
||||||
|
cont "shiny it is!"
|
||||||
|
|
||||||
|
para "Maybe it'll come"
|
||||||
|
line "in handy some"
|
||||||
|
cont "other time."
|
||||||
|
done
|
||||||
|
|
||||||
|
_BottleCapNoRoomText::
|
||||||
|
text "Wait, you've got"
|
||||||
|
line "way too many"
|
||||||
|
cont "items already!"
|
||||||
done
|
done
|
||||||
|
|
||||||
_YujirouIntro2::
|
_YujirouIntro2::
|
||||||
|
|
@ -95,8 +129,8 @@ _ViridianPreGymBattleText2::
|
||||||
done
|
done
|
||||||
|
|
||||||
_ViridianPreGymEndBattleText2::
|
_ViridianPreGymEndBattleText2::
|
||||||
text "CLEFAIRY!"
|
text "No!"
|
||||||
line "No!"
|
line "CLEFAIRY!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
_ViridianPreGymAfterBattleText2::
|
_ViridianPreGymAfterBattleText2::
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue