Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dialogue_battle_win_genocide_Create_0

(view raw script w/o annotations or w/e)
1
global.player_exp += global.enemy_exp
2
global.player_gold += global.enemy_gold
3
if (global.game_mode == "customs")
4
    message[0] = "* YOU WON!#* You earned " + string(global.enemy_exp) + " XP and " + string(global.enemy_gold) + " gold."
5
else if (global.game_mode == "yellow")
6
{
7
    if (global.battle_enemy_name == "decibat")
8
        message[0] = "* Sweet silence...#* You earned " + string(global.enemy_exp) + " XP and " + string(global.enemy_gold) + " gold."
9
    else
10
        message[0] = "* YOU WON!#* You earned " + string(global.enemy_exp) + " XP and " + string(global.enemy_gold) + " gold."
11
}
12
if (global.player_exp >= global.player_exp_next[global.player_level])
13
{
14
    var i = global.player_level
15
    while (i <= 20)
16
    {
17
        if (global.player_exp >= global.player_exp_next[i])
18
        {
19
            global.player_level = i + 1
20
            global.max_hp_self = global.player_hp_next[(i + 1)]
21
            global.player_attack = global.player_attack_next[(i + 1)]
22
            global.player_defense = global.player_defense_next[(i + 1)]
23
            i += 1
24
            continue
25
        }
26
        else
27
            break
28
    }
29
    audio_play_sound(snd_love_increased, 20, 0)
30
    message[0] = message[0] + "#* Your LOVE increased."
31
}
32
message_current = 0
33
message_end = 0
34
message_draw = ""
35
increase = global.text_speed
36
characters = 0
37
hold = 0
38
message_length = string_length(message[message_current])
39
can_check_display_text = false
40
display_text = false
41
alarm[0] = 1
alarm[0]

can_check_display_text = true
42
moveable = true
43
script_execute(gml_Script_scr_generate_text_counters)