Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_ceroba_body_pacifist_phase_2_Step_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
if (global.enemy_spared == true)
4
{
5
    if (no_loop_create_clouds == false)
6
    {
7
        for (i = 0; i <= 11; i += 1)
8
            instance_create(x, y - 100, obj_spare_cloud);
9
    }
10
    no_loop_create_clouds = true;
11
    image_alpha = 0.5;
12
    sprite_index = spr_ceroba_p2_defeated_spared;
13
    image_speed = 0;
14
}
15
var text_parent = 2721;
16
if (instance_exists(text_parent) && instance_exists(obj_quote_bubble_battle))
17
{
18
    if (text_parent.can_talk == true)
19
    {
20
        if (can_talk_no_loop == false)
21
        {
22
            image_index = 1;
23
            can_talk_no_loop = true;
24
        }
25
        image_speed = global.text_speed * global.talk_speed_martlet * text_parent.hold;
26
    }
27
    else
28
    {
29
        can_talk_no_loop = false;
30
        image_speed = 0;
31
        image_index = 0;
32
    }
33
}
34
else
35
{
36
    can_talk_no_loop = false;
37
}
38
anim_loop_time = room_speed * 3;
39
var anim_loop_time_half = anim_loop_time / 1;
40
var anim_inc_current = ((anim_stretch_max - 1) / anim_loop_time_half) * anim_inc_multiplier;
41
if (anim_stage == 1)
42
{
43
    anim_stretch_current += anim_inc_current;
44
    anim_inc_multiplier -= (anim_inc_multiplier_max / anim_loop_time_half);
45
    if (anim_stretch_current >= anim_stretch_max)
46
    {
47
        anim_stretch_current = anim_stretch_max;
48
        anim_stage = 2;
49
        anim_inc_multiplier = anim_inc_multiplier_max;
50
    }
51
}
52
if (anim_stage == 2)
53
{
54
    anim_stretch_current -= ((anim_stretch_max - 1) / anim_loop_time_half);
55
    anim_inc_multiplier -= (anim_inc_multiplier_max / anim_loop_time_half);
56
    if (anim_stretch_current <= 1)
57
    {
58
        anim_stretch_current = 1;
59
        anim_stage = 1;
60
        anim_inc_multiplier = anim_inc_multiplier_max;
61
    }
62
}
63
if (sprite_index == -4)
64
    image_yscale = anim_stretch_current;
65
else
66
    image_yscale = 1;
67
obj_ceroba_cape_1.y *= image_yscale;
68
obj_ceroba_cape_2.y *= image_yscale;
69
obj_ceroba_hair.y *= image_yscale;
70
obj_ceroba_legs.y *= image_yscale;
71
obj_ceroba_phase_2_staff.y += (50 * (image_yscale - 1));
72
if (instance_exists(obj_ceroba_transformation_mask))
73
{
74
    obj_ceroba_transformation_mask.y *= image_yscale;
75
    var mask_offset = obj_ceroba_transformation_mask.y - obj_ceroba_transformation_mask.ystart;
76
    obj_ceroba_phase_2_head.y += mask_offset;
77
    obj_ceroba_sideburn_left.y += mask_offset;
78
    obj_ceroba_sideburn_right.y += mask_offset;
79
}
80
if (instance_exists(obj_text_damage_count) && no_loop_damage_disjoint_count == false && obj_target_bar_battle.damage_type != "normal")
81
{
82
    damage_disjoint_count = 12;
83
    no_loop_damage_disjoint_count = true;
84
}
85
if (damage_disjoint_count > 0)
86
{
87
    if (damage_disjoint_timer <= 0)
88
    {
89
        damage_disjoint_timer = damage_disjoint_timer_max;
90
        damage_disjoint_count -= 1;
91
    }
92
    else
93
    {
94
        damage_disjoint_timer -= 1;
95
    }
96
    if (damage_disjoint_count == 12)
97
    {
98
        damage_disjoint_x = -50;
99
    }
100
    else if (damage_disjoint_count == 10)
101
    {
102
        damage_disjoint_x = 50;
103
    }
104
    else if (damage_disjoint_count == 8)
105
    {
106
        damage_disjoint_x = -20;
107
    }
108
    else if (damage_disjoint_count == 6)
109
    {
110
        damage_disjoint_x = 20;
111
    }
112
    else if (damage_disjoint_count == 4)
113
    {
114
        damage_disjoint_x = -10;
115
    }
116
    else if (damage_disjoint_count == 2)
117
    {
118
        damage_disjoint_x = 10;
119
    }
120
    else if (damage_disjoint_count == 0)
121
    {
122
        damage_disjoint_x = 0;
123
        no_loop_damage_disjoint_count = false;
124
    }
125
    x = xstart + damage_disjoint_x;
126
}