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 = obj_quote_battle_ceroba_parent
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
    can_talk_no_loop = false
36
anim_loop_time = room_speed * 3
37
var anim_loop_time_half = anim_loop_time / 1
38
var anim_inc_current = (anim_stretch_max - 1) / anim_loop_time_half * anim_inc_multiplier
39
if (anim_stage == 1)
40
{
41
    anim_stretch_current += anim_inc_current
42
    anim_inc_multiplier -= (anim_inc_multiplier_max / anim_loop_time_half)
43
    if (anim_stretch_current >= anim_stretch_max)
44
    {
45
        anim_stretch_current = anim_stretch_max
46
        anim_stage = 2
47
        anim_inc_multiplier = anim_inc_multiplier_max
48
    }
49
}
50
if (anim_stage == 2)
51
{
52
    anim_stretch_current -= ((anim_stretch_max - 1) / anim_loop_time_half)
53
    anim_inc_multiplier -= (anim_inc_multiplier_max / anim_loop_time_half)
54
    if (anim_stretch_current <= 1)
55
    {
56
        anim_stretch_current = 1
57
        anim_stage = 1
58
        anim_inc_multiplier = anim_inc_multiplier_max
59
    }
60
}
61
if (sprite_index == -4)
62
    image_yscale = anim_stretch_current
63
else
64
    image_yscale = 1
65
obj_ceroba_cape_1.y *= image_yscale
66
obj_ceroba_cape_2.y *= image_yscale
67
obj_ceroba_hair.y *= image_yscale
68
obj_ceroba_legs.y *= image_yscale
69
obj_ceroba_phase_2_staff.y += (50 * (image_yscale - 1))
70
if instance_exists(obj_ceroba_transformation_mask)
71
{
72
    obj_ceroba_transformation_mask.y *= image_yscale
73
    var mask_offset = obj_ceroba_transformation_mask.y - obj_ceroba_transformation_mask.ystart
74
    obj_ceroba_phase_2_head.y += mask_offset
75
    obj_ceroba_sideburn_left.y += mask_offset
76
    obj_ceroba_sideburn_right.y += mask_offset
77
}
78
if (instance_exists(obj_text_damage_count) && no_loop_damage_disjoint_count == false && obj_target_bar_battle.damage_type != "normal")
79
{
80
    damage_disjoint_count = 12
81
    no_loop_damage_disjoint_count = true
82
}
83
if (damage_disjoint_count > 0)
84
{
85
    if (damage_disjoint_timer <= 0)
86
    {
87
        damage_disjoint_timer = damage_disjoint_timer_max
88
        damage_disjoint_count -= 1
89
    }
90
    else
91
        damage_disjoint_timer -= 1
92
    if (damage_disjoint_count == 12)
93
        damage_disjoint_x = -50
94
    else if (damage_disjoint_count == 10)
95
        damage_disjoint_x = 50
96
    else if (damage_disjoint_count == 8)
97
        damage_disjoint_x = -20
98
    else if (damage_disjoint_count == 6)
99
        damage_disjoint_x = 20
100
    else if (damage_disjoint_count == 4)
101
        damage_disjoint_x = -10
102
    else if (damage_disjoint_count == 2)
103
        damage_disjoint_x = 10
104
    else if (damage_disjoint_count == 0)
105
    {
106
        damage_disjoint_x = 0
107
        no_loop_damage_disjoint_count = false
108
    }
109
    x = xstart + damage_disjoint_x
110
}