Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_card_game_card_Create_0

(view raw script w/o annotations or w/e)
1
card_is_active = false
2
card_is_selected = false
3
card_original_x = 83
4
card_original_y = 41
5
card_number = 0
6
card_success = false
7
card_row = 0
8
card_column = 0
9
card_type = irandom_range(0, 5)
10
obj_card_game_controller.cardg_card_type_number[card_type] += 1
11
while (obj_card_game_controller.cardg_card_type_number[card_type] > 6)
12
{
13
    obj_card_game_controller.cardg_card_type_number[card_type] -= 1
14
    card_type = irandom_range(0, 5)
15
    obj_card_game_controller.cardg_card_type_number[card_type] += 1
16
}
17
switch card_type
18
{
19
    case 0:
20
        sprite_index = spr_card_ace
21
        break
22
    case 1:
23
        sprite_index = spr_card_ceroba
24
        break
25
    case 2:
26
        sprite_index = spr_card_ed
27
        break
28
    case 3:
29
        sprite_index = spr_card_moray
30
        break
31
    case 5:
32
        sprite_index = spr_card_starlo
33
        break
34
    case 4:
35
        sprite_index = spr_card_mooch
36
        break
37
}