| 1 | if (live_call()) | 
    
    
        | 2 |     return global.live_result; | 
    
    
        | 3 | var lvl_dif = target_lvl - initial_lvl; | 
    
    
        | 4 | var modifier = timer_current / timer_max; | 
    
    
        | 5 | level_current = initial_lvl + (modifier * lvl_dif); | 
    
    
        | 6 | timer_current++; | 
    
    
        | 7 | if (timer_current == timer_max) | 
    
    
        | 8 | { | 
    
    
        | 9 |     audio_play_sound(snd_love_increased, 1, 0); | 
    
    
        | 10 |     global.player_level = target_lvl; | 
    
    
        | 11 |     global.max_hp_self = global.player_hp_next[global.player_level]; | 
    
    
        | 12 |     global.current_hp_self = global.max_hp_self; | 
    
    
        | 13 |     global.player_attack = global.player_attack_next[global.player_level]; | 
    
    
        | 14 |     global.player_defense = global.player_defense_next[global.player_level]; | 
    
    
        | 15 |     instance_destroy(); | 
    
    
        | 16 |     exit; | 
    
    
        | 17 | } | 
    
    
        | 18 | if (floor(level_current) > global.player_level) | 
    
    
        | 19 | { | 
    
    
        | 20 |     global.player_level = floor(level_current); | 
    
    
        | 21 |     global.max_hp_self = global.player_hp_next[global.player_level]; | 
    
    
        | 22 |     global.current_hp_self = global.max_hp_self; | 
    
    
        | 23 |     global.player_attack = global.player_attack_next[global.player_level]; | 
    
    
        | 24 |     global.player_defense = global.player_defense_next[global.player_level]; | 
    
    
        | 25 |     audio_play_sound(snd_love_increased, 1, 0); | 
    
    
        | 26 | } |