Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_sneo_bulletcontroller_Step_0

(view raw script w/o annotations or w/e)
1
if (global.mercymod[obj_spamton_neo_enemy.myself] > 99 && global.turntimer > 1)
2
    global.turntimer = 1;
3
if (init == 0)
4
{
5
    sameattack = scr_monsterattacknamecount
scr_monsterattacknamecount

function scr_monsterattacknamecount(arg0) { __sameattack = 0; for (_sameattacki = 0; _sameattacki < 3; _sameattacki++) { if (global.monsterattackname[_sameattacki] == arg0 && global.monster[_sameattacki] == 1) __sameattack++; } return __sameattack; }
(global.monsterattackname[creator]);
6
    if (sameattack > 1)
7
    {
8
        if (creator == 2)
9
            sameattacker = sameattack - 1;
10
        else if (creator == 1)
11
            sameattacker = (sameattack == 3) ? creator : (global.monsterattackname[0] == global.monsterattackname[1]);
12
    }
13
    if (instance_exists(obj_growtangle))
14
    {
15
        miny = obj_growtangle.y - (obj_growtangle.sprite_height / 2);
16
        maxy = obj_growtangle.y + (obj_growtangle.sprite_height / 2);
17
        minx = obj_growtangle.x - (obj_growtangle.sprite_width / 2);
18
        maxx = obj_growtangle.x + (obj_growtangle.sprite_width / 2);
19
    }
20
    init = 1;
21
}
22
btimer += 1;
23
if (type == 0)
24
{
25
    if (init == 1)
26
    {
27
        btimer = 0;
28
        instance_create(0, 0, obj_sneo_guymaker);
29
        init = 2;
30
        global.turntimer = 240;
31
        if (difficulty == 2)
32
            global.turntimer = 360;
33
        if (difficulty == 3)
34
            global.turntimer = 300;
35
    }
36
    else if (difficulty == 2)
37
    {
38
        if (btimer == 40 || btimer == 150 || btimer == 260)
39
        {
40
            sneoarm_x = sneo.x + sneo.partxoff[1];
41
            sneoarm_y = sneo.y + sneo.partyoff[1];
42
            armangle = -68 - random(32);
43
            side = armangle;
44
            d = instance_create(sneoarm_x + lengthdir_x(60, armangle - 90), sneoarm_y + lengthdir_y(60, armangle - 90), obj_sneo_biglaser);
45
            d.direction = armangle - 90;
46
            d.image_angle = armangle - 90;
47
            d.depth += 1;
48
            d.damage = damage * 2;
49
            d.target = target;
50
            sneo.aimmode = 1;
51
            sneo.armaim = armangle;
52
            sneo.partmode = 3;
53
        }
54
        else if (btimer == 90 || btimer == 200 || btimer == 310)
55
        {
56
            with (obj_sneo_biglaser)
57
            {
58
                firecon = 1;
59
                active = 1;
60
                image_blend = c_white;
61
            }
62
            sneo.partmode = 12;
63
        }
64
        else if ((btimer >= 90 && btimer < 120) || (btimer >= 200 && btimer < 230) || (btimer >= 310 && btimer < 340))
65
        {
66
            var otherside = (side == -110) ? -85 : -90;
67
            obj_sneo_biglaser.x = sneoarm_x + lengthdir_x(60, armangle - 90);
68
            obj_sneo_biglaser.y = sneoarm_y + lengthdir_y(60, armangle - 90);
69
            obj_sneo_biglaser.direction = armangle - 90;
70
            obj_sneo_biglaser.image_angle = armangle - 90;
71
            sneo.armaim = armangle;
72
        }
73
        else if (btimer == 130 || btimer == 240 || btimer == 350)
74
        {
75
            obj_sneo_biglaser.firecon = 2;
76
            sneo.partmode = 4;
77
        }
78
    }
79
    else if (difficulty == 3)
80
    {
81
        if (btimer == 1)
82
            sneo.partmode = 36;
83
    }
84
}
85
if (type == 1)
86
{
87
    atimer++;
88
    if (atimer == 1)
89
        btimer = 0;
90
    if (atimer == 6)
91
    {
92
        bul = instance_create(obj_spamton_neo_enemy.x + 4, obj_spamton_neo_enemy.y + 60, obj_pipis_egg_bullet);
93
        bul.type = 2;
94
        bul.drawlabel = 1;
95
        bul.depth = obj_spamton_neo_enemy.depth;
96
        bul.gravity = 0.2 + (random(10) / 100);
97
        bul.vspeed = 0;
98
        bul.hspeed = -1.55;
99
        bul.target = target;
100
        bul.damage = damage;
101
    }
102
    if (atimer < 20)
103
    {
104
        obj_spamton_neo_enemy.x += 10;
105
        sneo.vinex = scr_ease_in
scr_ease_in

function scr_ease_in(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_in_bounce(arg0, 0, 1, 1); case -2: return ease_in_elastic(arg0, 0, 1, 1); case -1: var _s = 1.70158; return arg0 * arg0 * (((_s + 1) * arg0) - _s); case 0: return arg0; case 1: return -cos(arg0 * 1.5707963267948966) + 1; case 6: return power(2, 10 * (arg0 - 1)); case 7: return -(sqrt(1 - sqr(arg0)) - 1); default: return power(arg0, arg1); } }
(min(10, atimer) / 10, 5) * 300;
106
        sneo.x = sneo.xstart + (scr_ease_in
scr_ease_in

function scr_ease_in(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_in_bounce(arg0, 0, 1, 1); case -2: return ease_in_elastic(arg0, 0, 1, 1); case -1: var _s = 1.70158; return arg0 * arg0 * (((_s + 1) * arg0) - _s); case 0: return arg0; case 1: return -cos(arg0 * 1.5707963267948966) + 1; case 6: return power(2, 10 * (arg0 - 1)); case 7: return -(sqrt(1 - sqr(arg0)) - 1); default: return power(arg0, arg1); } }
(atimer / 20, 2) * 300);
107
    }
