Added 130 Stars CG Music (#272)

This commit is contained in:
Skeltan 2023-02-16 01:47:24 +01:00 committed by GitHub
parent 8046d19db1
commit e01f1ea04d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

View File

@ -122,5 +122,15 @@ function on_death()
end end
end end
function on_warp_and_init() -- 130 stars castle grounds music
local m = gMarioStates[0]
if m.numStars >= 130 and gNetworkPlayers[0].currLevelNum == LEVEL_CASTLE_GROUNDS then
play_music(0, 0x2F, 1)
end
end
hook_event(HOOK_MARIO_UPDATE, mario_update) hook_event(HOOK_MARIO_UPDATE, mario_update)
hook_event(HOOK_ON_DEATH, on_death) hook_event(HOOK_ON_DEATH, on_death)
hook_event(HOOK_ON_LEVEL_INIT, on_warp_and_init)
hook_event(HOOK_ON_WARP, on_warp_and_init)