label academy_entrance_trans:
    if timeofday <= 2:
        scene map academy_entrance with fade
        jump navigation_academy_entrance
    elif brightNights <= 1:
        scene map academy_entrance_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_entrance
    else:
        scene map academy_entrance_night_2 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_entrance

label academy_gym_trans:
    if timeofday <= 2:
        scene map academy_gym with fade
        jump navigation_gym
    elif brightNights <= 1:
        scene map academy_gym_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_gym
    else:
        scene map academy_gym_night_2 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_gym

label academy_elevator_hallway_trans:
    if timeofday <= 2 and rb_event_13 <= 1:
        scene map academy_elevator_hallway_day_1 with fade
        jump navigation_academy_elevator_hallway
    elif timeofday <= 2 and rb_event_13 >= 1:
        scene map academy_elevator_hallway_day_2 with fade
        jump navigation_academy_elevator_hallway
    elif brightNights <= 1 and rb_event_13 <= 1:
        scene map academy_elevator_hallway_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_elevator_hallway
    elif brightNights >= 1 and rb_event_13 <= 1:
        scene map academy_elevator_hallway_night_1b with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_elevator_hallway
    else:
        scene map academy_elevator_hallway_night_2 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_elevator_hallway

label academy_bedroom_hallway_trans:
    if timeofday <= 2 and lecture_3 <= 1:
        scene map academy_bedroom_hallway_day_1 with fade
        jump navigation_academy_bedroom_hallway
    elif timeofday <= 2 and lecture_3 >= 1:
        scene map academy_bedroom_hallway_day_2 with fade
        jump navigation_academy_bedroom_hallway
    elif brightNights <= 1 and lecture_3 <= 1:
        scene map academy_bedroom_hallway_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_bedroom_hallway
    elif brightNights <= 1 and lecture_3 >= 1:
        scene map academy_bedroom_hallway_night_2 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_bedroom_hallway
    else:
        scene map academy_bedroom_hallway_night_2b with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_bedroom_hallway

label academy_classroom_trans:
    if timeofday <= 2 and recreation_room_finished <= 1:
        scene map academy_classroom with fade
        jump navigation_classroom
    elif brightNights <= 1 and recreation_room_finished <= 1:
        scene map academy_classroom_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_classroom
    elif brightNights >= 1 and recreation_room_finished <= 1:
        scene map academy_classroom_night_2 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_classroom
    elif timeofday <= 2 and recreation_room_finished >= 1:
        scene map academy_recreation_1 with fade
        jump navigation_classroom
    else:
        scene map academy_recreation_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_classroom

label academy_corridor_trans:
    if timeofday <= 2 and lecture_3 <= 1:
        scene map academy_corridor_day_1 with fade
        jump navigation_academy_corridor
    elif timeofday <= 2 and lecture_3 >= 1:
        scene map academy_corridor_day_2 with fade
        jump navigation_academy_corridor
    elif brightNights <= 1 and lecture_3 <= 1:
        scene map academy_corridor_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_corridor
    elif brightNights <= 1 and lecture_3 >= 1:
        scene map academy_corridor_night_1b with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_corridor
    else:
        scene map academy_corridor_night_2 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_corridor

label academy_garage_trans:
    if timeofday <= 2:
        scene map academy_garage0_0 with fade
        jump navigation_academy_garage
    elif brightNights <= 1:
        scene map academy_garage_night0_0 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_garage
    else:
        scene map academy_garage_night0_0 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_garage

label academy_kitchen_trans:
    if timeofday <= 2:
        scene map academy_kitchen with fade
        jump navigation_academy_kitchen
    elif brightNights <= 1:
        scene map academy_kitchen_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_kitchen
    else:
        scene map academy_kitchen_night_2 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_kitchen

label academy_library_trans:
    if timeofday <= 2:
        scene map library with fade
        jump navigation_library
    elif brightNights <= 1:
        scene map library_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_library
    else:
        scene map library_night_2 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_library

label academy_bathroom_trans:
    if timeofday <= 2:
        scene map academy_bathroom with fade
        jump navigation_academy_bathroom
    elif brightNights <= 1:
        scene map academy_bathroom_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_bathroom
    else:
        scene map academy_bathroom_night_2 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_bathroom

