Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_card_game_controller_Destroy_0

(view raw script w/o annotations or w/e)
1
with (obj_card_game_card)
2
    instance_destroy()
3
with (obj_card_game_card)
4
    instance_destroy()
5
if (cardg_failure == true)
6
    obj_npc_cardguy.card_game_result = 0
7
else
8
{
9
    var time_in_seconds = floor(cardg_timer / 30)
10
    if (time_in_seconds < cardg_time_gold)
11
        obj_npc_cardguy.card_game_result = 3
12
    else if (time_in_seconds < cardg_time_silver)
13
        obj_npc_cardguy.card_game_result = 2
14
    else
15
        obj_npc_cardguy.card_game_result = 1
16
    global.player_gold += round(cardg_g_gained)
17
}
18
audio_sound_gain(mus_card_game, 1, 500)