chore: fix bugs
Some checks failed
CI / build (push) Failing after 1m18s

This commit is contained in:
Giulia Sanguineti
2025-10-01 10:11:42 +02:00
parent d138ed1bd4
commit 4c8d3e962f
44 changed files with 236 additions and 235 deletions

View File

@@ -389,3 +389,48 @@ IncompleteCopyNameFunction: ; unreferenced
ret
INCLUDE "data/trainers/parties.asm"
SetTrainerBattleLevel:
ld a, 255
ld [wCurPartyLevel], a
ld a, [wInBattleTowerBattle]
bit IN_BATTLE_TOWER_BATTLE_F, a
ret nz
ld a, [wLinkMode]
and a
ret nz
ld a, [wOtherTrainerClass]
dec a
ld c, a
ld b, 0
ld hl, TrainerGroups
add hl, bc
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
ld a, [wOtherTrainerID]
ld b, a
.skip_trainer
dec b
jr z, .got_trainer
.skip_party
ld a, [hli]
cp $ff
jr nz, .skip_party
jr .skip_trainer
.got_trainer
.skip_name
ld a, [hli]
cp "@"
jr nz, .skip_name
inc hl
ld a, [hl]
ld [wCurPartyLevel], a
ret