label academy_bedroom_morning_trans:
    stop music_2 fadeout 1.0
    stop music fadeout 2.0
    play music "audio/music/on_my_way_edit.ogg" fadein 2.0 loop
    $ timeofday = 1
    $ daycounter += 1
    $ bathroomcheck = 0
    $ bathroomcheck_night = 0
    $ lockercheck = 0
    $ protagonist_training_gym_today = 0
    $ protagonist_training_library_today = 0
    if weekdate == 6:
        $ weekdate = 7
        if hp_event_3 >= 1 and lecture_5 <= 1:
            jump lecture_5
        elif lecture_5 >= 1 and lecture_6 <= 1:
            jump lecture_6
        elif lecture_6 >= 1 and ve_event_6 >= 1 and hp_event_5 >= 1 and lecture_7 <= 1:
            jump lecture_7
        elif lecture_7 >= 1 and pat_event_1 >= 1 and lecture_8 <= 1:
            jump lecture_8
        elif lecture_8 >= 1 and lecture_9 <= 1:
            jump lecture_9
        elif lecture_9 >= 1 and rb_event_12 >= 1 and pat_event_3 >= 1 and lecture_10 <= 1:
            jump lecture_10
        elif lecture_11 >= 1 and rb_event_16 >= 1 and cs_event_25 >= 1 and lecture_12 <= 1:
            jump lecture_event_12
        elif lecture_12 <= 1:
            jump lecture_hints
        elif lecture_12 >= 1 and hp_event_23 <= 1:
            jump new_lecture_system
        elif hp_event_23 >= 1 and lecture_16 <= 1:
            jump lecture_event_16
        else:
            if bedroom_protagonist_state == 0:
                scene map bedroom_protagonist with fade
            elif bedroom_protagonist_state == 1:
                scene map bedroom_protagonist_1 with fade
            elif bedroom_protagonist_state == 2:
                scene map 3_bedroom_protagonist0_1 with fade
            elif pat_event_13 <= 1:
                scene map 4_bedroom_protagonist0_1 with fade
            else:
                scene map 5_bedroom_protagonist0_1 with fade
            jump navigation_bedroom_protagonist
    elif weekdate >= 7:
        $ weekdate = 1
    else:
        $ weekdate += 1

    if bedroom_protagonist_state == 0:
        scene map bedroom_protagonist with fade
    elif bedroom_protagonist_state == 1:
        scene map bedroom_protagonist_1 with fade
    elif bedroom_protagonist_state == 2:
        scene map 3_bedroom_protagonist0_1 with fade
    elif pat_event_13 <= 1:
        scene map 4_bedroom_protagonist0_1 with fade
    else:
        scene map 5_bedroom_protagonist0_1 with fade

    jump navigation_bedroom_protagonist

label academy_bedroom_night_trans:
    stop music fadeout 2.0
    play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
    if bedroom_protagonist_state == 0:
        scene map bedroom_protagonist_night with fade
    elif bedroom_protagonist_state == 1:
        scene map bedroom_protagonist_night_1 with fade
    elif bedroom_protagonist_state == 2:
        scene map 3_bedroom_protagonist_night0_1 with fade
    else:
        scene map 4_bedroom_protagonist_night with fade

    jump navigation_bedroom_protagonist

label academy_locker_room_trans:
    if timeofday <= 2:
        scene map academy_locker_room_1 with fade
        jump navigation_academy_locker_room
    elif brightNights <= 1:
        scene map academy_locker_room_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_locker_room
    else:
        scene map academy_locker_room_night_2 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_locker_room

label academy_elevator_hallway_morning_trans:
    stop music_2 fadeout 1.0
    stop music fadeout 2.0
    play music "audio/music/on_my_way_edit.ogg" fadein 2.0 loop
    $ timeofday = 1
    $ daycounter += 1
    $ bathroomcheck = 0
    $ bathroomcheck_night = 0
    $ lockercheck = 0
    $ protagonist_training_gym_today = 0
    $ protagonist_training_library_today = 0
    if weekdate >= 7:
        $ weekdate = 1
    else:
        $ weekdate += 1
        
    if timeofday <= 2 and rb_event_13 <= 1:
        scene map academy_elevator_hallway_day_1 with fade
        jump navigation_academy_elevator_hallway
    elif timeofday <= 2 and rb_event_13 >= 1:
        scene map academy_elevator_hallway_day_2 with fade
        jump navigation_academy_elevator_hallway
    elif brightNights <= 1 and rb_event_13 <= 1:
        scene map academy_elevator_hallway_night_1 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_elevator_hallway
    elif brightNights >= 1 and rb_event_13 <= 1:
        scene map academy_elevator_hallway_night_1b with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_elevator_hallway
    else:
        scene map academy_elevator_hallway_night_2 with fade
        stop music fadeout 2.0
        play music_2 "audio/music/sincerely_edit.ogg" fadein 10.0 loop
        jump navigation_academy_elevator_hallway

label protagonist_sleep_function: #The Normal Function. When the protagonist sleeps, the music transitions.
    stop music_2 fadeout 1.0
    play music "audio/music/on_my_way_edit.ogg" fadein 2.0 loop
    $ timeofday = 1
    $ daycounter += 1
    $ bathroomcheck = 0
    $ bathroomcheck_night = 0
    $ lockercheck = 0
    $ protagonist_training_gym_today = 0
    $ protagonist_training_library_today = 0
    if weekdate >= 7:
        $ weekdate = 1
    else:
        $ weekdate += 1
    return

label protagonist_sleep_function_serenity: #Instead of the music transition, it continues the night music
    #stop music_2 fadeout 1.0
    #play music "audio/music/on_my_way_edit.ogg" fadein 2.0 loop
    $ timeofday = 1
    $ daycounter += 1
    $ bathroomcheck = 0
    $ bathroomcheck_night = 0
    $ lockercheck = 0
    $ protagonist_training_gym_today = 0
    $ protagonist_training_library_today = 0
    if weekdate >= 7:
        $ weekdate = 1
    else:
        $ weekdate += 1
    return

label protagonist_sleep_function_silent: #Stops both music channels
    stop music_2 fadeout 1.0
    #play music "audio/music/on_my_way_edit.ogg" fadein 2.0 loop
    $ timeofday = 1
    $ daycounter += 1
    $ bathroomcheck = 0
    $ bathroomcheck_night = 0
    $ lockercheck = 0
    $ protagonist_training_gym_today = 0
    $ protagonist_training_library_today = 0
    if weekdate >= 7:
        $ weekdate = 1
    else:
        $ weekdate += 1
    return