108
    if (atimer == 20 && init == 1)
109
    {
110
        sneo.x = sneo.xstart + 300;
111
        sneo.vinex *= -1;
112
        pipis = instance_create(x, y, obj_pipis_controller);
113
        pipis.damage = damage;
114
        pipis.target = target;
115
        init = 2;
116
    }
117
    if (global.turntimer < 21 && global.turntimer > 1)
118
    {
119
        obj_spamton_neo_enemy.partmode = 1;
120
        with (obj_sneo_phonecall)
121
            fadealpha = 0;
122
        obj_spamton_neo_enemy.x -= 10;
123
        var _slidetimer = global.turntimer - 1;
124
        sneo.vinex = scr_ease_out
scr_ease_out

function scr_ease_out(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_out_bounce(arg0, 0, 1, 1); case -2: return ease_out_elastic(arg0, 0, 1, 1); case -1: return ease_out_back(arg0, 0, 1, 1); case 0: return arg0; case 1: return sin(arg0 * 1.5707963267948966); case 2: return -arg0 * (arg0 - 2); case 6: return -power(2, -10 * arg0) + 1; case 7: arg0--; return sqrt(1 - (arg0 * arg0)); default: arg0--; if (arg1 == 4) { return -1 * (power(arg0, arg1) - 1); break; } return power(arg0, arg1) + 1; } }
(min(10, _slidetimer) / 10, 5) * 50;
125
        sneo.x = sneo.xstart + (scr_ease_out
scr_ease_out

function scr_ease_out(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_out_bounce(arg0, 0, 1, 1); case -2: return ease_out_elastic(arg0, 0, 1, 1); case -1: return ease_out_back(arg0, 0, 1, 1); case 0: return arg0; case 1: return sin(arg0 * 1.5707963267948966); case 2: return -arg0 * (arg0 - 2); case 6: return -power(2, -10 * arg0) + 1; case 7: arg0--; return sqrt(1 - (arg0 * arg0)); default: arg0--; if (arg1 == 4) { return -1 * (power(arg0, arg1) - 1); break; } return power(arg0, arg1) + 1; } }
(_slidetimer / 20, 4) * 200);
126
        sneo.y = lerp(sneo.y, sneo.___myremembery, _slidetimer / 20);
127
    }
128
    if (global.turntimer == 1)
129
        obj_spamton_neo_enemy.x = obj_spamton_neo_enemy.xstart;
130
}
131
if (type == 1.5)
132
{
133
    hearttargettimer--;
134
    if (init == 1)
135
    {
136
        with (obj_spamton_neo_enemy)
137
            partmode = 34;
138
        init = 2;
139
        btimer = 100;
140
    }
141
    if (btimer == 110)
142
    {
143
        with (obj_spamton_neo_enemy)
144
        {
145
            heart_release_con++;
146
            if (heart_release_con == 1)
147
                makeheart = 1;
148
        }
149
    }
150
}
151
if (type == 2)
152
{
153
    if (difficulty == 0)
154
    {
155
        obj_spamton_neo_enemy.newcrushermovement = 0;
156
        if (btimer >= 30)
157
        {
158
            if (init == 1)
159
            {
160
                side = (irandom(1) * 2) - 1;
161
                init = 2;
162
            }
163
            btimer = 0;
164
            xx = obj_growtangle.x + 200;
165
            if (side == 1)
166
                yy = obj_growtangle.y + 15 + (irandom(45) * 1);
167
            else
168
                yy = (obj_growtangle.y - 15) + (irandom(45) * -1);
169
            bm = instance_create(xx, yy, obj_sneo_crusher);
170
            difficulty = 1;
171
            if (made > 1)
172
            {
173
                var nextobj;
174
                if (difficulty == 0)
175
                    nextobj = 0;
176
                else if (lastType == 1)
177
                    nextobj = choose(0, 0, 2);
178
                else
179
                    nextobj = choose(0, 0, 1, 2);
180
                lastType = nextobj;
181
                bm.crushedObj = nextobj;
182
                if (nextobj == 1)
183
                    btimer = -35;
184
            }
185
            difficulty = 0;
186
            bm.destroyable = 1;
187
            bm.damage = damage;
188
            bm.target = target;
189
            side = (irandom(1) * 2) - 1;
190
            made++;
191
        }
192
    }
193
    if (difficulty == 1)
194
    {
195
        obj_spamton_neo_enemy.newcrushermovement = 0;
196
        if (btimer == 100)
197
        {
198
            xx = obj_growtangle.x + 190;
199
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
200
            bm = instance_create(xx, yy, obj_sneo_crusher);
201
            bm.destroyable = 1;
202
            bm.damage = damage;
203
            bm.target = target;
204
            bm.difficulty = 2;
205
            bm.siner = 0;
206
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
207
        }
208
        if (btimer == 110)
209
        {
210
            xx = obj_growtangle.x + 205;
211
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
212
            bm = instance_create(xx, yy, obj_sneo_crusher);
213
            bm.destroyable = 1;
214
            bm.damage = damage;
215
            bm.target = target;
216
            bm.difficulty = 2;
217
            bm.siner = 20;
218
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
219
        }
220
        if (btimer == 120)
221
        {
222
            xx = obj_growtangle.x + 220;
223
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
224
            bm = instance_create(xx, yy, obj_sneo_crusher);
225
            bm.destroyable = 1;
226
            bm.damage = damage;
227
            bm.target = target;
228
            bm.difficulty = 2;
229
            bm.siner = 10;
230
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
231
        }
232
        if (btimer == 170)
233
        {
234
            xx = obj_growtangle.x + 140;
235
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
236
            bm = instance_create(xx, yy, obj_sneo_crusher);
237
            bm.destroyable = 1;
238
            bm.damage = damage;
239
            bm.target = target;
240
            bm.difficulty = 2;
241
            bm.siner = 0;
242
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
243
        }
244
        if (btimer == 180)
245
        {
246
            xx = obj_growtangle.x + 155;
247
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
248
            bm = instance_create(xx, yy, obj_sneo_crusher);
249
            bm.destroyable = 1;
250
            bm.damage = damage;
251
            bm.target = target;
252
            bm.difficulty = 2;
253
            bm.siner = 20;
254
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
255
        }
256
        if (btimer == 190)
257
        {
258
            xx = obj_growtangle.x + 170;
259
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
260
            bm = instance_create(xx, yy, obj_sneo_crusher);
261
            bm.destroyable = 1;
262
            bm.damage = damage;
263
            bm.target = target;
264
            bm.difficulty = 2;
265
            bm.siner = 10;
266
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
267
        }
268
        if (btimer > 190 && !instance_exists(obj_sneo_crusher) && global.turntimer > 2)
269
            global.turntimer = 2;
270
    }
271
    if (difficulty == 2)
272
    {
273
        if (btimer >= 30)
274
        {
275
            if (init == 1)
276
            {
277
                side = (irandom(1) * 2) - 1;
278
                init = 2;
279
            }
280
            btimer = 0;
281
            xx = obj_growtangle.x + 200;
282
            if (side == 1)
283
                yy = obj_growtangle.y + 15 + (irandom(45) * 1);
284
            else
285
                yy = (obj_growtangle.y - 15) + (irandom(45) * -1);
286
            bm = instance_create(xx, yy, obj_sneo_crusher);
287
            bm.destroyable = 1;
288
            bm.damage = damage;
289
            bm.target = target;
290
            bm.difficulty = 3;
291
            side = (irandom(1) * 2) - 1;
292
        }
293
    }
294
    if (difficulty == 3)
295
    {
296
        obj_spamton_neo_enemy.newcrushermovement = 1;
297
        atimer++;
298
        var threshold = 10 + (instance_number(obj_sneo_crusher) * 15);
299
        if (atimer >= threshold)
300
        {
301
            xx = obj_growtangle.x + obj_spamton_neo_enemy.crusher_x_origin;
302
            yy = (obj_growtangle.y - 50) + irandom(100);
303
            bm = instance_create(xx, yy, obj_sneo_crusher);
304
            bm.destroyable = 1;
305
            bm.damage = damage;
306
            bm.target = target;
307
            bm.difficulty = 4;
308
            bm.hp = 3;
309
            atimer = 0;
310
        }
311
    }
312
    if (difficulty == 4)
313
    {
314
        obj_spamton_neo_enemy.newcrushermovement = 0;
315
        if (btimer == 100)
316
        {
317
            xx = obj_growtangle.x + 190;
318
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
319
            bm = instance_create(xx, yy, obj_sneo_crusher);
320
            bm.destroyable = 1;
321
            bm.damage = damage;
322
            bm.target = target;
323
            bm.difficulty = 5;
324
            bm.siner = 0;
325
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
326
        }
327
        if (btimer == 110)
328
        {
329
            xx = obj_growtangle.x + 205;
330
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
331
            bm = instance_create(xx, yy, obj_sneo_crusher);
332
            bm.destroyable = 1;
333
            bm.damage = damage;
334
            bm.target = target;
335
            bm.difficulty = 5;
336
            bm.siner = 20;
337
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
338
            leeway = instance_create(xx, yy, obj_crusher_leeway);
339
            leeway.parent = bm;
340
        }
341
        if (btimer == 120)
342
        {
343
            xx = obj_growtangle.x + 220;
344
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
345
            bm = instance_create(xx, yy, obj_sneo_crusher);
346
            bm.destroyable = 1;
347
            bm.damage = damage;
348
            bm.target = target;
349
            bm.difficulty = 5;
350
            bm.siner = 10;
351
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
352
            leeway = instance_create(xx, yy, obj_crusher_leeway);
353
            leeway.parent = bm;
354
        }
355
        if (btimer == 170)
356
        {
357
            xx = obj_growtangle.x + 140;
358
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
359
            bm = instance_create(xx, yy, obj_sneo_crusher);
360
            bm.destroyable = 1;
361
            bm.damage = damage;
362
            bm.target = target;
363
            bm.difficulty = 5;
364
            bm.siner = 0;
365
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
366
        }
367
        if (btimer == 180)
368
        {
369
            xx = obj_growtangle.x + 155;
370
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
371
            bm = instance_create(xx, yy, obj_sneo_crusher);
372
            bm.destroyable = 1;
373
            bm.damage = damage;
374
            bm.target = target;
375
            bm.difficulty = 5;
376
            bm.siner = 20;
377
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
378
            leeway = instance_create(xx, yy, obj_crusher_leeway);
379
            leeway.parent = bm;
380
        }
381
        if (btimer == 190)
382
        {
383
            xx = obj_growtangle.x + 170;
384
            yy = obj_growtangle.y + 15 + (irandom(45) * 1);
385
            bm = instance_create(xx, yy, obj_sneo_crusher);
386
            bm.destroyable = 1;
387
            bm.damage = damage;
388
            bm.target = target;
389
            bm.difficulty = 5;
390
            bm.siner = 10;
391
            bm.y = obj_growtangle.y + (sin(bm.siner / 6) * 50);
392
            leeway = instance_create(xx, yy, obj_crusher_leeway);
393
            leeway.parent = bm;
394
        }
395
        if (btimer > 190 && !instance_exists(obj_sneo_crusher) && global.turntimer > 2)
396
            global.turntimer = 2;
397
    }
398
    if (difficulty == 5)
399
    {
400
        obj_spamton_neo_enemy.newcrushermovement = 0;
401
        if (btimer == 100)
402
        {
403
            xx = obj_growtangle.x + 190;
404
            yy = obj_growtangle.y - 50;
405
            bm = instance_create(xx, yy, obj_sneo_crusher);
406
            bm.destroyable = 1;
407
            bm.damage = damage;
408
            bm.target = target;
409
            bm.difficulty = 6;
410
        }
411
        if (btimer == 110)
412
        {
413
            xx = obj_growtangle.x + 190;
414
            yy = obj_growtangle.y + 50;
415
            bm = instance_create(xx, yy, obj_sneo_crusher);
416
            bm.destroyable = 1;
417
            bm.damage = damage;
418
            bm.target = target;
419
            bm.difficulty = 6;
420
        }
421
        if (btimer == 120)
422
        {
423
            xx = obj_growtangle.x + 190;
424
            yy = obj_growtangle.y;
425
            bm = instance_create(xx, yy, obj_sneo_crusher);
426
            bm.destroyable = 1;
427
            bm.damage = damage;
428
            bm.target = target;
429
            bm.difficulty = 6;
430
        }
431
        if (!instance_exists(obj_sneo_crusher) && global.turntimer > 2)
432
            global.turntimer = 2;
433
    }
434
    if (difficulty == 6)
435
    {
436
        obj_spamton_neo_enemy.newcrushermovement = 1;
437
        atimer++;
438
        if (btimer == 99)
439
            atimer = 0;
440
        if (btimer >= 100)
441
        {
442
            xx = obj_growtangle.x + obj_spamton_neo_enemy.crusher_x_origin;
443
            yy = (obj_growtangle.y - 50) + irandom(100);
444
            bm = instance_create(xx, yy, obj_sneo_crusher);
445
            bm.destroyable = 1;
446
            bm.damage = damage;
447
            bm.target = target;
448
            bm.difficulty = 4;
449
            bm.hp = 3;
450
            btimer = 70;
451
            atimer -= 0;
452
        }
453
        if (atimer >= 20)
454
        {
455
            xx = obj_growtangle.x + obj_spamton_neo_enemy.crusher_x_origin;
456
            yy = obj_growtangle.y - 50;
457
            rand = -17 + irandom(34);
458
            bm = instance_create(xx, (yy + 29 + rand) - 256, obj_sneo_crusher_nohead);
459
            bm.image_yscale = bm.image_yscale * -1;
460
            bm = instance_create(xx, yy + 76 + rand + 256, obj_sneo_crusher_nohead);
461
            bm.amplitude = -8;
462
            btimer -= 5;
463
            atimer = 0;
464
        }
465
    }
466
}
467
if (type == 3)
468
{
469
    if (!instance_exists(obj_sneo_pendulum_controller))
470
    {
471
        pendulum = instance_create(x, y, obj_sneo_pendulum_controller);
472
        init = 1;
473
    }
474
}
475
if (type == 4)
476
{
477
    if (btimer >= 40)
478
    {
479
        btimer = 0;
480
        xx = maxx + 180;
481
        yy = obj_growtangle.y + random_range(-40, 40);
482
        bm = instance_create(xx, yy, obj_sneo_cshot);
483
        if (made >= 2)
484
            bm.difficulty = (made >= 4) ? 2 : 1;
485
        bm.damage = damage;
486
        bm.target = target;
487
        made++;
488
    }
489
}
490
if (type == 5)
491
{
492
    if (init == 1)
493
    {
494
        d = instance_create(x, y, obj_sneo_bulletcontroller_somn);
495
        d.damage = damage;
496
        d.creator = creator;
497
        d.target = target;
498
        d.difficulty = difficulty;
499
        d.element = element;
500
        init = 2;
501
        instance_destroy();
502
    }
503
    if (!instance_exists(obj_sneo_heartattack) && global.turntimer > 2)
504
        global.turntimer = 2;
505
}
506
if (type == 6)
507
{
508
    if (init == 1)
509
    {
510
        if (difficulty == 9)
511
            instance_create(0, 0, obj_sneo_wall_controller);
512
        else
513
            instance_create(0, 0, obj_sneo_wall_controller_new);
514
        init = 2;
515
    }
516
    if (global.turntimer <= 10 && global.turntimer > 9)
517
    {
518
        with (obj_spamton_neo_enemy)
519
            scr_move_to_rememberxy
scr_move_to_rememberxy

function scr_move_to_rememberxy(arg0) { scr_move_to_point_over_time(___myrememberx, ___myremembery, arg0); }
(8);
520
        global.turntime = 9;
521
    }
522
}
523
if (type == 7)
524
{
525
    if (global.turntimer >= 60)
526
    {
527
        atimer++;
528
        if (atimer == 1)
529
            btimer = 0;
530
        if (atimer < 20)
531
        {
532
            obj_spamton_neo_enemy.x += 10;
533
            sneo.vinex = scr_ease_in
scr_ease_in

function scr_ease_in(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_in_bounce(arg0, 0, 1, 1); case -2: return ease_in_elastic(arg0, 0, 1, 1); case -1: var _s = 1.70158; return arg0 * arg0 * (((_s + 1) * arg0) - _s); case 0: return arg0; case 1: return -cos(arg0 * 1.5707963267948966) + 1; case 6: return power(2, 10 * (arg0 - 1)); case 7: return -(sqrt(1 - sqr(arg0)) - 1); default: return power(arg0, arg1); } }
(min(10, atimer) / 10, 5) * 200;
534
            sneo.x = sneo.xstart + (scr_ease_in
scr_ease_in

function scr_ease_in(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_in_bounce(arg0, 0, 1, 1); case -2: return ease_in_elastic(arg0, 0, 1, 1); case -1: var _s = 1.70158; return arg0 * arg0 * (((_s + 1) * arg0) - _s); case 0: return arg0; case 1: return -cos(arg0 * 1.5707963267948966) + 1; case 6: return power(2, 10 * (arg0 - 1)); case 7: return -(sqrt(1 - sqr(arg0)) - 1); default: return power(arg0, arg1); } }
(atimer / 20, 2) * 200);
535
        }
536
        if (atimer == 20 && init == 1)
537
        {
538
            sneo.x = sneo.xstart + 200;
539
            sneo.vinex *= -1;
540
            instance_create(obj_growtangle.x, obj_growtangle.y, obj_sneo_elevator_test);
541
            init = 2;
542
            lastType = choose(-1, 0, 1);
543
        }
544
        if (btimer == 28)
545
            btimer = 60;
546
        if (difficulty == 1)
547
        {
548
        }
549
        if (difficulty == 2)
550
        {
551
            if (btimer == 25)
552
            {
553
                orb = instance_create(240, cameray() + 110, obj_sneo_elevator_electric_ball_appear);
554
                orb.type = 1;
555
            }
556
            if (btimer == 30)
557
            {
558
                orb = instance_create(240, cameray() + 235, obj_sneo_elevator_electric_ball_appear);
559
                orb.type = 1;
560
            }
561
        }
562
        if (btimer >= 60 && global.turntimer > 54)
563
        {
564
            btimer = 40;
565
            if (difficulty == 1)
566
                btimer = 44;
567
            var a = 0;
568
            if (lastType == -1 && arm1 == -1)
569
            {
570
                arm = instance_create(camerax() + 700, obj_growtangle.y + -104, obj_sneo_elevator_arm);
571
                arm.lastType = lastType;
572
                arm1 = 1;
573
            }
574
            else if (lastType == -1 && arm1 == 1)
575
            {
576
                a = 1;
577
            }
578
            if (lastType == 0 && arm2 == -1)
579
            {
580
                arm = instance_create(camerax() + 700, obj_growtangle.y + 0, obj_sneo_elevator_arm);
581
                arm.lastType = lastType;
582
                arm2 = 1;
583
            }
584
            else if (lastType == 0 && arm2 == 1)
585
            {
586
                a = 1;
587
            }
588
            if (lastType == 1 && arm3 == -1)
589
            {
590
                arm = instance_create(camerax() + 700, obj_growtangle.y + 104, obj_sneo_elevator_arm);
591
                arm.lastType = lastType;
592
                arm3 = 1;
593
            }
594
            else if (lastType == 1 && arm3 == 1)
595
            {
596
                a = 1;
597
            }
598
            doubleelevatorattack++;
599
            if (doubleelevatorattack == 4)
600
                a += 1;
601
            repeat (a)
602
            {
603
                doubleelevatorattack = 0;
604
                if (irandom(100) < 50)
605
                {
606
                    if (arm1 == -1)
607
                    {
608
                        arm = instance_create(camerax() + 700, obj_growtangle.y + -104, obj_sneo_elevator_arm);
609
                        arm.lastType = -1;
610
                        arm1 = 1;
611
                    }
612
                    else if (arm2 == -1)
613
                    {
614
                        arm = instance_create(camerax() + 700, obj_growtangle.y + 0, obj_sneo_elevator_arm);
615
                        arm.lastType = 0;
616
                        arm2 = 1;
617
                    }
618
                    else if (arm3 == -1)
619
                    {
620
                        arm = instance_create(camerax() + 700, obj_growtangle.y + 104, obj_sneo_elevator_arm);
621
                        arm.lastType = 1;
622
                        arm3 = 1;
623
                    }
624
                }
625
                else if (arm3 == -1)
626
                {
627
                    arm = instance_create(camerax() + 700, obj_growtangle.y + 104, obj_sneo_elevator_arm);
628
                    arm.lastType = 1;
629
                    arm3 = 1;
630
                }
631
                else if (arm2 == -1)
632
                {
633
                    arm = instance_create(camerax() + 700, obj_growtangle.y + 0, obj_sneo_elevator_arm);
634
                    arm.lastType = 0;
635
                    arm2 = 1;
636
                }
637
                else if (arm1 == -1)
638
                {
639
                    arm = instance_create(camerax() + 700, obj_growtangle.y + -104, obj_sneo_elevator_arm);
640
                    arm.lastType = -1;
641
                    arm1 = 1;
642
                }
643
            }
644
            lastType = choose(-1, 0, 1);
645
            elevatororb++;
646
            if (difficulty == 3 && elevatororb == 3)
647
            {
648
                elevatororb = 0;
649
                orb = instance_create(camerax() + 205 + random(70), cameray() + 20, obj_sneo_elevator_electric_ball_appear);
650
                orb.type = 2;
651
                orb = instance_create(camerax() + 205 + random(70), cameray() + 307, obj_sneo_elevator_electric_ball_appear);
652
                orb.type = 2;
653
            }
654
        }
655
    }
656
    if (global.turntimer < 21 && global.turntimer > 1)
657
    {
658
        with (obj_sneo_elevator_arm)
659
            instance_destroy();
660
        obj_spamton_neo_enemy.x -= 10;
661
        var _slidetimer = global.turntimer - 1;
662
        sneo.vinex = scr_ease_out
scr_ease_out

function scr_ease_out(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_out_bounce(arg0, 0, 1, 1); case -2: return ease_out_elastic(arg0, 0, 1, 1); case -1: return ease_out_back(arg0, 0, 1, 1); case 0: return arg0; case 1: return sin(arg0 * 1.5707963267948966); case 2: return -arg0 * (arg0 - 2); case 6: return -power(2, -10 * arg0) + 1; case 7: arg0--; return sqrt(1 - (arg0 * arg0)); default: arg0--; if (arg1 == 4) { return -1 * (power(arg0, arg1) - 1); break; } return power(arg0, arg1) + 1; } }
(min(10, _slidetimer) / 10, 5) * 50;
663
        sneo.x = sneo.xstart + (scr_ease_out
scr_ease_out

function scr_ease_out(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_out_bounce(arg0, 0, 1, 1); case -2: return ease_out_elastic(arg0, 0, 1, 1); case -1: return ease_out_back(arg0, 0, 1, 1); case 0: return arg0; case 1: return sin(arg0 * 1.5707963267948966); case 2: return -arg0 * (arg0 - 2); case 6: return -power(2, -10 * arg0) + 1; case 7: arg0--; return sqrt(1 - (arg0 * arg0)); default: arg0--; if (arg1 == 4) { return -1 * (power(arg0, arg1) - 1); break; } return power(arg0, arg1) + 1; } }
(_slidetimer / 20, 4) * 200);
664
        with (obj_sneo_elevator_electric_ball)
665
        {
666
            if (alarm[0] > 0 && sprite_index != spr_sneo_electric_orb_destroy)
667
            {
668
                sprite_index = spr_sneo_electric_orb_destroy;
669
                image_index = 0;
670
alarm[0]
671
            }
672
        }
673
    }
674
    if (global.turntimer == 1)
675
        obj_spamton_neo_enemy.x = obj_spamton_neo_enemy.xstart;
676
}
677
if (type == 8)
678
{
679
    if (init == 1)
680
    {
681
        obj_spamton_neo_enemy.partmode = special ? 11 : 10;
682
        init = 2;
683
        made = 60;
684
    }
685
}
686
if (type == 8.5)
687
{
688
    if (init == 1)
689
    {
690
        init = 2;
691
        made = 60;
692
    }
693
    if (btimer >= 1)
694
    {
695
        if (global.turntimer > 11 && obj_spamton_neo_enemy.image_alpha > -0.2)
696
            obj_spamton_neo_enemy.image_alpha -= 0.2;
697
        if (btimer == 115)
698
        {
699
            d = instance_create(obj_growtangle.x + 40 + (obj_growtangle.sprite_width / 2), obj_growtangle.y, obj_sneo_phonehand_master);
700
            d.target = target;
701
        }
702
    }
703
}
704
if (type == 9)
705
{
706
    if (init == 1)
707
    {
708
        global.turntimer = 1200;
709
        instance_create(obj_growtangle.x, obj_growtangle.y, obj_finale_growtangle);
710
        init = 2;
711
        special = 1;
712
        btimer = 0;
713
        obj_sneo_hitdetector.active = false;
714
    }
715
    if (special == 1 && btimer == 45)
716
    {
717
        special = 2;
718
        d = instance_create(obj_growtangle.x, obj_growtangle.y, obj_sneo_warped_box);
719
        d = instance_create(camerax() + 680, sneo.y, obj_sneo_final_forme);
720
        d.intro = -1;
721
        d.damage = damage;
722
        d.target = target;
723
        d.speed = 16.75;
724
        d.direction = 180;
725
        d.friction = 0.5;
726
        btimer = 0;
727
    }
728
    if (special == 2 && btimer == 70)
729
    {
730
        obj_sneo_warped_box.state = 1;
731
        obj_sneo_final_forme_hitbox.destroyable = 1;
732
        obj_sneo_final_forme.destroyable = 1;
733
        obj_sneo_final_forme.image_index++;
734
        special = 3;
735
    }
736
    if (special == 3 && btimer >= 10)
737
    {
738
        if (sneodollarcount == 0)
739
        {
740
            xx = minx - random(30) - 40;
741
            yy = (obj_growtangle.y - random(100)) + 100;
742
            d = instance_create(xx, yy, obj_sneo_dollar);
743
            d.startscale = 1;
744
            sneodollarcount = 1;
745
        }
746
        else if (sneodollarcount == 1)
747
        {
748
            xx = minx - random(30) - 40;
749
            yy = (obj_growtangle.y - random(100)) + 200;
750
            d = instance_create(xx, yy, obj_sneo_dollar);
751
            d.startscale = 1;
752
            sneodollarcount = 2;
753
        }
754
        else if (sneodollarcount == 2)
755
        {
756
            xx = minx - random(30) - 40;
757
            yy = (obj_growtangle.y - random(200)) + 100;
758
            d = instance_create(xx, yy, obj_sneo_dollar);
759
            d.startscale = 1.5;
760
            sneodollarcount = 3;
761
        }
762
        else if (sneodollarcount == 3)
763
        {
764
            xx = minx - random(30) - 40;
765
            yy = (obj_growtangle.y - random(100)) + 100;
766
            d = instance_create(xx, yy, obj_sneo_dollar);
767
            d.startscale = 1;
768
            sneodollarcount = 4;
769
        }
770
        else if (sneodollarcount == 4)
771
        {
772
            xx = minx - random(30) - 40;
773
            yy = (obj_growtangle.y - random(100)) + 200;
774
            d = instance_create(xx, yy, obj_sneo_dollar);
775
            d.startscale = 1;
776
            sneodollarcount = 5;
777
        }
778
        else if (sneodollarcount == 5)
779
        {
780
            xx = minx - random(30) - 40;
781
            yy = (obj_growtangle.y - random(200)) + 100;
782
            d = instance_create(xx, yy, obj_sneo_dollar);
783
            d.startscale = 1.5;
784
            sneodollarcount = 6;
785
        }
786
        else if (sneodollarcount == 6)
787
        {
788
            xx = minx - random(30) - 40;
789
            yy = (obj_growtangle.y - random(200)) + 100;
790
            d = instance_create(xx, yy, obj_sneo_dollar);
791
            d.startscale = 2;
792
            sneodollarcount = 0;
793
        }
794
        btimer = 3;
795
        d.speed = 0.1;
796
    }
797
}
798
if (type == 10)
799
{
800
    if (btimer > 50)
801
    {
802
        if (made == 0)
803
        {
804
            pattern = irandom(1);
805
            xx = maxx + 90;
806
            yy = 0;
807
            yshift = (obj_growtangle.sprite_height / 3) - 14;
808
            if (irandom(1) == 0)
809
            {
810
                yy = miny + 22;
811
            }
812
            else
813
            {
814
                yy = maxy - 22;
815
                yshift = -yshift;
816
            }
817
        }
818
        d = instance_create(xx, yy, obj_sneo_headwave);
819
        yy += yshift;
820
        d.image_alpha = 0;
821
        d.speed = 8;
822
        made++;
823
        if (made == 4)
824
        {
825
            made = 0;
826
            btimer = 0;
827
        }
828
        else
829
        {
830
            btimer = 45;
831
        }
832
    }
833
}
834
if (type == 11)
835
{
836
    if (init == 1)
837
    {
838
        d = instance_create(obj_growtangle.x, obj_growtangle.y, obj_shrinktangle);
839
        d.target = target;
840
        d = instance_create(obj_growtangle.x, obj_growtangle.y - 150, obj_sneo_splitbouncer);
841
        d.damage = damage;
842
        d.target = target;
843
        instance_create(obj_growtangle.x, obj_growtangle.y + 150, obj_sneo_splitbouncer);
844
        d.damage = damage;
845
        d.target = target;
846
        init = 2;
847
    }
848
}
849
if (type == 12)
850
{
851
    atimer++;
852
    if (atimer == 1)
853
    {
854
        if (obj_spamton_neo_enemy.facebroken == 2)
855
        {
856
            global.turntimer = 170;
857
            obj_spamton_neo_enemy.facebroken = 1;
858
        }
859
    }
860
    if (atimer < 20)
861
    {
862
        obj_spamton_neo_enemy.x += 10;
863
        sneo.vinex = scr_ease_in
scr_ease_in

function scr_ease_in(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_in_bounce(arg0, 0, 1, 1); case -2: return ease_in_elastic(arg0, 0, 1, 1); case -1: var _s = 1.70158; return arg0 * arg0 * (((_s + 1) * arg0) - _s); case 0: return arg0; case 1: return -cos(arg0 * 1.5707963267948966) + 1; case 6: return power(2, 10 * (arg0 - 1)); case 7: return -(sqrt(1 - sqr(arg0)) - 1); default: return power(arg0, arg1); } }
(min(10, atimer) / 10, 5) * 300;
864
        sneo.x = sneo.xstart + (scr_ease_in
scr_ease_in

function scr_ease_in(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_in_bounce(arg0, 0, 1, 1); case -2: return ease_in_elastic(arg0, 0, 1, 1); case -1: var _s = 1.70158; return arg0 * arg0 * (((_s + 1) * arg0) - _s); case 0: return arg0; case 1: return -cos(arg0 * 1.5707963267948966) + 1; case 6: return power(2, 10 * (arg0 - 1)); case 7: return -(sqrt(1 - sqr(arg0)) - 1); default: return power(arg0, arg1); } }
(atimer / 20, 2) * 300);
865
    }
866
    if (atimer == 20)
867
    {
868
        face = instance_create(camerax() + 424, cameray() + 100, obj_sneo_faceattack);
869
        face.target = target;
870
        face.damage = damage;
871
        face.special = hellmode;
872
        if (obj_spamton_neo_enemy.faceattackcount == 1)
873
            face.first_time = true;
874
        with (face)
875
            event_user(0);
876
        obj_sneo_bulletcontroller.facetimeincrease = 0;
877
        if (obj_spamton_neo_enemy.eyeshp <= 0)
878
            obj_sneo_bulletcontroller.facetimeincrease++;
879
        if (obj_spamton_neo_enemy.nosehp <= 0)
880
            obj_sneo_bulletcontroller.facetimeincrease++;
881
        if (obj_spamton_neo_enemy.mouthhp <= 0)
882
            obj_sneo_bulletcontroller.facetimeincrease++;
883
        with (obj_sneo_faceattack)
884
        {
885
            if (type != 1)
886
            {
887
                if (obj_sneo_bulletcontroller.facetimeincrease == 1)
888
                    timer += 20;
889
                if (obj_sneo_bulletcontroller.facetimeincrease == 2 || obj_sneo_bulletcontroller.facetimeincrease == 3)
890
                    timer += 50;
891
            }
892
            if (type == 1)
893
            {
894
                if (obj_sneo_bulletcontroller.facetimeincrease == 1)
895
                    timer += 20;
896
                if (obj_sneo_bulletcontroller.facetimeincrease == 2 || obj_sneo_bulletcontroller.facetimeincrease == 3)
897
                    timer += 20;
898
            }
899
        }
900
    }
