kep-hack/audio/play_battle_music.asm
May Evans 71de0f07a5 Groundwork for Viridian Pre-Gym
This map is fully functional but has a lot of bits to iron out, as well as a need for Gym Trainers. I'm also not wholly satisfied with Yujirou's team; maybe remove Eevee?

Yes, I designed an entire tileset for this. Fear me. Bow before me. Actually, don't, this was beyond rational thought.

Current issues;
- Yujirou's sprite doesn't work properly.
- Needs Gym Trainers (hell)
- Yujirou needs an event for being beaten, the refight, and more.
2023-03-30 02:12:45 +01:00

49 lines
1,008 B
NASM

PlayBattleMusic::
xor a
ld [wAudioFadeOutControl], a
ld [wLowHealthAlarm], a
dec a ; SFX_STOP_ALL_MUSIC
ld [wNewSoundID], a
call PlaySound
call DelayFrame
ld c, BANK(Music_GymLeaderBattle)
ld a, [wGymLeaderNo]
and a
jr z, .notGymLeaderBattle
ld a, MUSIC_GYM_LEADER_BATTLE
jr .playSong
.notGymLeaderBattle
ld a, [wCurOpponent]
cp OPP_ID_OFFSET
jr c, .wildBattle
cp OPP_YUJIROU
jr z, .Elite4Battle
cp OPP_LORELEI ; elite four now play the gym leader battle theme
jr z, .Elite4Battle
cp OPP_BRUNO
jr z, .Elite4Battle
cp OPP_AGATHA
jr z, .Elite4Battle
cp OPP_LANCE
jr z, .Elite4Battle
cp OPP_RIVAL3
jr z, .finalBattle
cp OPP_PROF_OAK ; may as well, right?
jr z, .finalBattle
jr nz, .normalTrainerBattle
ld a, MUSIC_FINAL_BATTLE
jr .playSong
.Elite4Battle
ld a, MUSIC_GYM_LEADER_BATTLE
jr .playSong
.normalTrainerBattle
ld a, MUSIC_TRAINER_BATTLE
jr .playSong
.finalBattle
ld a, MUSIC_FINAL_BATTLE
jr .playSong
.wildBattle
ld a, MUSIC_WILD_BATTLE
.playSong
jp PlayMusic