Deltarune (Chapter 4) script viewer

← back to main script listing

gml_GlobalScript_scr_spearshot

(view raw script w/o annotations or w/e)
1
function 
scr_spearshot
scr_spearshot

function
scr_spearshot(arg0, arg1, arg2, arg3)
{ if (arg3 == 1) { instance_create(x - 5, y + 4, obj_gerson_green_switch); } else if (arg3 == 2) { ham = instance_create(obj_heart.x - 20, obj_heart.y - 20, obj_giant_hammer); ham.type = 2; ham.dir = arg0; } else if (arg3 == 3) { with (obj_spearblocker) diagonal_transform = 1; with (obj_hammer_of_justice_enemy) diagonal_enabled = 1; } else if (arg3 == 400) { if (obj_hammer_of_justice_enemy.visible == true) { obj_hammer_of_justice_enemy.visible = false; gers = instance_create(obj_hammer_of_justice_enemy.x + 45, obj_hammer_of_justice_enemy.y + 45, obj_gerson_teleport); gers.depth = obj_hammer_of_justice_enemy.depth; } } else if (arg3 == 4) { if (i_ex(obj_hammer_of_justice_enemy) && obj_hammer_of_justice_enemy.visible == true) { obj_hammer_of_justice_enemy.visible = false; gers = instance_create(obj_hammer_of_justice_enemy.x + 45, obj_hammer_of_justice_enemy.y + 45, obj_gerson_teleport); gers.depth = obj_hammer_of_justice_enemy.depth; } if (arg2 == -5) { gers = instance_create(camerax() + arg0, cameray() + arg1, obj_gerson_teleport); gers.type = 2; gers.swingdowntype = -3; gers.image_alpha = 0; gers.image_angle = 90; } else if (arg2 == -4) { gers = instance_create(obj_growtangle.x + arg0 + lengthdir_x(130, obj_hammer_of_justice_enemy.swingdown_ex * 45), obj_growtangle.y + arg1 + 20 + lengthdir_y(130, obj_hammer_of_justice_enemy.swingdown_ex * 45), obj_gerson_teleport); gers.type = 2; gers.swingdowntype = -4; gers.image_angle = obj_hammer_of_justice_enemy.swingdown_ex * 45; gers.image_alpha = 0; obj_hammer_of_justice_enemy.swingdown_ex++; if (obj_hammer_of_justice_enemy.swingdown_ex == 1) gers.special = 4; if (obj_hammer_of_justice_enemy.swingdown_ex == 2) gers.special = 1; if (obj_hammer_of_justice_enemy.swingdown_ex == 3) gers.special = 3; if (obj_hammer_of_justice_enemy.swingdown_ex == 4) gers.special = 2; if (obj_hammer_of_justice_enemy.swingdown_ex == 5) gers.special = 4; if (obj_hammer_of_justice_enemy.swingdown_ex == 6) gers.special = 1; if (obj_hammer_of_justice_enemy.swingdown_ex == 7) gers.special = 3; if (obj_hammer_of_justice_enemy.swingdown_ex == 8) gers.special = 2; } else if (arg2 == -3) { gers = instance_create(obj_growtangle.x + arg0 + lengthdir_x(130, obj_hammer_of_justice_enemy.swingdown_ex * 45), obj_growtangle.y + arg1 + 20 + lengthdir_y(130, obj_hammer_of_justice_enemy.swingdown_ex * 45), obj_gerson_teleport); gers.type = 2; gers.swingdowntype = arg2; gers.image_angle = obj_hammer_of_justice_enemy.swingdown_ex * 45; gers.image_alpha = 0; obj_hammer_of_justice_enemy.swingdown_ex++; } else if (arg2 == 10) { gers = instance_create(obj_growtangle.x + 116, obj_heart.y + 26, obj_gerson_teleport); gers.type = 2; gers.swingdowntype = arg2; gers.image_alpha = 0; } else if (arg2 == 11) { gers = instance_create(obj_growtangle.x + 116, obj_growtangle.y + 55, obj_gerson_teleport); gers.type = 2; gers.swingdowntype = arg2; gers.image_alpha = 0; } else if (arg2 == 12) { gers = instance_create(obj_growtangle.x - 116, obj_growtangle.y - 65, obj_gerson_teleport); gers.type = 2; gers.swingdowntype = arg2; gers.image_angle = 180; gers.image_alpha = 0; } else if (arg2 == 13) ...
(arg0, arg1, arg2, arg3)
2
{
3
    if (arg3 == 1)
4
    {
5
        instance_create(x - 5, y + 4, obj_gerson_green_switch);
6
    }
7
    else if (arg3 == 2)
8
    {
9
        ham = instance_create(obj_heart.x - 20, obj_heart.y - 20, obj_giant_hammer);
10
        ham.type = 2;
11
        ham.dir = arg0;
12
    }
13
    else if (arg3 == 3)
14
    {
15
        with (obj_spearblocker)
16
            diagonal_transform = 1;
17
        with (obj_hammer_of_justice_enemy)
18
            diagonal_enabled = 1;
19
    }
20
    else if (arg3 == 400)
21
    {
22
        if (obj_hammer_of_justice_enemy.visible == true)
23
        {
24
            obj_hammer_of_justice_enemy.visible = false;
25
            gers = instance_create(obj_hammer_of_justice_enemy.x + 45, obj_hammer_of_justice_enemy.y + 45, obj_gerson_teleport);
26
            gers.depth = obj_hammer_of_justice_enemy.depth;
27
        }
28
    }
29
    else if (arg3 == 4)
30
    {
31
        if (i_ex(obj_hammer_of_justice_enemy) && obj_hammer_of_justice_enemy.visible == true)
32
        {
33
            obj_hammer_of_justice_enemy.visible = false;
34
            gers = instance_create(obj_hammer_of_justice_enemy.x + 45, obj_hammer_of_justice_enemy.y + 45, obj_gerson_teleport);
35
            gers.depth = obj_hammer_of_justice_enemy.depth;
36
        }
37
        if (arg2 == -5)
38
        {
39
            gers = instance_create(camerax() + arg0, cameray() + arg1, obj_gerson_teleport);
40
            gers.type = 2;
41
            gers.swingdowntype = -3;
42
            gers.image_alpha = 0;
43
            gers.image_angle = 90;
44
        }
45
        else if (arg2 == -4)
46
        {
47
            gers = instance_create(obj_growtangle.x + arg0 + lengthdir_x(130, obj_hammer_of_justice_enemy.swingdown_ex * 45), obj_growtangle.y + arg1 + 20 + lengthdir_y(130, obj_hammer_of_justice_enemy.swingdown_ex * 45), obj_gerson_teleport);
48
            gers.type = 2;
49
            gers.swingdowntype = -4;
50
            gers.image_angle = obj_hammer_of_justice_enemy.swingdown_ex * 45;
51
            gers.image_alpha = 0;
52
            obj_hammer_of_justice_enemy.swingdown_ex++;
53
            if (obj_hammer_of_justice_enemy.swingdown_ex == 1)
54
                gers.special = 4;
55
            if (obj_hammer_of_justice_enemy.swingdown_ex == 2)
56
                gers.special = 1;
57
            if (obj_hammer_of_justice_enemy.swingdown_ex == 3)
58
                gers.special = 3;
59
            if (obj_hammer_of_justice_enemy.swingdown_ex == 4)
60
                gers.special = 2;
61
            if (obj_hammer_of_justice_enemy.swingdown_ex == 5)
62
                gers.special = 4;
63
            if (obj_hammer_of_justice_enemy.swingdown_ex == 6)
64
                gers.special = 1;
65
            if (obj_hammer_of_justice_enemy.swingdown_ex == 7)
66
                gers.special = 3;
67
            if (obj_hammer_of_justice_enemy.swingdown_ex == 8)
68
                gers.special = 2;
69
        }
70
        else if (arg2 == -3)
71
        {
72
            gers = instance_create(obj_growtangle.x + arg0 + lengthdir_x(130, obj_hammer_of_justice_enemy.swingdown_ex * 45), obj_growtangle.y + arg1 + 20 + lengthdir_y(130, obj_hammer_of_justice_enemy.swingdown_ex * 45), obj_gerson_teleport);
73
            gers.type = 2;
74
            gers.swingdowntype = arg2;
75
            gers.image_angle = obj_hammer_of_justice_enemy.swingdown_ex * 45;
76
            gers.image_alpha = 0;
77
            obj_hammer_of_justice_enemy.swingdown_ex++;
78
        }
79
        else if (arg2 == 10)
80
        {
81
            gers = instance_create(obj_growtangle.x + 116, obj_heart.y + 26, obj_gerson_teleport);
82
            gers.type = 2;
83
            gers.swingdowntype = arg2;
84
            gers.image_alpha = 0;
85
        }
86
        else if (arg2 == 11)
87
        {
88
            gers = instance_create(obj_growtangle.x + 116, obj_growtangle.y + 55, obj_gerson_teleport);
89
            gers.type = 2;
90
            gers.swingdowntype = arg2;
91
            gers.image_alpha = 0;
92
        }
93
        else if (arg2 == 12)
94
        {
95
            gers = instance_create(obj_growtangle.x - 116, obj_growtangle.y - 65, obj_gerson_teleport);
96
            gers.type = 2;
97
            gers.swingdowntype = arg2;
98
            gers.image_angle = 180;
99
            gers.image_alpha = 0;
100
        }
101
        else if (arg2 == 13)
102
        {
103
            gers = instance_create(obj_growtangle.x + 116, obj_growtangle.y + 41, obj_gerson_teleport);
104
            gers.type = 2;
105
            gers.swingdowntype = arg2;
106
            gers.image_alpha = 0;
107
        }
108
        else if (arg2 == 14)
109
        {
110
            gers = instance_create(obj_growtangle.x - 116, obj_growtangle.y - 49, obj_gerson_teleport);
111
            gers.type = 2;
112
            gers.swingdowntype = arg2;
113
            gers.image_angle = 180;
114
            gers.image_alpha = 0;
115
        }
116
        else if (arg2 == 15)
117
        {
118
            gers = instance_create(obj_growtangle.x - 116, (obj_growtangle.y + 41) - 40, obj_gerson_teleport);
119
            gers.type = 2;
120
            gers.swingdowntype = arg2;
121
            gers.image_angle = 180;
122
            gers.image_alpha = 0;
123
        }
124
        else if (arg2 == 16)
125
        {
126
            gers = instance_create(obj_growtangle.x + 116, (obj_growtangle.y - 49) + 46, obj_gerson_teleport);
127
            gers.type = 2;
128
            gers.swingdowntype = arg2;
129
            gers.image_angle = 0;
130
            gers.image_alpha = 0;
131
        }
132
        else if (arg2 == 17)
133
        {
134
            gers = instance_create(obj_growtangle.x - 41, obj_growtangle.y + 115, obj_gerson_teleport);
135
            gers.type = 2;
136
            gers.swingdowntype = arg2;
137
            gers.image_angle = 270;
138
            gers.image_alpha = 0;
139
        }
140
        else if (arg2 == 18)
141
        {
142
            gers = instance_create(obj_growtangle.x + 7, obj_growtangle.y + 115, obj_gerson_teleport);
143
            gers.type = 2;
144
            gers.swingdowntype = arg2;
145
            gers.image_angle = 270;
146
            gers.image_alpha = 0;
147
        }
148
        else
149
        {
150
            gers = instance_create(camerax() + arg0, cameray() + arg1, obj_gerson_teleport);
151
            gers.type = 2;
152
            gers.swingdowntype = arg2;
153
            gers.image_alpha = 0;
154
        }
155
    }
156
    else if (arg3 == 5)
157
    {
158
        instance_create(arg0, arg1, obj_gerson_box_hit_controller);
159
    }
160
    else if (arg3 == 6)
161
    {
162
        instance_create(arg0, arg1, obj_gerson_bell_attack_controller);
163
    }
164
    else if (arg3 == 7)
165
    {
166
        instance_create(arg0, arg1, obj_gerson_hammer_bro_attack_controller);
167
    }
168
    else if (arg3 == 8)
169
    {
170
        obj_hammer_of_justice_enemy.goldcon = 1;
171
    }
172
    else if (arg3 == 9)
173
    {
174
        obj_hammer_of_justice_enemy.sprite_index = spr_gerson_laugh;
175
        obj_hammer_of_justice_enemy.state = 12;
176
    }
177
    else if (arg3 == 10)
178
    {
179
        obj_hammer_of_justice_enemy.visible = false;
180
        obj_hammer_of_justice_enemy.sprite_index = spr_gerson_idle;
181
        obj_hammer_of_justice_enemy.state = 0;
182
        gers = instance_create(obj_hammer_of_justice_enemy.x + 45, obj_hammer_of_justice_enemy.y + 45, obj_gerson_teleport);
183
        gers.type = 10;
184
        global.turntimer = 2;
185
    }
186
    else if (arg3 == 10.5)
187
    {
188
        obj_hammer_of_justice_enemy.visible = false;
189
        obj_hammer_of_justice_enemy.sprite_index = spr_gerson_idle;
190
        obj_hammer_of_justice_enemy.state = 0;
191
        gers = instance_create(obj_hammer_of_justice_enemy.x + 60, obj_hammer_of_justice_enemy.y + 35, obj_gerson_teleport);
192
        gers.type = 10;
193
    }
194
    else if (arg3 == 11)
195
    {
196
        if (obj_hammer_of_justice_enemy.visible == true)
197
            gers = instance_create(obj_hammer_of_justice_enemy.x + 45, obj_hammer_of_justice_enemy.y + 45, obj_gerson_teleport);
198
        gers = instance_create(obj_growtangle.x - 150, obj_growtangle.y + 15, obj_gerson_teleport);
199
        gers.type = 4;
200
    }
201
    else if (arg3 == 12)
202
    {
203
        if (obj_hammer_of_justice_enemy.visible == true)
204
        {
205
            obj_hammer_of_justice_enemy.visible = false;
206
            gers = instance_create(obj_hammer_of_justice_enemy.x + 45, obj_hammer_of_justice_enemy.y + 45, obj_gerson_teleport);
207
        }
208
        if (i_ex(obj_growtangle))
209
        {
210
            gers = instance_create(obj_growtangle.x + 150, obj_growtangle.y + 15, obj_gerson_teleport);
211
            gers.type = 5;
212
        }
213
    }
214
    else if (arg3 == 13)
215
    {
216
        if (i_ex(obj_hammer_of_justice_enemy))
217
        {
218
            obj_hammer_of_justice_enemy.visible = false;
219
            gers = instance_create_depth(x, y, depth, obj_gerson_squishes_box);
220
            gers.type = 5;
221
        }
222
    }
223
    else if (arg3 == 14)
224
    {
225
        if (i_ex(obj_spearblocker))
226
        {
227
            _inst = instance_create(obj_spearblocker.x + lengthdir_x(arg2, arg0 + 180), obj_spearblocker.y + lengthdir_y(arg2, arg0 + 180), obj_spearshot);
228
            _inst.direction = arg0;
229
            _inst.fakespeed = 0;
230
            _inst.len = arg2;
231
            _inst.image_angle = _inst.direction;
232
            _inst.image_alpha = 0;
233
            _inst.fadespear = 1;
234
            _inst.fadespeed = 25;
235
            _inst.fadespeartimermax = arg1;
236
            if (argument_count == 5)
237
                _inst.fadespeardist = argument4;
238
        }
239
    }
240
    else if (arg3 == 16)
241
    {
242
        _inst = instance_create(-9999, -9999, obj_spearshot);
243
        _inst.special = 0;
244
        _inst.direction = arg0;
245
        _inst.fakespeed = arg1;
246
        _inst.len = arg1 * arg2;
247
        _inst.image_angle = _inst.direction;
248
        _inst.swingaround = 1;
249
    }
250
    else if (arg3 == 17)
251
    {
252
        _inst = instance_create(obj_spearblocker.x + lengthdir_x(arg2, arg0 + 180), obj_spearblocker.y + lengthdir_y(arg2, arg0 + 180), obj_spearshot);
253
        _inst.direction = arg0;
254
        _inst.fakespeed = 0.2;
255
        _inst.len = arg2;
256
        _inst.image_angle = _inst.direction;
257
        _inst.image_alpha = 0;
258
        _inst.fadespear = 3;
259
        _inst.fadewaitmax = arg1;
260
    }
261
    else if (arg3 == 18)
262
    {
263
        _inst = instance_create(obj_spearblocker.x + lengthdir_x(arg2, arg0 + 180), obj_spearblocker.y + lengthdir_y(arg2, arg0 + 180), obj_spearshot);
264
        _inst.direction = arg0;
265
        _inst.fakespeed = 0.2;
266
        _inst.len = arg2;
267
        _inst.image_angle = _inst.direction;
268
        _inst.image_alpha = 0;
269
        _inst.fadespear = 4;
270
        _inst.fadewaitmax = arg1;
271
    }
272
    else if (arg3 == 19)
273
    {
274
        _inst = instance_create(-9999, -9999, obj_spearshot);
275
        _inst.special = 0;
276
        _inst.direction = arg0;
277
        _inst.fakespeed = arg1;
278
        _inst.len = arg1 * arg2;
279
        _inst.image_angle = _inst.direction;
280
        _inst.bouncespear = 1;
281
        _inst.hp = 2;
282
        _inst.maxhp = 2;
283
    }
284
    else if (arg3 == 20)
285
    {
286
        _inst = instance_create(-9999, -9999, obj_spearshot);
287
        _inst.special = 0;
288
        _inst.direction = arg0;
289
        _inst.fakespeed = arg1;
290
        _inst.len = arg1 * arg2;
291
        _inst.image_angle = _inst.direction;
292
        _inst.bouncespear = 2;
293
        _inst.hp = 3;
294
        _inst.maxhp = 3;
295
    }
296
    else if (arg3 == 20.1)
297
    {
298
        _inst = instance_create(-9999, -9999, obj_spearshot);
299
        _inst.special = 0;
300
        _inst.direction = arg0;
301
        _inst.fakespeed = arg1;
302
        _inst.len = arg1 * arg2;
303
        _inst.image_angle = _inst.direction;
304
        _inst.bouncespear = 2;
305
        _inst.hp = 2;
306
        _inst.maxhp = 2;
307
    }
308
    else if (arg3 == 21)
309
    {
310
        _inst = instance_create(-9999, -9999, obj_spearshot);
311
        _inst.special = 0;
312
        _inst.direction = arg0;
313
        _inst.fakespeed = arg1;
314
        _inst.len = arg1 * arg2;
315
        _inst.image_angle = _inst.direction;
316
        _inst.bouncespear = 2;
317
        _inst.hp = 9;
318
        _inst.maxhp = 9;
319
    }
320
    else if (arg3 == 21.6)
321
    {
322
        _inst = instance_create(-9999, -9999, obj_spearshot);
323
        _inst.special = 0;
324
        _inst.direction = arg0;
325
        _inst.fakespeed = arg1;
326
        _inst.len = arg1 * arg2;
327
        _inst.image_angle = _inst.direction;
328
        _inst.bouncespear = 1;
329
        _inst.hp = 6;
330
        _inst.maxhp = 6;
331
    }
332
    else if (arg3 == 21.65)
333
    {
334
        _inst = instance_create(-9999, -9999, obj_spearshot);
335
        _inst.special = 0;
336
        _inst.direction = arg0;
337
        _inst.fakespeed = arg1;
338
        _inst.len = arg1 * arg2;
339
        _inst.image_angle = _inst.direction;
340
        _inst.bouncespear = 2;
341
        _inst.hp = 6;
342
        _inst.maxhp = 6;
343
    }
344
    else if (arg3 == 21.66)
345
    {
346
        _inst = instance_create(-9999, -9999, obj_spearshot);
347
        _inst.special = 0;
348
        _inst.direction = arg0;
349
        _inst.fakespeed = arg1;
350
        _inst.len = arg1 * arg2;
351
        _inst.image_angle = _inst.direction;
352
        _inst.bouncespear = 2;
353
        _inst.hp = 5;
354
        _inst.maxhp = 5;
355
    }
356
    else if (arg3 == 21.9)
357
    {
358
        _inst = instance_create(-9999, -9999, obj_spearshot);
359
        _inst.special = 0;
360
        _inst.direction = arg0;
361
        _inst.fakespeed = arg1;
362
        _inst.len = arg1 * arg2;
363
        _inst.image_angle = _inst.direction;
364
        _inst.bouncespear = 1;
365
        _inst.hp = 9;
366
        _inst.maxhp = 9;
367
    }
368
    else if (arg3 == 22)
369
    {
370
        _inst = instance_create(-9999, -9999, obj_spearshot);
371
        _inst.special = 0;
372
        _inst.direction = arg0;
373
        _inst.fakespeed = arg1;
374
        _inst.len = arg1 * arg2;
375
        _inst.image_angle = _inst.direction;
376
        _inst.bouncespear = 2;
377
        _inst.fastbounce = 1;
378
        _inst.hp = 3;
379
        _inst.maxhp = 3;
380
    }
381
    else if (arg3 == 23)
382
    {
383
        fasterheart = true;
384
    }
385
    else if (arg3 == 24)
386
    {
387
        gers = instance_create(arg0, arg1, obj_gerson_speen);
388
        gers.type = 6;
389
        with (gers)
390
            event_user(0);
391
    }
392
    else if (arg3 == 25)
393
    {
394
        _inst = instance_create(-9999, -9999, obj_spearshot);
395
        _inst.direction = arg0;
396
        _inst.fakespeed = arg1;
397
        _inst.len = arg1 * arg2;
398
        _inst.image_angle = _inst.direction;
399
        _inst.longspear = 1;
400
        if (argument_count == 5)
401
            _inst.longnotepieces = argument4;
402
    }
403
    else if (arg3 == 26)
404
    {
405
        global.monsterattackname[myself] = "gerson rudebuster";
406
        dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
407
        dc.type = 250;
408
    }
409
    else if (arg3 == 27)
410
    {
411
        inst = instance_create(x, y, obj_gerson_growtangle_transform);
412
        inst.shrink = true;
413
    }
414
    else if (arg3 == 28)
415
    {
416
        swingdown_multitelegraph = arg0;
417
    }
418
    else if (arg3 == 29)
419
    {
420
        instance_create(x, y, obj_gerson_darken);
421
    }
422
    else if (arg3 == 30)
423
    {
424
        _inst = instance_create(-9999, -9999, obj_spearshot);
425
        _inst.special = 0;
426
        _inst.direction = arg0;
427
        _inst.fakespeed = arg1;
428
        _inst.len = arg1 * arg2;
429
        _inst.image_angle = _inst.direction;
430
        _inst.breakshield = 1;
431
        _inst.sprite_index = spr_spear_arrow;
432
    }
433
    else if (arg3 == 31)
434
    {
435
        instance_create(x, y, obj_gerson_growtangle);
436
    }
437
    else if (arg3 == 32)
438
    {
439
        if (i_ex(obj_growtangle))
440
        {
441
            if (arg2 >= 0)
442
            {
443
                _inst = instance_create(obj_growtangle.x + arg0, obj_growtangle.y + arg1, obj_gerson_swing_down_new);
444
                _inst.image_angle = arg2;
445
                _inst.direction = arg2 + 270;
446
                _inst.gravity_direction = arg2 + 270;
447
            }
448
            if (arg2 == -1)
449
            {
450
                _inst = instance_create(obj_growtangle.x + 70, obj_heart.y, obj_gerson_swing_down_new);
451
                _inst.image_angle = 270;
452
                _inst.direction = 540;
453
                _inst.gravity_direction = 540;
454
            }
455
            if (arg2 == -2)
456
            {
457
                _inst = instance_create(obj_growtangle.x - 70, obj_heart.y, obj_gerson_swing_down_new);
458
                _inst.image_angle = 90;
459
                _inst.direction = 360;
460
                _inst.gravity_direction = 360;
461
            }
462
            if (arg2 == -3)
463
            {
464
                _inst = instance_create(obj_growtangle.x + arg0, obj_growtangle.y + arg1, obj_gerson_swing_down_new);
465
                _inst.image_angle = arg2;
466
                _inst.direction = arg2 + 270;
467
                _inst.gravity_direction = arg2 + 270;
468
                _inst.version = 1;
469
            }
470
        }
471
    }
472
    else if (arg3 == 33)
473
    {
474
        with (obj_gerson_darken)
475
            con = 1;
476
    }
477
    else if (arg3 == 34)
478
    {
479
        if (introtalkcon == 0)
480
            introtalkcon = 1;
481
    }
482
    else if (arg3 == 35)
483
    {
484
        _inst = instance_create(-9999, -9999, obj_spearshot);
485
        _inst.special = 0;
486
        _inst.direction = arg0;
487
        _inst.fakespeed = arg1;
488
        _inst.len = arg1 * arg2;
489
        _inst.image_angle = _inst.direction;
490
        _inst.redhammer = 1;
491
        _inst.grav = 0.3;
492
    }
493
    else if (arg3 == 355)
494
    {
495
        _inst = instance_create(-9999, -9999, obj_spearshot);
496
        _inst.special = 0;
497
        _inst.direction = arg0;
498
        _inst.fakespeed = arg1;
499
        _inst.len = arg1 * arg2;
500
        _inst.image_angle = _inst.direction;
501
        _inst.redhammer = 1;
502
        _inst.redhammerfakeout = 1;
503
    }
504
    else if (arg3 == 36)
505
    {
506
        if (!i_ex(obj_spearblocker))
507
            instance_create(x, y, obj_spearblocker);
508
    }
509
    else if (arg3 == 37)
510
    {
511
        if (i_ex(obj_gerson_darkness_overlay))
512
            obj_gerson_darkness_overlay.scalecon = arg0;
513
    }
514
    else if (arg3 == 37)
515
    {
516
    }
517
    else if (arg3 == 38)
518
    {
519
        snd_play_x(snd_soundbattle_leadin, 1, arg0);
520
    }
521
    else if (arg3 == 39)
522
    {
523
        snd_play_x(snd_soundbattle_leadin_short, 1, arg0);
524
    }
525
    else if (arg3 == 40)
526
    {
527
        _inst = instance_create(-9999, -9999, obj_spearshot);
528
        _inst.special = 0;
529
        _inst.direction = arg0;
530
        _inst.fakespeed = arg1;
531
        _inst.len = arg1 * arg2;
532
        _inst.image_angle = _inst.direction;
533
        _inst.bouncespear = 1;
534
        _inst.slowbounce = 1;
535
        _inst.hp = 3;
536
        _inst.maxhp = 3;
537
    }
538
    else if (arg3 == 40.4)
539
    {
540
        _inst = instance_create(-9999, -9999, obj_spearshot);
541
        _inst.special = 0;
542
        _inst.direction = arg0;
543
        _inst.fakespeed = arg1;
544
        _inst.len = arg1 * arg2;
545
        _inst.image_angle = _inst.direction;
546
        _inst.bouncespear = 1;
547
        _inst.slowbounce = 1;
548
        _inst.hp = 2;
549
        _inst.maxhp = 2;
550
    }
551
    else if (arg3 == 40.5)
552
    {
553
        _inst = instance_create(-9999, -9999, obj_spearshot);
554
        _inst.special = 0;
555
        _inst.direction = arg0;
556
        _inst.fakespeed = arg1;
557
        _inst.len = arg1 * arg2;
558
        _inst.image_angle = _inst.direction;
559
        _inst.bouncespear = 2;
560
        _inst.slowbounce = 1;
561
        _inst.hp = 4;
562
        _inst.maxhp = 4;
563
    }
564
    else if (arg3 == 40.6)
565
    {
566
        _inst = instance_create(-9999, -9999, obj_spearshot);
567
        _inst.special = 0;
568
        _inst.direction = arg0;
569
        _inst.fakespeed = arg1;
570
        _inst.len = arg1 * arg2;
571
        _inst.image_angle = _inst.direction;
572
        _inst.bouncespear = 2;
573
        _inst.slowbounce = 1;
574
        _inst.hp = 3;
575
        _inst.maxhp = 3;
576
        _inst.gigashell = true;
577
    }
578
    else if (arg3 == 40.75)
579
    {
580
        _inst = instance_create(-9999, -9999, obj_spearshot);
581
        _inst.special = 0;
582
        _inst.direction = arg0;
583
        _inst.fakespeed = arg1;
584
        _inst.len = arg1 * arg2;
585
        _inst.image_angle = _inst.direction;
586
        _inst.bouncespear = 2;
587
        _inst.slowbounce = 1;
588
        _inst.hp = 3;
589
        _inst.maxhp = 3;
590
    }
591
    else if (arg3 == 41)
592
    {
593
        _inst = instance_create(-9999, -9999, obj_spearshot);
594
        _inst.special = 0;
595
        _inst.direction = arg0;
596
        _inst.fakespeed = arg1;
597
        _inst.len = arg1 * arg2;
598
        _inst.image_angle = _inst.direction;
599
        _inst.bouncespear = 2;
600
        _inst.slowbounce = 2;
601
        _inst.hp = 3;
602
        _inst.maxhp = 3;
603
    }
604
    else if (arg3 == 41.1)
605
    {
606
        _inst = instance_create(-9999, -9999, obj_spearshot);
607
        _inst.special = 0;
608
        _inst.direction = arg0;
609
        _inst.fakespeed = arg1;
610
        _inst.len = arg1 * arg2;
611
        _inst.image_angle = _inst.direction;
612
        _inst.bouncespear = 2;
613
        _inst.slowbounce = 2;
614
        _inst.hp = 3;
615
        _inst.maxhp = 3;
616
        _inst.gigashell = true;
617
    }
618
    else if (arg3 == 42)
619
    {
620
        _inst = instance_create(-9999, -9999, obj_spearshot);
621
        _inst.special = 0;
622
        _inst.direction = arg0;
623
        _inst.fakespeed = arg1;
624
        _inst.len = arg1 * arg2;
625
        _inst.image_angle = _inst.direction;
626
        _inst.bouncespear = 2;
627
        _inst.slowbounce = 3;
628
        _inst.hp = 3;
629
        _inst.maxhp = 3;
630
    }
631
    else if (arg3 == 42.1)
632
    {
633
        _inst = instance_create(-9999, -9999, obj_spearshot);
634
        _inst.special = 0;
635
        _inst.direction = arg0;
636
        _inst.fakespeed = arg1;
637
        _inst.len = arg1 * arg2;
638
        _inst.image_angle = _inst.direction;
639
        _inst.bouncespear = 2;
640
        _inst.slowbounce = 3;
641
        _inst.hp = 2;
642
        _inst.maxhp = 2;
643
        _inst.gigashell = true;
644
    }
645
    else if (arg3 == 42.2)
646
    {
647
        _inst = instance_create(-9999, -9999, obj_spearshot);
648
        _inst.special = 0;
649
        _inst.direction = arg0;
650
        _inst.fakespeed = arg1;
651
        _inst.len = arg1 * arg2;
652
        _inst.image_angle = _inst.direction;
653
        _inst.bouncespear = 2;
654
        _inst.slowbounce = 4;
655
        _inst.hp = 3;
656
        _inst.maxhp = 3;
657
        _inst.gigashell = true;
658
    }
659
    else if (arg3 == 43)
660
    {
661
        if (i_ex(obj_spearblocker))
662
        {
663
            obj_spearblocker.shadowpowertarget = arg0;
664
            obj_spearblocker.shadowpowertimermax = arg1;
665
            obj_spearblocker.shadowpowercon = 1;
666
            obj_spearblocker.shadowpowertimer = 0;
667
        }
668
    }
669
    else if (arg3 == 50)
670
    {
671
        instance_create(arg0, arg1, obj_box_throw_controller);
672
    }
673
    else if (arg3 == 51)
674
    {
675
        instance_create(arg0, arg1, obj_hammer_bounce_controller);
676
    }
677
    else if (arg3 == 52)
678
    {
679
        instance_create(arg0, arg1, obj_gerson_shell_kick_controller);
680
    }
681
    else if (arg3 == 53)
682
    {
683
        instance_create(arg0, arg1, obj_gerson_box_rumble_controller);
684
    }
685
    else if (arg3 == 54)
686
    {
687
        with (obj_sound_of_justice_enemy)
688
            redflashcon = 1;
689
    }
690
    else if (arg3 == 55)
691
    {
692
        with (obj_spearblocker)
693
            vanish = 1;
694
        with (obj_spearshot)
695
            instance_destroy();
696
        
scr_heartcolor
scr_heartcolor

function
scr_heartcolor(arg0)
{ __heartcolor = arg0; if (__heartcolor == "red" || __heartcolor == 0) { with (obj_heart) { color = 0; sprite_index = spr_dodgeheart; } } if (__heartcolor == "yellow" || __heartcolor == 1) { with (obj_heart) { color = 1; sprite_index = spr_yellowheart; } obj_grazebox.sprite_index = spr_grazeappear_yellow; } }
("red");
697
    }
698
    else
699
    {
700
        _inst = instance_create(-9999, -9999, obj_spearshot);
701
        _inst.special = arg3;
702
        _inst.direction = arg0;
703
        _inst.fakespeed = arg1;
704
        _inst.len = arg1 * arg2;
705
        _inst.image_angle = _inst.direction;
706
        if (i_ex(obj_sound_of_justice_enemy) && obj_sound_of_justice_enemy.susiedown == false)
707
        {
708
            if (arg0 == 0)
709
                snd_play(snd_statue_left);
710
            if (arg0 == 270)
711
                snd_play(snd_statue_up);
712
            if (arg0 == 180)
713
                snd_play(snd_statue_right);
714
            if (arg0 == 90)
715
                snd_play(snd_statue_down);
716
            if (argument_count == 5 && argument4 > 0)
717
            {
718
                inst = instance_create(x, y, obj_gerson_gradient_telegraph);
719
                inst.image_alpha = argument4;
720
                if (arg0 == 0)
721
                    inst.side = "left";
722
                if (arg0 == 90)
723
                    inst.side = "down";
724
                if (arg0 == 180)
725
                    inst.side = "right";
726
                if (arg0 == 270)
727
                    inst.side = "up";
728
            }
729
        }
730
        if (argument_count == 5 && !i_ex(obj_sound_of_justice_enemy))
731
            _inst.swingaround = argument4;
732
        if (arg3 > 20)
733
        {
734
            _inst.image_angle = arg3;
735
            if (_inst.image_angle == 360)
736
                _inst.image_angle = 0;
737
        }
738
    }
739
}