901
    if (global.turntimer > 80 && instance_exists(obj_sneo_faceattack) && obj_sneo_faceattack.init == 1 && obj_spamton_neo_enemy.facebroken == 0)
902
    {
903
        var a = 0;
904
        for (var i = 0; i < instance_number(obj_sneo_faceattack); i++)
905
        {
906
            enemy[i] = instance_find(obj_sneo_faceattack, i);
907
            if (enemy[i].type != 0 && enemy[i].broken == 0)
908
                a = 1;
909
        }
910
        if (a == 0)
911
            global.turntimer = 80;
912
    }
913
    if (global.turntimer < 21 && global.turntimer > 1)
914
    {
915
        with (obj_sneo_faceattack)
916
        {
917
            image_alpha -= 0.1;
918
            if (image_alpha < 0)
919
                instance_destroy();
920
        }
921
        obj_spamton_neo_enemy.x -= 10;
922
        var _slidetimer = global.turntimer - 1;
923
        sneo.vinex = scr_ease_out
scr_ease_out

function scr_ease_out(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_out_bounce(arg0, 0, 1, 1); case -2: return ease_out_elastic(arg0, 0, 1, 1); case -1: return ease_out_back(arg0, 0, 1, 1); case 0: return arg0; case 1: return sin(arg0 * 1.5707963267948966); case 2: return -arg0 * (arg0 - 2); case 6: return -power(2, -10 * arg0) + 1; case 7: arg0--; return sqrt(1 - (arg0 * arg0)); default: arg0--; if (arg1 == 4) { return -1 * (power(arg0, arg1) - 1); break; } return power(arg0, arg1) + 1; } }
(min(10, _slidetimer) / 10, 5) * 50;
924
        sneo.x = sneo.xstart + (scr_ease_out
scr_ease_out

function scr_ease_out(arg0, arg1) { if (arg1 < -3 || arg1 > 7) return arg0; switch (arg1) { case -3: return ease_out_bounce(arg0, 0, 1, 1); case -2: return ease_out_elastic(arg0, 0, 1, 1); case -1: return ease_out_back(arg0, 0, 1, 1); case 0: return arg0; case 1: return sin(arg0 * 1.5707963267948966); case 2: return -arg0 * (arg0 - 2); case 6: return -power(2, -10 * arg0) + 1; case 7: arg0--; return sqrt(1 - (arg0 * arg0)); default: arg0--; if (arg1 == 4) { return -1 * (power(arg0, arg1) - 1); break; } return power(arg0, arg1) + 1; } }
(_slidetimer / 20, 4) * 200);
925
        sneo.y = lerp(sneo.y, sneo.___myremembery, _slidetimer / 20);
926
    }
927
    if (global.turntimer == 1)
928
    {
929
        if (obj_spamton_neo_enemy.facebroken == 1)
930
            obj_spamton_neo_enemy.facebroken = 0;
931
        obj_spamton_neo_enemy.x = obj_spamton_neo_enemy.xstart;
932
    }
933
}