mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 23:55:24 +13:00
Scripted losses
Now the last issue is making this not crash when restoring the player's team. Very odd...
This commit is contained in:
parent
4de0a13543
commit
8e10d26336
4 changed files with 42 additions and 13 deletions
|
|
@ -1167,7 +1167,27 @@ HandlePlayerBlackOut:
|
|||
ld [wIsTrainerBattle], a
|
||||
ld a, [wLinkState]
|
||||
cp LINK_STATE_BATTLING
|
||||
jr z, .notRival1Battle
|
||||
jp z, .notRival1Battle
|
||||
|
||||
; This is a scripted loss mechanic from a pret tutorial, adapted to the Battle Tent.
|
||||
; This is necessary so you don't get booted out of the tent and have your Pokemon de-levelled.
|
||||
|
||||
ld a, [wCurMap]
|
||||
cp BATTLE_TENT
|
||||
jr nz, .notThatTrainer
|
||||
hlcoord 0, 0
|
||||
lb bc, 8, 21
|
||||
call ClearScreenArea
|
||||
call ScrollTrainerPicAfterBattle
|
||||
ld c, 40
|
||||
call DelayFrames
|
||||
ld hl, StupidBattleTentFix
|
||||
call PrintText
|
||||
ld a, [wCurMap]
|
||||
cp BATTLE_TENT ; MAP ID can be found in constants\map_constants.asm
|
||||
ret
|
||||
|
||||
.notThatTrainer
|
||||
ld a, [wCurOpponent]
|
||||
cp OPP_RIVAL1
|
||||
jr nz, .notRival1Battle
|
||||
|
|
@ -7124,3 +7144,10 @@ LoadMonBackPic:
|
|||
ldh a, [hLoadedROMBank]
|
||||
ld b, a
|
||||
jp CopyVideoData
|
||||
|
||||
; I struggled a lot in making this generate the text.
|
||||
; This is the best compromise I can come up with right now.
|
||||
StupidBattleTentFix:
|
||||
text "Oops! Better"
|
||||
line "luck next time!"
|
||||
prompt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue