Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_dalv_neck_Step_0

(view raw script w/o annotations or w/e)
1
if (obj_dalv_body.cloak_direction == 0)
2
{
3
    var enemy_dead = global.enemy_dead
4
    var enemy_spared = global.enemy_spared
5
    if (enemy_dead == false && enemy_spared == false)
6
        image_alpha = global.image_alpha_enemy_attacking
7
    if (enemy_dead == true)
8
    {
9
        instance_destroy()
10
        return;
11
    }
12
    else if (enemy_spared == true)
13
    {
14
        instance_destroy()
15
        return;
16
    }
17
    if (damage_disjoint_count > 0)
18
        damage_disjoint_count -= 1
19
    else if (enemy_dead == false && enemy_spared == false)
20
    {
21
        if (global.current_hp_enemy <= 0)
22
            sprite_index = spr_dalv_neck_critical
23
        else
24
            sprite_index = spr_dalv_neck
25
    }
26
    if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false)
27
    {
28
        damage_disjoint_count = 12
29
        no_loop_damage_disjoint_count = true
30
    }
31
    else if (!instance_exists(obj_text_damage_count))
32
        no_loop_damage_disjoint_count = false
33
    if (damage_disjoint_count == 12)
34
        damage_disjoint_x = -50
35
    else if (damage_disjoint_count == 10)
36
        damage_disjoint_x = 50
37
    else if (damage_disjoint_count == 8)
38
        damage_disjoint_x = -20
39
    else if (damage_disjoint_count == 6)
40
        damage_disjoint_x = 20
41
    else if (damage_disjoint_count == 4)
42
        damage_disjoint_x = -10
43
    else if (damage_disjoint_count == 2)
44
        damage_disjoint_x = 10
45
    else if (damage_disjoint_count == 0)
46
        damage_disjoint_x = 0
47
    if (damage_disjoint_count > 0)
48
        image_alpha = 0
49
}
50
else
51
    image_alpha = 0