Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_scarecrow_intimidate2_Step_0

related scripts: Create_0Draw_0Step_0

(view raw script w/o annotations or w/e)
1
image_index = 0;
2
var automiss = false;
3
var alone = false;
4
var perfectmercy = 100;
5
var maxmercy = 70;
6
var minmercy = 50;
7
if (i_ex(obj_flowery_enemy))
8
{
9
    if (obj_flowery_enemy.pose_alone == true)
10
    {
11
        alone = true;
12
        perfectmercy = 10;
13
        maxmercy = 8;
14
        minmercy = 5;
15
    }
16
    else
17
    {
18
        perfectmercy = 10;
19
        maxmercy = 8;
20
        minmercy = 5;
21
    }
22
    if ((perfectmercy + global.mercymod[obj_flowery_enemy.myself]) > 10)
23
        perfectmercy = 10 - global.mercymod[obj_flowery_enemy.myself];
24
    if ((maxmercy + global.mercymod[obj_flowery_enemy.myself]) > 10)
25
        maxmercy = 10 - global.mercymod[obj_flowery_enemy.myself];
26
    if ((minmercy + global.mercymod[obj_flowery_enemy.myself]) > 10)
27
        minmercy = 10 - global.mercymod[obj_flowery_enemy.myself];
28
}
29
if (con != 1)
30
{
31
    if (image_alpha < 1)
32
        image_alpha += 0.1;
33
    if (bar_x > 324)
34
    {
35
        image_alpha3 -= 0.1;
36
        if (image_alpha3 <= 0)
37
            automiss = true;
38
        bar_x += 7;
39
    }
40
    else if (image_alpha2 >= 1)
41
    {
42
        if (image_alpha3 < 1)
43
            image_alpha3 += 0.1;
44
        bar_x += 7;
45
    }
46
}
47
if ((button1_p() || button2_p() || button3_p() || automiss == true) && bar_x >= 70 && con == 0 && image_alpha >= 0.6)
48
{
49
    with (obj_writer)
50
        instance_destroy();
51
    image_index = 1;
52
    if (bar_x < 86)
53
        maxmercy = 0;
54
    if (bar_x > 334)
55
        maxmercy = 0;
56
    if (bar_x >= 86 && bar_x < 196)
57
        mercy = ceil(lerp(minmercy, maxmercy, (bar_x - 86) / 90));
58
    if (bar_x >= 224 && bar_x < 334)
59
        mercy = ceil(lerp(maxmercy, minmercy, (bar_x - 244) / 90));
60
    if (bar_x >= 196 && bar_x <= 224)
61
    {
62
        with (parentid)
63
        {
64
            create_afterimage = true;
65
            
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; return __mercydmgwriter; }
(myself, perfectmercy);
66
            if (alone == false)
67
            {
68
                
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; if (arg3 == -1) maxframes = -1; global.faceaction[myself] = 0; } } }
("ralsei", spr_ralsei_tpose, 1, 1);
69
                with (obj_heroralsei)
70
                {
71
                    a = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
72
                    a.hspeed = 2.5;
73
                    a.depth = depth + 1;
74
                    b = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
75
                    b.image_alpha = 0.6;
76
                    b.hspeed = 5;
77
                    b.depth = depth + 2;
78
                }
79
            }
80
            
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; if (arg3 == -1) maxframes = -1; global.faceaction[myself] = 0; } } }
("kris", spr_kris_t_pose, 1, 1);
81
            with (obj_herokris)
82
            {
83
                a = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
84
                a.hspeed = 2.5;
85
                a.depth = depth + 1;
86
                b = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
87
                b.image_alpha = 0.6;
88
                b.hspeed = 5;
89
                b.depth = depth + 2;
90
            }
91
            if (alone == false)
92
            {
93
                
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; if (arg3 == -1) maxframes = -1; global.faceaction[myself] = 0; } } }
("susie", spr_susie_t_pose2, 1, 1);
94
                with (obj_herosusie)
95
                {
96
                    a = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
97
                    a.hspeed = 2.5;
98
                    a.depth = depth + 1;
99
                    b = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
100
                    b.image_alpha = 0.6;
101
                    b.hspeed = 5;
102
                    b.depth = depth + 2;
103
                }
