Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_guardener_vines_controller_Step_0

(view raw script w/o annotations or w/e)
1
obj_fight.image_blend = c_white
2
obj_act.image_blend = c_white
3
obj_item.image_blend = c_white
4
obj_mercy.image_blend = c_white
5
if (vine_count[0] > 0)
6
    obj_fight.image_blend = c_gray
7
if (vine_count[1] > 0)
8
    obj_act.image_blend = c_gray
9
if (vine_count[2] > 0)
10
    obj_item.image_blend = c_gray
11
if (vine_count[3] > 0)
12
    obj_mercy.image_blend = c_gray
13
var i = 0
14
while (i < 4)
15
{
16
    if (vine_cut[i] == true)
17
    {
18
        obj_heart_battle_menu_guardener_fake.image_alpha = 0
19
        vine_count[i] -= 1
20
        vine_cut[i] = false
21
        alarm[0] = 30
alarm[0]

with (obj_dialogue_battle_move_select_parent) instance_destroy() global.enemy_attacking = true
22
        switch vine_count[i]
23
        {
24
            case 2:
25
                instance_create_depth((vine_xx[i] + 46), (vine_yy[i] + 22), (depth - 1), obj_guardener_vine_piece)
26
                audio_play_sound(snd_guardener_vine_snip, 1, 0)
27
                break
28
            case 1:
29
                instance_create_depth((vine_xx[i] + 18), (vine_yy[i] + 22), (depth - 1), obj_guardener_vine_piece)
30
                instance_create_depth((vine_xx[i] + 50), (vine_yy[i] + 22), (depth - 1), obj_guardener_vine_piece)
31
                instance_create_depth((vine_xx[i] + 81), (vine_yy[i] + 22), (depth - 1), obj_guardener_vine_piece)
32
                audio_play_sound(snd_guardener_vine_snip, 1, 0)
33
                break
34
            case 0:
35
                instance_create_depth((vine_xx[i] + 42), (vine_yy[i] + 22), (depth - 1), obj_guardener_vine_piece)
36
                instance_create_depth((vine_xx[i] + 96), (vine_yy[i] + 22), (depth - 1), obj_guardener_vine_piece)
37
                audio_play_sound(snd_guardener_vine_crumble, 1, 0)
38
                break
39
        }
40
41
        break
42
    }
43
    else
44
    {
45
        i++
46
        continue
47
    }
48
}
49
vine_percentage = (vine_count[0] + vine_count[1] + vine_count[2] + vine_count[3]) / 12 * 100
50
if (vine_percentage == 0 && global.enemy_mode == 0)
51
{
52
    global.action_amount = 3
53
    global.enemy_mode = 1
54
    global.turns_passed = 10
55
    scr_determine_enemy_attack_yellow
scr_determine_enemy_attack_yellow

function scr_determine_enemy_attack_yellow() //gml_Script_scr_determine_enemy_attack_yellow { if live_call() return global.live_result; var determine_attack_priority = global.determine_attack_priority var battle_enemy_name = global.battle_enemy_name var turns_passed = global.turns_passed var enemy_dead = global.enemy_dead var enemy_spared = global.enemy_spared if (global.enemy_count >= 2) { var enemy_dead_2 = global.enemy_dead_2 var enemy_spared_2 = global.enemy_spared_2 } if (global.enemy_count >= 3) { var enemy_dead_3 = global.enemy_dead_3 var enemy_spared_3 = global.enemy_spared_3 } if (battle_enemy_name == "flier solo") { random_range_value = irandom_range(0, 2) if (random_range_value == 0) { global.enemy_attack = "Flier Flies" global.soul_mode = "Red" global.image_alpha_enemy_attacking_immunity = false } else if (random_range_value == 1) { global.enemy_attack = "Flier Swarm" global.soul_mode = "Red" global.image_alpha_enemy_attacking_immunity = false } else if (random_range_value == 2) { global.enemy_attack = "Flier Fire" global.soul_mode = "Red" global.image_alpha_enemy_attacking_immunity = false } } else if (battle_enemy_name == "flier trio") { if ((enemy_dead + enemy_spared + enemy_dead_2 + enemy_spared_2 + enemy_dead_3 + enemy_spared_2) < 2) { random_range_value = irandom_range(0, 2) if (random_range_value == 0) { global.enemy_attack = "Flier Flies Double" global.soul_mode = "Red" global.image_alpha_enemy_attacking_immunity = false } else if (random_range_value == 1) { global.enemy_attack = "Flier Swarm Double" global.soul_mode = "Red" global.image_alpha_enemy_attacking_immunity = false } else if (random_range_value == 2) { global.enemy_attack = "Flier Fire Flies" global.soul_mode = "Red" global.image_alpha_enemy_attacking_immunity = false } } else { random_range_value = irandom_range(0, 2) if (random_range_value == 0) { global.enemy_attack = "Flier Flies" global.soul_mode = "Red" global.image_alpha_enemy_attacking_immunity = false } else if (random_range_value == 1) { global.enemy_attack = "Flier Swarm" global.soul_mode = "Red" global.image_alpha_enemy_attacking_immunity = false } else if (random_range_value == 2) { global.enemy_attack = "Flier Fire" global.soul_mode = "Red" global.image_alpha_enemy_attacking_immunity = false } } } else if (battle_enemy_name == "penilla solo") { random_range_value = irandom_range(0, 1) if (random_range_value == 0) { global.enemy_attack = "Penilla Drawing" global.soul_mode = "Red" global.image_alpha_enemy_attacking_immunity = false } else if (random_range_value == 1) { global.enemy_attack = "Penilla Lines" global.soul_mode = "Red" ...
()
56
}
57
if instance_exists(obj_battle_fade_out_screen)
58
    depth = obj_battle_fade_out_screen.depth + 1