This commit is contained in:
@@ -213,11 +213,31 @@ DEF TRANS_NO_CAVE_F EQU 1 ; bit set in TRANS_NO_CAVE and TRANS_NO_CAVE_STRONGER
|
||||
StartTrainerBattle_DetermineWhichAnimation:
|
||||
; The screen flashes a different number of times depending on the level of
|
||||
; your lead Pokemon relative to the opponent's.
|
||||
; BUG: Battle transitions fail to account for enemy's level (see docs/bugs_and_glitches.md)
|
||||
ld a, [wOtherTrainerClass]
|
||||
and a
|
||||
jr z, .wild
|
||||
farcall SetTrainerBattleLevel
|
||||
|
||||
.wild
|
||||
ld b, PARTY_LENGTH
|
||||
ld hl, wPartyMon1HP
|
||||
ld de, PARTYMON_STRUCT_LENGTH - 1
|
||||
|
||||
.loop
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
jr nz, .okay
|
||||
add hl, de
|
||||
dec b
|
||||
jr nz, .loop
|
||||
|
||||
.okay
|
||||
ld de, MON_LEVEL - MON_HP - 1
|
||||
add hl, de
|
||||
ld de, 0
|
||||
ld a, [wBattleMonLevel]
|
||||
ld a, [hl]
|
||||
add 3
|
||||
ld hl, wEnemyMonLevel
|
||||
ld hl, wCurPartyLevel
|
||||
cp [hl]
|
||||
jr nc, .not_stronger
|
||||
set TRANS_STRONGER_F, e
|
||||
|
Reference in New Issue
Block a user