104
            }
105
        }
106
        msgsetloc(0, 
* You engaged in a perfect pose!Delay 11 It was highly effective!Wait for inputClose Message
"* You engaged in a perfect pose^1! It was highly effective!/%", "obj_scarecrow_intimidate2_slash_Step_0_gml_105_0"
);
107
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
108
        with (obj_flowery_enemy)
109
        {
110
            mercyaddcon = 1;
111
            if (shi_recruited)
112
            {
113
                with (shi_marker)
114
                {
115
                    sprite_index = spr_scarecrow_taunt;
116
                    x -= 10;
117
                }
118
            }
119
            if (shinobeetle_recruited)
120
            {
121
                with (shinobeetle_marker)
122
                    sprite_index = spr_shinobeetle_pose;
123
            }
124
            if (kawkaw_recruited)
125
            {
126
                with (kawkaw_marker)
127
                {
128
                    sprite_index = spr_kawakaw_happy;
129
                    image_index = 1;
130
                    image_xscale = -2;
131
                    x += 82;
132
                }
133
            }
134
        }
135
        bar_x = 196;
136
        mercy = maxmercy;
137
        with (obj_scarecrow_intimidate)
138
        {
139
            
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
();
140
            snd_stop(snd_boost);
141
            snd_play(snd_boost);
142
            image_speed = 1;
143
        }
144
        for (var i = 0; i < instance_number(obj_monsterparent); i++)
145
        {
146
            enemy[i] = instance_find(obj_monsterparent, i);
147
            if (parentid != enemy[i])
148
                
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; return __mercydmgwriter; }
(enemy[i].myself, 10);
149
        }
150
    }
151
    else if (bar_x < 86 || bar_x > 334)
152
    {
153
        snd_play(snd_error);
154
        with (obj_flowery_enemy)
155
            mercyaddcon = 1;
156
        with (parentid)
157
        {
158
            
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; return __mercydmgwriter; }
(myself, minmercy);
159
            if (alone == false)
160
            {
161
                
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; if (arg3 == -1) maxframes = -1; global.faceaction[myself] = 0; } } }
("ralsei", spr_ralsei_c_pose, 1, 1);
162
                with (obj_heroralsei)
163
                {
164
                    a = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
165
                    a.hspeed = 2.5;
166
                    a.depth = depth + 1;
167
                    b = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
168
                    b.image_alpha = 0.6;
169
                    b.hspeed = 5;
170
                    b.depth = depth + 2;
171
                }
172
            }
173
            
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; if (arg3 == -1) maxframes = -1; global.faceaction[myself] = 0; } } }
("kris", spr_kris_y_pose, 1, 1);
174
            with (obj_herokris)
175
            {
176
                a = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
177
                a.hspeed = 2.5;
178
                a.depth = depth + 1;
179
                b = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
180
                b.image_alpha = 0.6;
181
                b.hspeed = 5;
182
                b.depth = depth + 2;
183
            }
184
            if (alone == false)
185
            {
186
                
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; if (arg3 == -1) maxframes = -1; global.faceaction[myself] = 0; } } }
("susie", spr_susie_m_pose, 1, 1);
187
                with (obj_herosusie)
188
                {
189
                    a = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
190
                    a.hspeed = 2.5;
191
                    a.depth = depth + 1;
192
                    b = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
193
                    b.image_alpha = 0.6;
194
                    b.hspeed = 5;
195
                    b.depth = depth + 2;
196
                }
197
            }
198
        }
199
        msgsetloc(0, 
* The pose was mistaken!Delay 11 It wasn't very effective!Wait for inputClose Message
"* The pose was mistaken^1! It wasn't very effective!/%", "obj_scarecrow_intimidate2_slash_Step_0_gml_185_0"
);
200
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
201
        with (obj_flowery_enemy)
202
        {
203
            mercyaddcon = 1;
204
            if (shi_recruited)
205
            {
206
                with (shi_marker)
207
                {
208
                    sprite_index = spr_scarecrow_spare;
209
                    x -= 10;
210
                }
211
            }
212
            if (shinobeetle_recruited)
213
            {
214
                with (shinobeetle_marker)
215
                    sprite_index = spr_shinobeetle_spare_alone;
216
            }
217
            if (kawkaw_recruited)
218
            {
219
                with (kawkaw_marker)
220
                {
221
                    sprite_index = spr_kakaw_tongue;
222
                    image_xscale = -2;
223
                    x += 82;
224
                }
225
            }
226
        }
227
    }
228
    else
229
    {
230
        msgsetloc(0, 
* You engaged in a superior pose!Delay 11 It was very effective!Wait for inputClose Message
"* You engaged in a superior pose^1! It was very effective!/%", "obj_scarecrow_intimidate2_slash_Step_0_gml_200_0"
);
231
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
232
        with (obj_flowery_enemy)
233
            mercyaddcon = 1;
234
        with (obj_scarecrow_intimidate)
235
        {
236
            
scr_shakeobj
scr_shakeobj

function
scr_shakeobj()
{ var _shakeobj = instance_create(x, y, obj_shakeobj); _shakeobj.target = id; if (argument_count >= 1) { if (i_ex(argument0)) _shakeobj.target = argument0; } if (argument_count >= 2) { if (argument1 != -1) _shakeobj.shakeamt = argument1; } if (argument_count >= 3) { if (argument2 != -1) _shakeobj.shakereduct = argument2; } with (_shakeobj) event_user(0); }
();
237
            snd_stop(snd_boost);
238
            snd_play(snd_boost);
239
            image_speed = 1;
240
        }
241
        with (parentid)
242
        {
243
            if (alone == false)
244
            {
245
                
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; if (arg3 == -1) maxframes = -1; global.faceaction[myself] = 0; } } }
("ralsei", spr_ralsei_tpose, 1, 1);
246
                with (obj_heroralsei)
247
                {
248
                    a = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
249
                    a.hspeed = 2.5;
250
                    a.depth = depth + 1;
251
                    b = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
252
                    b.image_alpha = 0.6;
253
                    b.hspeed = 5;
254
                    b.depth = depth + 2;
255
                }
256
            }
257
            
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; if (arg3 == -1) maxframes = -1; global.faceaction[myself] = 0; } } }
("kris", spr_kris_t_pose, 1, 1);
258
            with (obj_herokris)
259
            {
260
                a = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
261
                a.hspeed = 2.5;
262
                a.depth = depth + 1;
263
                b = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
264
                b.image_alpha = 0.6;
265
                b.hspeed = 5;
266
                b.depth = depth + 2;
267
            }
268
            if (alone == false)
269
            {
270
                
scr_battle_sprite_set
scr_battle_sprite_set

function
scr_battle_sprite_set(arg0, arg1, arg2, arg3)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 8; hurt = 0; attacktimer = 0; sprite_index = arg1; image_speed = arg2; image_index = 0; if (arg3 == 0) maxframes = image_number; if (arg3 == -1) maxframes = -1; global.faceaction[myself] = 0; } } }
("susie", spr_susie_t_pose2, 1, 1);
271
                with (obj_herosusie)
272
                {
273
                    a = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
274
                    a.hspeed = 2.5;
275
                    a.depth = depth + 1;
276
                    b = 
scr_afterimage
scr_afterimage

function
scr_afterimage()
{ afterimage = instance_create(x, y, obj_afterimage); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
277
                    b.image_alpha = 0.6;
278
                    b.hspeed = 5;
279
                    b.depth = depth + 2;
280
                }
281
            }
282
            
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; return __mercydmgwriter; }
(myself, other.mercy);
283
        }
284
        for (var i = 0; i < instance_number(obj_monsterparent); i++)
285
        {
286
            enemy[i] = instance_find(obj_monsterparent, i);
287
            if (parentid != enemy[i])
288
                
scr_mercyadd
scr_mercyadd

function
scr_mercyadd(arg0, arg1)
{ global.mercymod[arg0] += arg1; if (global.mercymod[arg0] < 0) global.mercymod[arg0] = 0; if (global.mercymod[arg0] >= 100) global.mercymod[arg0] = 100; var _playsound = 1; if (arg1 <= 0) _playsound = 0; with (obj_dmgwriter) { if (type == 5 && mercytimer < 8) _playsound = 0; } if (_playsound) { var _pitch = 0.8; if (arg1 < 99) _pitch = 1; if (arg1 <= 50) _pitch = 1.2; if (arg1 <= 25) _pitch = 1.4; snd_play_x(snd_mercyadd, 0.8, _pitch); } __mercydmgwriter = instance_create(global.monsterx[arg0], (global.monstery[arg0] + 20) - (global.hittarget[arg0] * 20), obj_dmgwriter); __mercydmgwriter.damage = arg1; __mercydmgwriter.type = 5; global.hittarget[arg0]++; return __mercydmgwriter; }
(enemy[i].myself, 10);
289
        }
290
        with (obj_flowery_enemy)
291
        {
292
            mercyaddcon = 1;
293
            if (shi_recruited)
294
            {
295
                with (shi_marker)
296
                {
297
                    sprite_index = spr_scarecrow_taunt;
298
                    x -= 10;
299
                }
300
            }
301
            if (shinobeetle_recruited)
302
            {
303
                with (shinobeetle_marker)
304
                    sprite_index = spr_shinobeetle_pose;
305
            }
306
            if (kawkaw_recruited)
307
            {
308
                with (kawkaw_marker)
309
                {
310
                    sprite_index = spr_kawakaw_happy;
311
                    image_index = 1;
312
                    image_xscale = -2;
313
                    x += 82;
314
                }
315
            }
316
        }
317
    }
318
    with (parentid)
319
        actcon = 1;
320
    afterimage = 
scr_afterimage_grow
scr_afterimage_grow

function
scr_afterimage_grow()
{ afterimage = instance_create(x, y, obj_afterimage_grow); afterimage.sprite_index = sprite_index; afterimage.image_index = image_index; afterimage.image_blend = image_blend; afterimage.image_speed = 0; afterimage.depth = depth; afterimage.image_xscale = image_xscale; afterimage.image_yscale = image_yscale; afterimage.image_angle = image_angle; return afterimage; }
();
321
    afterimage.sprite_index = spr_undertale_combat_thing2_centered;
322
    afterimage.x = ((x + bar_x) - 137 - 7 - 60) + 8;
323
    afterimage.y = (y - 17) + 18;
324
    afterimage.image_xscale = 1;
325
    afterimage.image_yscale = 1;
326
    afterimage.depth = depth - 1;
327
    con = 1;
328
}
329
if (con == 0)
330
    siner++;
331
if (con == 1)
332
{
333
    timer++;
334
    if (timer > 12)
335
    {
336
        image_alpha -= 0.1;
337
        image_alpha2 -= 0.1;
338
        image_alpha3 -= 0.1;
339
        if (image_alpha < 0 && image_alpha2 < 0 && image_alpha3 < 0)
340
        {
341
            if (!i_ex(obj_writer))
342
            {
343
                
scr_battle_sprite_reset
scr_battle_sprite_reset

function
scr_battle_sprite_reset(arg0)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 0; hurt = 0; attacktimer = 0; attacked = 0; global.faceaction[myself] = 0; } } }
("kris");
344
                
scr_battle_sprite_reset
scr_battle_sprite_reset

function
scr_battle_sprite_reset(arg0)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 0; hurt = 0; attacktimer = 0; attacked = 0; global.faceaction[myself] = 0; } } }
("susie");
345
                
scr_battle_sprite_reset
scr_battle_sprite_reset

function
scr_battle_sprite_reset(arg0)
{ _charactor = arg0; _charinstance = obj_herokris; if (_charactor == "noelle") { _charinstance = obj_heronoelle; _charnum = 4; } if (_charactor == "ralsei") { _charinstance = obj_heroralsei; _charnum = 3; } if (_charactor == "susie") { _charinstance = obj_herosusie; _charnum = 2; } if (_charactor == "kris") { _charinstance = obj_herokris; _charnum = 1; } if (instance_exists(_charinstance)) { with (_charinstance) { state = 0; hurt = 0; attacktimer = 0; attacked = 0; global.faceaction[myself] = 0; } } }
("ralsei");
346
                instance_destroy();
347
            }
348
        }
349
    }
350
}