Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_o_boxingcontroller_Step_0

(view raw script w/o annotations or w/e)
1
with (obj_heroparent)
2
{
3
    x = -1000;
4
    visible = true;
5
}
6
if (instance_exists(obj_bq_baseball) && obj_bq_baseball.hit == 1 && obj_bq_baseball.hit_timer < 20)
7
{
8
    vspeed = 0;
9
    exit;
10
}
11
if (instance_exists(obj_bq_baseball_final) && obj_bq_baseball_final.hit == 1)
12
{
13
    vspeed = 0;
14
    exit;
15
}
16
if (instance_exists(o_boxingqueen) && o_boxingqueen.phase_transition > 0 && o_boxingqueen.phase_transition_timer < (110 / f))
17
{
18
    vspeed = 0;
19
    exit;
20
}
21
if (actpunchtimer > 0)
22
{
23
    actpunchtimer--;
24
    exit;
25
}
26
if (wireframe_boxing == 1 && global.boxingphase == 0)
27
{
28
    global.boxingphase++;
29
    if (global.boxingphase == 1)
30
        special_punch_turns -= 1;
31
}
32
if (global.boxingphase == 4)
33
    global.boxingphase = 0;
34
if (attackintrocon == 2)
35
{
36
    attackintrotimer++;
37
    if (attackintrotimer == 17)
38
    {
39
        attackintrocon = 0;
40
        attackintrotimer = 0;
41
    }
42
}
43
if (o_boxingqueen.health_count <= (o_boxingqueen.health_count_max * 0.2) && o_boxinghud.sub_healthbar_count == 0 && wireframe_boxing == 0)
44
{
45
    if (attackintrocon == 1)
46
        attackintrocon = 0;
47
}
48
if (wireframe_boxing == 1)
49
{
50
    if (o_boxingqueen.health_count < (o_boxingqueen.health_count_max * 0.75) && o_boxingqueen.pattern_phase == 0 && boxingtimer > 9)
51
    {
52
        o_boxingqueen.pattern_phase = 1;
53
        boxingtimer = 10;
54
        with (o_boxingqueen)
55
            
scr_qb_reset
scr_qb_reset

function
scr_qb_reset()
{ attackcount = 0; attackcountmax = 0; attackpattern = 0; for (i = 0; i < 20; i++) { list_attacktype[i] = 0; list_attackamount[i] = 0; list_attackvariant[i] = 0; list_attackwait[i] = 0; } }
();
56
    }
57
    if (o_boxingqueen.health_count < (o_boxingqueen.health_count_max * 0.5) && o_boxingqueen.pattern_phase == 1 && boxingtimer > 9)
58
    {
59
        o_boxingqueen.pattern_phase = 2;
60
        boxingtimer = 10;
61
        with (o_boxingqueen)
62
            
scr_qb_reset
scr_qb_reset

function
scr_qb_reset()
{ attackcount = 0; attackcountmax = 0; attackpattern = 0; for (i = 0; i < 20; i++) { list_attacktype[i] = 0; list_attackamount[i] = 0; list_attackvariant[i] = 0; list_attackwait[i] = 0; } }
();
63
    }
64
    if (o_boxingqueen.health_count < (o_boxingqueen.health_count_max * 0.25) && o_boxingqueen.pattern_phase == 2 && boxingtimer > 9)
65
    {
66
        o_boxingqueen.pattern_phase = 3;
67
        boxingtimer = 10;
68
        with (o_boxingqueen)
69
            
scr_qb_reset
scr_qb_reset

function
scr_qb_reset()
{ attackcount = 0; attackcountmax = 0; attackpattern = 0; for (i = 0; i < 20; i++) { list_attacktype[i] = 0; list_attackamount[i] = 0; list_attackvariant[i] = 0; list_attackwait[i] = 0; } }
();
70
    }
71
}
72
if (health_count < 1 && dead == 0.5)
73
{
74
    health_count = 0;
75
    dead = 1;
76
    if (wireframe_boxing == 1)
77
    {
78
        instance_create(x, y - 45, obj_vector_explosion);
79
    }
80
    else
81
    {
82
        with (obj_event_manager)
83
            trigger_event(UnknownEnum.Value_0, UnknownEnum.Value_13);
84
    }
85
}
86
if (wireframe_boxing == 0 && dead == 1)
87
{
88
    dead_timer++;
89
    image_index = 7;
90
    if (dead_timer > 0 && dead_timer < (20 / f))
91
    {
92
        x = (basex + (20 / dead_timer)) - irandom(40 / dead_timer);
93
        y = (basey + (20 / dead_timer)) - irandom(40 / dead_timer);
94
    }
95
    if (dead_timer > (20 / f))
96
        vspeed = 14 / f;
97
}
98
if ((instance_exists(obj_gigaqueen_enemy) && obj_gigaqueen_enemy.acting > 0 && punchcon == 0 && dead == 0) || (
scr_isphase
scr_isphase

function
scr_isphase(arg0)
{ __isphase = 0; if (arg0 == "menu" && global.myfight == 0) __isphase = 1; if (arg0 == "acting" && global.myfight == 3) __isphase = 1; if (arg0 == "victory" && global.myfight == 7) __isphase = 1; if (arg0 == "attack" || arg0 == "fight") { if (global.myfight == 1) __isphase = 1; } if (arg0 == "spell" || arg0 == "item") { if (global.myfight == 4) __isphase = 1; } if (arg0 == "enemytalk" || arg0 == "balloon") { if (global.mnfight == 1) __isphase = 1; } if (arg0 == "enemyattack" || arg0 == "bullets") { if (global.mnfight == 2) __isphase = 1; } return __isphase; }
("enemytalk") && punchcon == 0 && dead == 0) || (specialcon != 0 && punchcon == 0 && dead == 0) || (acttoenemytalktransition == 1 && punchcon == 0 && dead == 0))
99
{
100
    if (obj_gigaqueen_enemy.breathattack == 0 && obj_gigaqueen_enemy.missleattack == 0)
101
    {
102
        with (o_boxingqueen)
103
        {
104
            invincible_l = 0;
105
            invincible_r = 0;
106
        }
107
        if (y != basey)
108
        {
109
            y = lerp(y, basey, 0.5);
110
            if (abs(y - basey) <= 2)
111
                y = basey;
112
        }
113
        if (x != basex)
114
        {
115
            x = lerp(x, basex, 0.5);
116
            if (abs(x - basex) <= 2)
117
                x = basex;
118
        }
119
    }
120
}
121
else if ((global.boxingphase == 0 && punchcon == 0) || (global.boxingphase == 3 && punchcon == 0))
122
{
123
    with (o_boxingqueen)
124
    {
125
        invincible_l = 0;
126
        invincible_r = 0;
127
    }
128
    if (y >= (basey - 35))
129
    {
130
        y = lerp(y, basey - 35, 0.5);
131
        if (abs(y - basey - 35) <= 2)
132
            y = basey - 35;
133
    }
134
    else
135
    {
136
        y = basey - 38;
137
    }
138
    if (x >= (basex - 70))
139
    {
140
        x = lerp(x, basex - 70, 0.5);
141
        if (abs(x - basex - 70) <= 2)
142
            x = basex - 70;
143
    }
144
}
145
if (global.boxingphase == 1)
146
{
147
    if (i_ex(obj_dbulletcontroller))
148
    {
149
        cancontrol = 1;
150
        global.boxingphase = 2;
151
        boxingtimer = 270;
152
        with (o_boxingqueen)
153
        {
154
            event_user(6);
155
            myturn = 1;
156
            movetimer = 90;
157
            invincible_l = 0;
158
            invincible_r = 0;
159
        }
160
    }
161
    else
162
    {
163
        if (y != basey)
164
        {
165
            y = lerp(y, basey, 0.5);
166
            if (abs(y - basey) <= 2)
167
                y = basey;
168
        }
169
        if (x != basex)
170
        {
171
            x = lerp(x, basex, 0.5);
172
            if (abs(x - basex) <= 2)
173
                x = basex;
174
        }
175
        if (x == basex && y == basey && dead == 0)
176
        {
177
            cancontrol = 1;
178
            global.boxingphase = 2;
179
            boxingtimer = 270;
180
            with (o_boxingqueen)
181
            {
182
                event_user(6);
183
                myturn = 1;
184
                movetimer = 90;
185
                invincible_l = 0;
186
                invincible_r = 0;
187
            }
188
        }
189
    }
190
}
191
if (global.boxingphase == 2)
192
{
193
    nextphase = 0;
194
    if (wireframe_boxing == 0)
195
        boxingtimer--;
196
    if (boxingtimer <= 0)
197
    {
198
        nextphase = 1;
199
        if (hurttimer > 0)
200
            nextphase = 0;
201
        if (o_boxingqueen.state == 2)
202
            nextphase = 0;
203
        if (o_boxingqueen.state == 3)
204
            nextphase = 0;
205
        if (punchcon != 0 || duckcon != 0 || dodgecon != 0)
206
            nextphase = 0;
207
        if (nextphase == 1 && dead == 0)
208
        {
209
            global.boxingphase = 3;
210
            special_punch_turns -= 1;
211
        }
212
    }
213
}
214
if (global.boxingphase == 3)
215
{
216
    cancontrol = 0;
217
    with (o_boxingqueen)
218
    {
219
        myturn = 0;
220
        dizzytimer = 0;
221
    }
222
    global.boxingphase = 0;
223
    global.turntimer = 5;
224
    with (obj_gigaqueen_enemy)
225
    {
226
        talked = 0;
227
        if (didntcounterthisturn == 1)
228
            global.battlemsg[0] = stringsetsubloc("* (Press ~1 or ~2 to hit Queen after she attacks!)", 
scr_get_input_name
scr_get_input_name

function
scr_get_input_name(arg0)
{ var _control = "[?]"; if (global.is_console || obj_gamecontroller.gamepad_active) { _control = global.input_g[arg0]; if (_control == gp_padr) return "\\*D "; if (_control == gp_padl) return "\\*A "; if (_control == gp_padu) return "\\*W "; if (_control == gp_padd) return "\\*S "; if (_control == global.button0) return "\\*Z "; if (_control == global.button1) return "\\*X "; if (_control == global.button2) return "\\*C "; } var left_bracket = (global.lang == "en") ? "[" : "["; var right_bracket = (global.lang == "en") ? "]" : "]"; _control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket; if (!is_string(_control)) _control = "[?]"; else return _control; }
(4),
scr_get_input_name
scr_get_input_name

function
scr_get_input_name(arg0)
{ var _control = "[?]"; if (global.is_console || obj_gamecontroller.gamepad_active) { _control = global.input_g[arg0]; if (_control == gp_padr) return "\\*D "; if (_control == gp_padl) return "\\*A "; if (_control == gp_padu) return "\\*W "; if (_control == gp_padd) return "\\*S "; if (_control == global.button0) return "\\*Z "; if (_control == global.button1) return "\\*X "; if (_control == global.button2) return "\\*C "; } var left_bracket = (global.lang == "en") ? "[" : "["; var right_bracket = (global.lang == "en") ? "]" : "]"; _control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket; if (!is_string(_control)) _control = "[?]"; else return _control; }
(5), "o_boxingcontroller_slash_Step_0_gml_170_0");
229
        if (didntpunchthisturn == 1)
230
            global.battlemsg[0] = stringsetsubloc("* (Punch during Queen's turn with ~1 or ~2 after she attacks!)", 
scr_get_input_name
scr_get_input_name

function
scr_get_input_name(arg0)
{ var _control = "[?]"; if (global.is_console || obj_gamecontroller.gamepad_active) { _control = global.input_g[arg0]; if (_control == gp_padr) return "\\*D "; if (_control == gp_padl) return "\\*A "; if (_control == gp_padu) return "\\*W "; if (_control == gp_padd) return "\\*S "; if (_control == global.button0) return "\\*Z "; if (_control == global.button1) return "\\*X "; if (_control == global.button2) return "\\*C "; } var left_bracket = (global.lang == "en") ? "[" : "["; var right_bracket = (global.lang == "en") ? "]" : "]"; _control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket; if (!is_string(_control)) _control = "[?]"; else return _control; }
(4),
scr_get_input_name
scr_get_input_name

function
scr_get_input_name(arg0)
{ var _control = "[?]"; if (global.is_console || obj_gamecontroller.gamepad_active) { _control = global.input_g[arg0]; if (_control == gp_padr) return "\\*D "; if (_control == gp_padl) return "\\*A "; if (_control == gp_padu) return "\\*W "; if (_control == gp_padd) return "\\*S "; if (_control == global.button0) return "\\*Z "; if (_control == global.button1) return "\\*X "; if (_control == global.button2) return "\\*C "; } var left_bracket = (global.lang == "en") ? "[" : "["; var right_bracket = (global.lang == "en") ? "]" : "]"; _control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket; if (!is_string(_control)) _control = "[?]"; else return _control; }
(5), "o_boxingcontroller_slash_Step_0_gml_174_0");
231
        if (didntdodgethisturn == 1)
232
            global.battlemsg[0] = stringsetsubloc("* (Dodge Queen's attacks with ~1, ~2, and ~3!)", 
scr_get_input_name
scr_get_input_name

function
scr_get_input_name(arg0)
{ var _control = "[?]"; if (global.is_console || obj_gamecontroller.gamepad_active) { _control = global.input_g[arg0]; if (_control == gp_padr) return "\\*D "; if (_control == gp_padl) return "\\*A "; if (_control == gp_padu) return "\\*W "; if (_control == gp_padd) return "\\*S "; if (_control == global.button0) return "\\*Z "; if (_control == global.button1) return "\\*X "; if (_control == global.button2) return "\\*C "; } var left_bracket = (global.lang == "en") ? "[" : "["; var right_bracket = (global.lang == "en") ? "]" : "]"; _control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket; if (!is_string(_control)) _control = "[?]"; else return _control; }
(3),
scr_get_input_name
scr_get_input_name

function
scr_get_input_name(arg0)
{ var _control = "[?]"; if (global.is_console || obj_gamecontroller.gamepad_active) { _control = global.input_g[arg0]; if (_control == gp_padr) return "\\*D "; if (_control == gp_padl) return "\\*A "; if (_control == gp_padu) return "\\*W "; if (_control == gp_padd) return "\\*S "; if (_control == global.button0) return "\\*Z "; if (_control == global.button1) return "\\*X "; if (_control == global.button2) return "\\*C "; } var left_bracket = (global.lang == "en") ? "[" : "["; var right_bracket = (global.lang == "en") ? "]" : "]"; _control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket; if (!is_string(_control)) _control = "[?]"; else return _control; }
(1),
scr_get_input_name
scr_get_input_name

function
scr_get_input_name(arg0)
{ var _control = "[?]"; if (global.is_console || obj_gamecontroller.gamepad_active) { _control = global.input_g[arg0]; if (_control == gp_padr) return "\\*D "; if (_control == gp_padl) return "\\*A "; if (_control == gp_padu) return "\\*W "; if (_control == gp_padd) return "\\*S "; if (_control == global.button0) return "\\*Z "; if (_control == global.button1) return "\\*X "; if (_control == global.button2) return "\\*C "; } var left_bracket = (global.lang == "en") ? "[" : "["; var right_bracket = (global.lang == "en") ? "]" : "]"; _control = left_bracket + global.asc_def[global.input_k[arg0]] + right_bracket; if (!is_string(_control)) _control = "[?]"; else return _control; }
(0), "o_boxingcontroller_slash_Step_0_gml_178_0");
233
        if (recentphasetransition == 2)
234
            global.battlemsg[0] = stringsetloc(
* ROUND 2 begins.
* Queen's attacks got tougher!
"* ROUND 2 begins.&* Queen's attacks got tougher!", "o_boxingcontroller_slash_Step_0_gml_182_0"
);
235
        if (recentphasetransition == 3)
236
            global.battlemsg[0] = stringsetloc(
* ROUND 3 begins.
* Queen's attacks got extreme!
"* ROUND 3 begins.&* Queen's attacks got extreme!", "o_boxingcontroller_slash_Step_0_gml_186_0"
);
237
        recentphasetransition = 0;
238
        didntdodgethisturn = 1;
239
        didntpunchthisturn = 1;
240
        if (o_boxinghud.sub_healthbar_count == 2)
241
            didntcounterthisturn = 1;
242
    }
243
    with (obj_battlecontroller)
244
    {
245
        gigaqueencon = 2;
246
        gigaqueentimer = 0;
247
    }
248
    defend = 0;
249
    damagereductiononeturn = 0;
250
    damagetakenthisturn = 0;
251
}
252
if ((room != room_dw_mansion_top && instance_exists(o_boxing_wireframe) && o_boxing_wireframe.pacifist_timer >= 2970) || (o_boxingcontroller.health_count < 1 && !instance_exists(obj_boxing_loss_controller)))
253
    cancontrol = 0;
254
if (arcaderesettimer > 0)
255
    arcaderesettimer--;
256
var disable = 0;
257
if (o_boxingqueen.attacktype == 9 && o_boxingqueen.attackcon < 2)
258
    disable = 1;
259
if (instance_exists(obj_vector_explosion) || instance_exists(obj_vector_explosion_big))
260
    disable = 1;
261
if (cancontrol == 1 && o_boxingqueen.phase_transition == 0 && talking == 0 && arcaderesettimer == 0 && o_boxingcontroller.dead < 4 && disable == 0)
262
{
263
    canpunch = 1;
264
    if (boxingtimer < 2 && o_boxingqueen.state != 3 && wireframe_boxing == 0)
265
        canpunch = 0;
266
    if (i_ex(o_boxing_wireframe) && o_boxing_wireframe.introcon == 0 && wireframe_boxing == 1)
267
        canpunch = 0;
268
    if (o_boxingqueen.phase_transition > 0 && wireframe_boxing == 1)
269
        canpunch = 0;
270
    if (o_boxingqueen.state == 3 && wireframe_boxing == 0 && o_boxingqueen.attacktype == 9)
271
    {
272
        if (o_boxingqueen.attackcon < 3)
273
            canpunch = 0;
274
        if (o_boxingqueen.attacktimer < (120 / f))
275
            canpunch = 0;
276
    }
277
    var punch_buffer_amount = 2;
278
    if (wireframe_boxing == 1)
279
        punch_buffer_amount = 5;
280
    if (scr_is_switch_os())
281
    {
282
        if (button2_p() && canpunch)
283
        {
284
            buffer_z = punch_buffer_amount;
285
            with (obj_ch2_scene10_arcade_bg)
286
                punch_l_timer = 5;
287
        }
288
        if (button1_p() && canpunch)
289
        {
290
            buffer_x = punch_buffer_amount;
291
            with (obj_ch2_scene10_arcade_bg)
292
                punch_r_timer = 5;
293
        }
294
    }
295
    else
296
    {
297
        if (button1_p() && canpunch)
298
        {
299
            buffer_z = punch_buffer_amount;
300
            with (obj_ch2_scene10_arcade_bg)
301
                punch_l_timer = 5;
302
        }
303
        if (button2_p() && canpunch)
304
        {
305
            buffer_x = punch_buffer_amount;
306
            with (obj_ch2_scene10_arcade_bg)
307
                punch_r_timer = 5;
308
        }
309
    }
310
    if (down_p())
311
    {
312
        buffer_d = 3;
313
        with (obj_ch2_scene10_arcade_bg)
314
            dodge_d_timer = 5;
315
    }
316
    if (right_p())
317
    {
318
        buffer_r = 3;
319
        with (obj_ch2_scene10_arcade_bg)
320
            dodge_r_timer = 5;
321
    }
322
    if (left_p())
323
    {
324
        buffer_l = 3;
325
        with (obj_ch2_scene10_arcade_bg)
326
            dodge_l_timer = 5;
327
    }
328
    if (boxingtimer < 2 && o_boxingqueen.state != 3 && wireframe_boxing == 0)
329
    {
330
        buffer_d = 0;
331
        buffer_r = 0;
332
        buffer_l = 0;
333
    }
334
    if (instance_exists(obj_gigaqueen_enemy) && obj_gigaqueen_enemy.playerhasntdodged == 0)
335
    {
336
        if (down_p() || right_p() || left_p())
337
            obj_gigaqueen_enemy.playerhasntdodged = 1;
338
    }
339
}
340
if (dodgecon == 0 && hurtcon == 0 && duckcon == 0 && jumpcon == 0)
341
{
342
    if (special_punch_count < 1 || special_punch_turns < 1)
343
    {
344
        if (flameactive > 0 || swordactive > 0 || laseractive > 0 || duckactive > 0 || turboactive > 0)
345
        {
346
            flameactive = 0;
347
            swordactive = 0;
348
            laseractive = 0;
349
            duckactive = 0;
350
            turboactive = 0;
351
            damage_multiplier = 1;
352
            punch_speed_multiplier = 1;
353
            with (obj_rotating_sprites_controller)
354
                state = 1;
355
        }
356
    }
357
}
358
if (dodgecon == 0 && hurtcon == 0 && duckcon == 0 && jumpcon == 0)
359
{
360
    if (buffer_z > 0)
361
    {
362
        if (punchcon == 0 || (punchcon == 6 && !instance_exists(o_boxing_wireframe)) || (punchcon == 6 && instance_exists(o_boxing_wireframe) && punchtimer > (6 / f)))
363
        {
364
            drawflip = 0;
365
            punchcon = 1;
366
            lastpunchside = -1;
367
            if (instance_exists(obj_gigaqueen_enemy))
368
                obj_gigaqueen_enemy.didntpunchthisturn = 0;
369
        }
370
    }
371
}
372
if (dodgecon == 0 && hurtcon == 0 && duckcon == 0 && jumpcon == 0)
373
{
374
    if (buffer_x > 0)
375
    {
376
        if (punchcon == 0 || (punchcon == 6 && !instance_exists(o_boxing_wireframe)) || (punchcon == 6 && instance_exists(o_boxing_wireframe) && punchtimer > (6 / f)))
377
        {
378
            drawflip = 1;
379
            punchcon = 1;
380
            lastpunchside = 1;
381
            if (instance_exists(obj_gigaqueen_enemy))
382
                obj_gigaqueen_enemy.didntpunchthisturn = 0;
383
        }
384
    }
385
}
386
if ((punchcon == 0 && dodgecon == 0 && hurtcon == 0 && duckcon == 0 && jumpcon == 0) || (punchcon == 5 && y > 370) || punchcon == 6)
387
{
388
    if (buffer_l > 0)
389
    {
390
        if (punchcon >= 5)
391
        {
392
            event_user(1);
393
            vspeed = 0;
394
            friction = 0;
395
        }
396
        drawflip = 1;
397
        dodgecon = 1;
398
        if (arcade)
399
            snd_play(motor_upper_quick_high_bc);
400
        else
401
            snd_play(motor_upper_quick_high);
402
        if (instance_exists(obj_gigaqueen_enemy))
403
            obj_gigaqueen_enemy.didntdodgethisturn = 0;
404
    }
405
}
406
if ((punchcon == 0 && dodgecon == 0 && hurtcon == 0 && duckcon == 0 && jumpcon == 0) || (punchcon == 5 && y > 370) || punchcon == 6)
407
{
408
    if (buffer_r > 0)
409
    {
410
        if (punchcon >= 5)
411
        {
412
            event_user(1);
413
            vspeed = 0;
414
            friction = 0;
415
        }
416
        drawflip = 0;
417
        dodgecon = 1;
418
        if (arcade)
419
            snd_play(motor_upper_quick_high_bc);
420
        else
421
            snd_play(motor_upper_quick_high);
422
        if (instance_exists(obj_gigaqueen_enemy))
423
            obj_gigaqueen_enemy.didntdodgethisturn = 0;
424
    }
425
}
426
if ((punchcon == 0 && dodgecon == 0 && hurtcon == 0 && duckcon == 0 && jumpcon == 0) || (punchcon == 5 && y > 370) || punchcon == 6)
427
{
428
    if (buffer_d > 0)
429
    {
430
        if (punchcon >= 5)
431
        {
432
            event_user(1);
433
            vspeed = 0;
434
            friction = 0;
435
        }
436
        duckcon = 1;
437
        if (arcade)
438
            snd_play(motor_upper_quick_high_bc);
439
        else
440
            snd_play(motor_upper_quick_high);
441
        if (instance_exists(obj_gigaqueen_enemy))
442
            obj_gigaqueen_enemy.didntdodgethisturn = 0;
443
    }
444
}
445
if (punchcon == 0 && dodgecon == 0 && hurtcon == 0 && duckcon == 0 && jumpcon == 0)
446
{
447
    if (buffer_u > 0)
448
        jumpcon = 1;
449
}
450
var arcade_end = 0;
451
if (o_boxingqueen.phase_transition > 0 && wireframe_boxing == 1 && punchcon == 1)
452
{
453
    buffer_z = 0;
454
    buffer_x = 0;
455
    punch_l_timer = 0;
456
    punch_l_timer = 0;
457
    arcade_end = 1;
458
}
459
if (punchcon >= 1 && arcade_end == 0)
460
{
461
    if (punchcon == 1)
462
    {
463
        o_boxingcontroller.hit_baseball_check = 0;
464
        special_punch_count -= 1;
465
        if (instance_exists(o_boxing_wireframe) && o_boxing_wireframe.pacifist_state == 0)
466
        {
467
            o_boxing_wireframe.pacifist_state = -1;
468
            o_boxing_wireframe.text = o_boxingcontroller.default_string;
469
        }
470
        hitattempt = 0;
471
        x = basex;
472
        y = basey;
473
        image_index = 1;
474
        if (swordactive == 1)
475
            image_index = 14;
476
        vspeed = -12 * f * punch_speed_multiplier;
477
        if (instance_exists(obj_gigaqueen_enemy) && obj_gigaqueen_enemy.acting > 0)
478
            vspeed = -10 * f;
479
        if (drawflip == 0)
480
            hspeed = -4 * f;
481
        if (drawflip == 1)
482
            hspeed = 4 * f;
483
        friction = 2 * f;
484
        punchcon = 2;
485
        punchtimer = 0;
486
        snd_pitch(snd_play(motor_upper_quick_high), 1.25);
487
    }
488
    if (punchcon == 2)
489
    {
490
        punchtimer += (1 * punch_speed_multiplier);
491
        if (laseractive == 1)
492
            punchtimer += 1;
493
        if ((punchtimer >= (7 / f) && instance_exists(obj_gigaqueen_enemy) && obj_gigaqueen_enemy.acting == 0) || (punchtimer >= (14 / f) && instance_exists(obj_gigaqueen_enemy) && obj_gigaqueen_enemy.acting > 0) || (punchtimer >= (7 / f) && !instance_exists(obj_gigaqueen_enemy)))
494
        {
495
            hspeed = 0;
496
            punchtimer = 0;
497
            punchcon = 3;
498
        }
499
    }
500
    if (punchcon == 3)
501
    {
502
        missnoise = 0;
503
        image_index = 2;
504
        if (swordactive == 1)
505
            image_index = 12;
506
        friction = 0.6 * f;
507
        y -= 40;
508
        vspeed = -10 * f;
509
        punchcon = 4;
510
        if (instance_exists(obj_bq_baseball) || instance_exists(obj_bq_baseball_final))
511
        {
512
            hitbox = instance_create(x, y, o_boxingcontroller_fist_hitbox);
513
            if (drawflip == 0)
514
                hitbox.image_xscale = 2;
515
            if (drawflip == 1)
516
                hitbox.image_xscale = -2;
517
            hitbox.image_yscale = 2;
518
        }
519
        if (hitattempt == 0)
520
        {
521
            hitattempt = 1;
522
            q_miss = 0;
523
            if (drawflip == 0 && o_boxingqueen.invincible_l == 1)
524
                q_miss = 1;
525
            if (drawflip == 1 && o_boxingqueen.invincible_r == 1)
526
                q_miss = 1;
527
            var attackintroblock = 0;
528
            if (laseractive == 1)
529
            {
530
                y -= 30;
531
                laserpunchfadetimer = 10;
532
                var oldy = y + 70;
533
                for (var _l = 0; _l < 8; _l++)
534
                {
535
                    afterimage = instance_create(x, lerp(y, oldy, _l / 8), o_afterimage);
536
                    afterimage.sprite_index = spr_bhero_white;
537
                    afterimage.image_index = image_index;
538
                    afterimage.depth = depth - 1;
539
                    afterimage.image_alpha = (10 - _l) / 10;
540
                    afterimage.boss = id;
541
                    afterimage.image_xscale = 2;
542
                    if (drawflip == 1)
543
                        afterimage.image_xscale = -2;
544
                    afterimage.image_yscale = 2;
545
                    if (q_miss == 1)
546
                        vspeed = -3;
547
                }
548
            }
549
            if (o_boxingcontroller.wireframe_boxing == 1 && o_boxingqueen.health_count < 1)
550
                q_miss = 1;
551
            if (instance_exists(obj_vector_explosion) || instance_exists(obj_vector_explosion_big))
552
                q_miss = 1;
553
            if (o_boxingqueen.state == 0 && (o_boxingqueen.movetimer + 10) >= o_boxingqueen.attackthreshold && o_boxingcontroller.wireframe_boxing == 0)
554
            {
555
                if (o_boxingqueen.list_attacktype[o_boxingqueen.attackcount] == 0 || o_boxingqueen.list_attacktype[o_boxingqueen.attackcount] == 2)
556
                {
557
                }
558
            }
559
            if (o_boxingqueen.state == 3 && o_boxingcontroller.wireframe_boxing == 0)
560
            {
561
                if ((o_boxingqueen.attacktype == 0 && o_boxingqueen.attackcon == 1 && o_boxingqueen.punch_type == 1 && o_boxingqueen.attacktimer < 9) || (o_boxingqueen.attacktype == 0 && o_boxingqueen.attackcon == 1 && o_boxingqueen.punch_type == 2 && o_boxingqueen.attacktimer < 9) || (o_boxingqueen.attacktype == 0 && o_boxingqueen.attackcon == 1 && o_boxingqueen.punch_type == 3 && o_boxingqueen.attacktimer < 9) || (o_boxingqueen.attacktype == 2 && o_boxingqueen.attackcon == 1 && o_boxingqueen.attacktimer < 9) || (o_boxingqueen.attacktype == 1 && o_boxingqueen.punch_type == 0 && o_boxingqueen.kick_amount == 0 && o_boxingqueen.attacktimer < 12 && o_boxingqueen.image_index != 2))
562
                {
563
                }
564
            }
565
            if (o_boxingqueen.health_count < (o_boxingqueen.health_count_max * 0.5) && o_boxingcontroller.wireframe_boxing == 1)
566
            {
567
                if (o_boxingqueen.sprite_index == spr_bqueen_laugh_wireframe || o_boxingqueen.sprite_index == spr_bqueen_laugh_wireframe)
568
                {
569
                    if (o_boxingqueen.invincible_l == 1 || o_boxingqueen.invincible_r == 1)
570
                        q_miss = 1;
571
                }
572
            }
573
            if (q_miss == 0)
574
            {
575
                var can_block = 1;
576
                if (o_boxingqueen.health_count >= (o_boxingqueen.health_count_max * 0.5) && o_boxingcontroller.wireframe_boxing == 1)
577
                    can_block = 1;
578
                if (o_boxingqueen.health_count < (o_boxingqueen.health_count_max * 0.5) && o_boxingcontroller.wireframe_boxing == 1 && drawflip == o_boxingqueen.force_drawflip)
579
                {
580
                    if (o_boxingqueen.sprite_index == spr_bqueen_wireframe && o_boxingqueen_janky_image_index < 2)
581
                        can_block = 0;
582
                    if (o_boxingqueen.sprite_index == spr_bqueen_idle_wireframe)
583
                        can_block = 0;
584
                }
585
                if ((o_boxingqueen.blocking == drawflip && swordactive == 0 && o_boxingcontroller.wireframe_boxing == 0 && disable_queen_blocking == 0) || (o_boxingcontroller.wireframe_boxing == 1 && can_block == 0 && disable_queen_blocking == 0) || attackintroblock == 1)
586
                {
587
                    y += 20;
588
                    punchcon = 4.7;
589
                    arcade_times_blocked += 1;
590
                    punchtimer = 0;
591
                    hshake = 6;
592
                    x -= 6;
593
                    shaketimer = 0;
594
                    hspeed = 0;
595
                    vspeed = 0;
596
                    friction = 0;
597
                    with (o_boxingqueen)
598
                    {
599
                        x = basex;
600
                        y = basey;
601
                        instance_create(x, y, obj_boxing_wine_shield);
602
                        block_star = instance_create(x, y, obj_boxing_block_star);
603
                        block_star.direction = 0 + random(90);
604
                        block_star = instance_create(x, y, obj_boxing_block_star);
605
                        block_star.direction = 90 + random(90);
606
                        block_star = instance_create(x, y, obj_boxing_block_star);
607
                        block_star.direction = 180 + random(90);
608
                        block_star = instance_create(x, y, obj_boxing_block_star);
609
                        block_star.direction = 270 + random(90);
610
                        if (arcade)
611
                            snd_play(snd_bell_bc);
612
                        else
613
                            snd_play(snd_bell);
614
                        drawflip = o_boxingcontroller.drawflip;
615
                        savex = x;
616
                        savey = y;
617
                        speed = 0;
618
                        gravity = 0;
619
                        friction = 0;
620
                        blocktimer = 0;
621
                        state = 2;
622
                        image_index = 0;
623
                        sprite_index = spr_bqueen_block;
624
                        if (o_boxingcontroller.wireframe_boxing == 1)
625
                        {
626
                            sprite_index = spr_bqueen_block_wireframe;
627
                            o_boxing_wireframe.text = stringsetloc(
You can Punch on both sides!
"You can Punch on both sides!", "o_boxingcontroller_slash_Step_0_gml_361_0"
);
628
                            o_boxing_wireframe.text_reset_timer = 1;
629
                        }
630
                        invincible_l = 0;
631
                        invincible_r = 0;
632
                    }
633
                }
634
                else
635
                {
636
                    var damage_multiplier_extra = 1;
637
                    if (global.beat_phase1_no_damage_taken == 0 && o_boxinghud.sub_healthbar_count == 2)
638
                        damage_multiplier_extra = 1.25;
639
                    if (global.beat_phase1_no_damage_taken == 1 && o_boxinghud.sub_healthbar_count == 2)
640
                        damage_multiplier_extra = 2.5;
641
                    if (beat_phase2_no_damage_taken == 1 && o_boxinghud.sub_healthbar_count == 0)
642
                        damage_multiplier_extra = 1.5;
643
                    if (o_boxingqueen.attackorderlooping == 1)
644
                        damage_multiplier_extra += 0.5;
645
                    damage_multiplier_extra += phase3_damage_multiplier;
646
                    damage_multiplier_extra = (damage_multiplier_extra - 1) + damage_multiplier;
647
                    var d = 1;
648
                    if (defend == 1)
649
                        d = 0.8;
650
                    var whiteflash = 0;
651
                    d += o_boxingqueen.damagetakenincrease;
652
                    if (o_boxingcontroller.wireframe_boxing == 0)
653
                    {
654
                        if (damageoverride != 0)
655
                        {
656
                            if (damageoverride != 1)
657
                                damageoverride = ceil(damageoverride * damage_multiplier_extra);
658
                            o_boxingqueen.health_count -= damageoverride;
659
                            o_boxingqueen.actpunchtimer = 1;
660
                            dm = instance_create(x, y - 150, obj_dmgwriter);
661
                            dm.delay = 2;
662
                            dm.damage = damageoverride;
663
                            damageoverride = 0;
664
                            actpunchtimer = 15;
665
                            whiteflash = 1;
666
                            if (healoverride != 0)
667
                            {
668
                                health_count += healoverride;
669
                                dmgwr = instance_create(x - 30, y - 75, obj_dmgwriter);
670
                                with (dmgwr)
671
                                {
672
                                    delay = 8;
673
                                    type = 3;
674
                                }
675
                                dmgwr.damage = healoverride;
676
                                if ((global.hp[1] + healoverride) > global.maxhp[1])
677
                                    damage = global.maxhp[1] - global.hp[1];
678
                                if (health_count > health_count_max)
679
                                    health_count = health_count_max;
680
                                global.hp[1] += healoverride;
681
                                if (global.hp[1] > global.maxhp[1])
682
                                    global.hp[1] = global.maxhp[1];
683
                                if (arcade)
684
                                    snd_play(snd_power_bc);
685
                                else
686
                                    snd_play(snd_power);
687
                            }
688
                        }
689
                        else if (o_boxingqueen.sprite_index == spr_bqueen_hurt)
690
                        {
691
                            o_boxingqueen.health_count -= ceil(14 * damage_multiplier_extra * d);
692
                        }
693
                        else
694
                        {
695
                            o_boxingqueen.health_count -= ceil(28 * damage_multiplier_extra * d);
696
                        }
697
                    }
698
                    if (o_boxingcontroller.wireframe_boxing == 1)
699
                    {
700
                        o_boxingqueen.health_count -= 30;
701
                        if (o_boxingqueen.state == 3)
702
                        {
703
                            if (o_boxingqueen.attacktype == 0 && o_boxingqueen.attackcon == 3)
704
                                o_boxingqueen.health_count -= 20;
705
                            else if (o_boxingqueen.attacktype != 0)
706
                                o_boxingqueen.health_count -= 20;
707
                        }
708
                        o_boxing_wireframe.zx_timer = 0;
709
                        o_boxing_wireframe.zx_state = 0;
710
                        o_boxingcontroller.arcade_times_blocked = 1;
711
                    }
712
                    o_boxinghud.healthbar_flash = 100;
713
                    o_boxingqueen.pacifist = 0;
714
                    o_boxingqueen.health_count_prev_timer = o_boxingqueen.health_count_prev_timer_set;
715
                    if (drawflip == 0)
716
                        o_boxingqueen.drawflip = 1;
717
                    with (o_boxingqueen)
718
                        path_end();
719
                    if (tpoverride != 0)
720
                    {
721
                        
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(tpoverride);
722
                        if (arcade)
723
                            snd_play(snd_criticalswing_bc);
724
                        else
725
                            snd_play(snd_criticalswing);
726
                    }
727
                    
scr_tensionheal
scr_tensionheal

function
scr_tensionheal(arg0)
{ global.tension += arg0; if (global.tension > global.maxtension) global.tension = global.maxtension; }
(2.5);
728
                    tpoverride = 0;
729
                    if (o_boxingqueen.state != 0 && o_boxingqueen.state != 1 && o_boxingcontroller.wireframe_boxing == 0)
730
                    {
731
                        o_boxingqueen.combo = 1;
732
                        obj_gigaqueen_enemy.didntcounterthisturn = 0;
733
                    }
734
                    if (o_boxingcontroller.wireframe_boxing == 1)
735
                        o_boxingqueen.combo = 1;
736
                    if (o_boxingqueen.state == 0 && o_boxingqueen.bouncetimer > 1 && o_boxingcontroller.wireframe_boxing == 0 && global.boxingphase == 2)
737
                    {
738
                        o_boxingqueen.shortcomboend = 1;
739
                        o_boxingqueen.combo = 1;
740
                        obj_gigaqueen_enemy.didntcounterthisturn = 0;
741
                        o_boxingqueen.times_hit_in_a_row = 2;
742
                    }
743
                    if (o_boxingqueen.combo == 1)
744
                        o_boxingqueen.times_hit_in_a_row += 1;
745
                    if (swordactive == 1)
746
                    {
747
                        if (damage_multiplier == 1.2)
748
                            damage_multiplier = 1.3;
749
                        else if (damage_multiplier < 1.6)
750
                            damage_multiplier += 0.05;
751
                        else
752
                            damage_multiplier += 0.02;
753
                    }
754
                    o_boxingqueen.hurt_fx1_timer = 0;
755
                    o_boxingqueen.hurt_fx1_timer2 = 0;
756
                    o_boxingqueen.hurt_fx1_state = 1;
757
                    arcade_mode_last_punched_direction = drawflip;
758
                    if (instance_exists(o_boxing_wireframe) && o_boxingqueen.health_count < (o_boxingqueen.health_count_max * 1))
759
                    {
760
                        if (o_boxingqueen.force_drawflip <= 0)
761
                            o_boxingqueen.force_drawflip = 1;
762
                        else
763
                            o_boxingqueen.force_drawflip = 0;
764
                    }
765
                    else if (drawflip == 1)
766
                    {
767
                        o_boxingqueen.drawflip = 0;
768
                    }
769
                    with (o_boxingqueen)
770
                    {
771
                        hitanim = 0;
772
                        if (times_hit_in_a_row > 2 && o_boxingqueen.shortcomboend == 0 && o_boxingcontroller.laseractive == 0 && times_hit_in_a_row > 3 && o_boxingqueen.shortcomboend == 0 && o_boxingcontroller.laseractive == 1)
773
                        {
774
                            if (arcade)
775
                            {
776
                                snd_play(snd_ultraswing_bc);
777
                                punchnoise = snd_play(punch_ish_1_bc);
778
                            }
779
                            else
780
                            {
781
                                snd_play(snd_ultraswing);
782
                                punchnoise = snd_play(snd_queen_punched_lower_heavy);
783
                            }
784
                            audio_sound_pitch(punchnoise, 1.4);
785
                        }
786
                        else
787
                        {
788
                            if (arcade)
789
                                punchnoise = snd_play(punch_ish_1_bc);
790
                            else
791
                                punchnoise = snd_play(snd_queen_punched_lower);
792
                            var hitqueensfxcount = times_hit_in_a_row;
793
                            if (hitqueensfxcount < 0)
794
                                hitqueensfxcount = 0;
795
                            if (o_boxingqueen.shortcomboend == 1)
796
                                audio_sound_pitch(punchnoise, 1);
797
                            else
798
                                audio_sound_pitch(punchnoise, 1 + ((hitqueensfxcount - 1) * 0.3));
799
                        }
800
                        if (o_boxingcontroller.wireframe_boxing == 0)
801
                        {
802
                            if (times_hit_in_a_row < 3 && o_boxingcontroller.laseractive == 0)
803
                                o_boxingqueen.movetimer = 1;
804
                            if (times_hit_in_a_row < 4 && o_boxingcontroller.laseractive == 1)
805
                                o_boxingqueen.movetimer = 1;
806
                            if (o_boxingqueen.combo == 0)
807
                                o_boxingqueen.movetimer = o_boxingqueen.attackthreshold;
808
                            if (o_boxingqueen.combo == 1 && o_boxingqueen.attackthreshold == 0)
809
                                o_boxingqueen.attackthreshold = 30;
810
                        }
811
                        if (dizzytimer <= 0)
812
                            noattack += 1;
813
                        else if (arcade)
814
                            snd_play(snd_metalhit_bc);
815
                        else
816
                            snd_play(snd_metalhit);
817
                        blocking = -1;
818
                        image_index = 0;
819
                        sprite_index = spr_bqueen_hurt_effect;
820
                        if (o_boxingcontroller.wireframe_boxing == 1)
821
                            sprite_index = spr_bqueen_hurt_effect_wireframe;
822
                        speed = 0;
823
                        gravity = 0;
824
                        invincible_l = 0;
825
                        invincible_r = 0;
826
                        enddizzy = 0;
827
                        if (o_boxingcontroller.wireframe_boxing == 0)
828
                        {
829
                            if (makedizzy > 0)
830
                            {
831
                                dizzytimer = makedizzy;
832
                                if (o_boxingcontroller.flameactive == 1)
833
                                    dizzytimer = makedizzy * 1.5;
834
                                if (o_boxingcontroller.laseractive == 1)
835
                                    dizzytimer = makedizzy * 1.5;
836
                                makedizzy = 0;
837
                            }
838
                            else
839
                            {
840
                                if (o_boxingcontroller.laseractive == 0)
841
                                    dizzytimer -= 20;
842
                                if (o_boxingcontroller.laseractive == 1)
843
                                    dizzytimer -= 10;
844
                            }
845
                            if (dizzytimer > 0 && dizzytimer <= 60)
846
                            {
847
                                dizzytimer = 0;
848
                                enddizzy = 1;
849
                            }
850
                            if (dizzytimer > 0)
851
                                sprite_index = spr_bqueen_dizzy_hurt;
852
                        }
853
                        if (whiteflash == 1)
854
                        {
855
                            with (o_boxingqueen)
856
                            {
857
                                event_user(5);
858
                                o_afterimage.white_silhouette = 1;
859
                            }
860
                        }
861
                        if (drawflip == 0 || drawflip == -1)
862
                        {
863
                            if (dizzytimer >= 60)
864
                                hitanim = 1;
865
                            else
866
                                hitnaim = 2;
867
                            if (enddizzy == 1)
868
                                hitanim = 3;
869
                        }
870
                        if (drawflip == 1)
871
                        {
872
                            if (dizzytimer >= 60)
873
                                hitanim = -1;
874
                            else
875
                                hitanim = -2;
876
                            if (enddizzy == 1)
877
                                hitanim = -3;
878
                        }
879
                        if (o_boxingcontroller.wireframe_boxing == 0)
880
                        {
881
                            if ((times_hit_in_a_row < 3 && o_boxingcontroller.laseractive == 0) || (times_hit_in_a_row < 4 && o_boxingcontroller.laseractive == 1))
882
                            {
883
                                if (hitanim == -2)
884
                                    hitanim = choose(-1, -3);
885
                                if (hitanim == 3 || hitanim == -3)
886
                                    
scr_move_precise
scr_move_precise

function
scr_move_precise(arg0, arg1, arg2)
{ _moveprecise = instance_create(x, y, obj_move_precise); _moveprecise.target = id; _moveprecise.type = arg0; if (arg1 != 0) _moveprecise.xOrientation = arg1; if (arg2 != 0) _moveprecise.yOrientation = arg2; with (_moveprecise) event_user(0); return _moveprecise; }
(2, (2 * hitanim) / 3, 2);
887
                                if (hitanim == 1 || hitanim == -1)
888
                                    
scr_move_precise
scr_move_precise

function
scr_move_precise(arg0, arg1, arg2)
{ _moveprecise = instance_create(x, y, obj_move_precise); _moveprecise.target = id; _moveprecise.type = arg0; if (arg1 != 0) _moveprecise.xOrientation = arg1; if (arg2 != 0) _moveprecise.yOrientation = arg2; with (_moveprecise) event_user(0); return _moveprecise; }
(1, (2 * hitanim) / 1, 2);
889
                                if (hitanim == 2 || hitanim == -2)
890
                                    
scr_move_precise
scr_move_precise

function
scr_move_precise(arg0, arg1, arg2)
{ _moveprecise = instance_create(x, y, obj_move_precise); _moveprecise.target = id; _moveprecise.type = arg0; if (arg1 != 0) _moveprecise.xOrientation = arg1; if (arg2 != 0) _moveprecise.yOrientation = arg2; with (_moveprecise) event_user(0); return _moveprecise; }
(0, (2 * hitanim) / 2, 2);
891
                                if (hitanim == 0)
892
                                    
scr_move_precise
scr_move_precise

function
scr_move_precise(arg0, arg1, arg2)
{ _moveprecise = instance_create(x, y, obj_move_precise); _moveprecise.target = id; _moveprecise.type = arg0; if (arg1 != 0) _moveprecise.xOrientation = arg1; if (arg2 != 0) _moveprecise.yOrientation = arg2; with (_moveprecise) event_user(0); return _moveprecise; }
(1, 2, 2);
893
                            }
894
                        }
895
                        else if (times_hit_in_a_row < 2)
896
                        {
897
                            if (drawflip == 1)
898
                                
scr_move_precise
scr_move_precise

function
scr_move_precise(arg0, arg1, arg2)
{ _moveprecise = instance_create(x, y, obj_move_precise); _moveprecise.target = id; _moveprecise.type = arg0; if (arg1 != 0) _moveprecise.xOrientation = arg1; if (arg2 != 0) _moveprecise.yOrientation = arg2; with (_moveprecise) event_user(0); return _moveprecise; }
(choose(1, 2), -2, 2);
899
                            else
900
                                
scr_move_precise
scr_move_precise

function
scr_move_precise(arg0, arg1, arg2)
{ _moveprecise = instance_create(x, y, obj_move_precise); _moveprecise.target = id; _moveprecise.type = arg0; if (arg1 != 0) _moveprecise.xOrientation = arg1; if (arg2 != 0) _moveprecise.yOrientation = arg2; with (_moveprecise) event_user(0); return _moveprecise; }
(choose(1, 2), 2, 2);
901
                        }
902
                        hurttimer = 0;
903
                        state = 1;
904
                        x = basex;
905
                        y = basey;
906
                    }
907
                    x = basex;
908
                    vspeed = 0;
909
                    punchcon = 4.5;
910
                    punchtimer = 0;
911
                    hit_fx = instance_create(x, y, obj_boxing_hit_fx);
912
                    with (hit_fx)
913
                        event_user(1);
914
                    if (flameactive == 1)
915
                    {
916
                        if (arcade)
917
                            snd_play(snd_punchheavythunder_bc);
918
                        else
919
                            snd_play(snd_punchheavythunder);
920
                        flamepunch = 1;
921
                        flametimer = 10;
922
                    }
923
                    if (laseractive == 1)
924
                    {
925
                        if (arcade)
926
                            snd_play(snd_punchheavythunder_bc);
927
                        else
928
                            snd_play(snd_punchheavythunder);
929
                        laserpunch = 1;
930
                        lasertimer = 10;
931
                    }
932
                    if (duckactive == 1)
933
                    {
934
                        if (arcade)
935
                        {
936
                            var snd = snd_play(snd_squeaky_bc);
937
                            snd_pitch(snd, 0.75 + random(0.5));
938
                        }
939
                        else
940
                        {
941
                            var snd = snd_play(snd_squeaky);
942
                            snd_pitch(snd, 0.75 + random(0.5));
943
                        }
944
                        color_fade_alpha = 1;
945
                        if (healoverride == 0)
946
                        {
947
                            global.hp[1] += 2;
948
                            if (global.hp[1] > global.maxhp[1])
949
                                global.hp[1] = global.maxhp[1];
950
                        }
951
                        healoverride = 0;
952
                    }
953
                }
954
            }
955
        }
956
    }
957
    if (punchcon == 4)
958
    {
959
        if (missnoise == 0)
960
        {
961
            if (arcade)
962
                snd_play(motor_upper_quick_bc);
963
            else
964
                snd_play(motor_upper_quick);
965
            missnoise = 1;
966
        }
967
        vspeed *= 0.81;
968
        miss_timer++;
969
        if (miss_timer == 5 && swordactive == 1)
970
            image_index = 13;
971
        if (vspeed >= (-1 * f) && punchcon == 4)
972
        {
973
            punchcon = 5;
974
            miss_timer = 0;
975
            vspeed = 3 * f;
976
        }
977
    }
978
    if (punchcon == 4.5)
979
    {
980
        punchtimer += 1;
981
        if (punchtimer == 5 && swordactive == 1)
982
            image_index = 13;
983
        vspeed = 0;
984
        hspeed = 0;
985
        gravity = 0;
986
        friction = 0;
987
        if (f == 1)
988
        {
989
            if (punchtimer == 1)
990
                y -= 30;
991
            if (punchtimer == 2)
992
                y -= 15;
993
            if (punchtimer == 3)
994
                y -= 8;
995
        }
996
        if (punchtimer >= (10 / f))
997
        {
998
            punchcon = 5;
999
            punchtimer = 0;
1000
        }
1001
    }
1002
    if (punchcon == 4.7)
1003
    {
1004
        hspeed = 0;
1005
        vspeed = 0;
1006
        friction = 0;
1007
        punchtimer += 1;
1008
        shaketimer += 1;
1009
        if (shaketimer == 5 && swordactive == 1)
1010
            image_index = 13;
1011
        if (shaketimer >= (2 / f))
1012
        {
1013
            x += hshake;
1014
            if (hshake > 0)
1015
                hshake -= 1;
1016
            if (hshake < 0)
1017
                hshake += 1;
1018
            hshake = -hshake;
1019
            if (hshake == 1 || hshake == -1)
1020
                hshake = 0;
1021
            shaketimer = 0;
1022
        }
1023
        if (punchtimer >= (22 / f))
1024
        {
1025
            punchtimer = 0;
1026
            punchcon = 5;
1027
        }
1028
    }
1029
    if (punchcon == 5)
1030
    {
1031
        vspeed += (3 * f * punch_speed_multiplier);
1032
        if (y >= basey)
1033
        {
1034
            vspeed = 0;
1035
            friction = 0;
1036
            y = basey;
1037
            punchcon = 6;
1038
            punchtimer = 0;
1039
        }
1040
    }
1041
    if (punchcon == 6)
1042
    {
1043
        image_index = 3;
1044
        punchtimer += (1 * punch_speed_multiplier);
1045
        if (punchtimer >= (10 / f))
1046
            event_user(1);
1047
    }
1048
}
1049
if (dodgecon > 0)
1050
{
1051
    long_dodge = 0;
1052
    if (drawflip == 0 && right_h())
1053
        long_dodge = 1;
1054
    if (drawflip == 1 && left_h())
1055
        long_dodge = 1;
1056
    var dodge_speed = 1;
1057
    if (turboactive == 1)
1058
        dodge_speed = 2;
1059
    if (dodgecon == 1)
1060
    {
1061
        x = basex;
1062
        y = basey;
1063
        image_index = 4;
1064
        if (drawflip == 0)
1065
            hspeed = 18 * f * dodge_speed;
1066
        if (drawflip == 1)
1067
            hspeed = -18 * f * dodge_speed;
1068
        dodgetimer = 0;
1069
        dodgecon = 2;
1070
        if (o_boxingcontroller.wireframe_boxing == 1 && o_boxing_wireframe.text == o_boxingcontroller.dodge_string)
1071
            o_boxing_wireframe.text = o_boxingcontroller.default_string;
1072
    }
1073
    if (dodgecon == 2)
1074
    {
1075
        dodgetimer += 1;
1076
        if (dodgetimer == 1)
1077
            dodging = 1;
1078
        if (dodgetimer >= (16 / f) && turboactive == 0)
1079
            dodging = 0;
1080
        if (dodgetimer >= (32 / f) && turboactive == 1)
1081
            dodging = 0;
1082
        if (dodge_speed == 1)
1083
            hspeed *= 0.6400000000000001;
1084
        if (dodge_speed == 2)
1085
        {
1086
            repeat (dodge_speed)
1087
                hspeed *= 0.698896;
1088
        }
1089
        if (abs(hspeed) <= (5 * f) && long_dodge == 0)
1090
            dodgecon = 3;
1091
        if (abs(hspeed) <= (0.2 * f))
1092
            dodgecon = 3;
1093
    }
1094
    if (dodgecon == 3)
1095
    {
1096
        if (turboactive == 0)
1097
            dodging = 0;
1098
        x = round(x);
1099
        dodgecon = 4;
1100
    }
1101
    if (dodgecon == 4)
1102
    {
1103
        dodgetimer++;
1104
        if (dodgetimer >= (32 / f) && turboactive == 1)
1105
            dodging = 0;
1106
        if (drawflip == 0)
1107
        {
1108
            if (turboactive == 1 && long_dodge == 1)
1109
            {
1110
                hspeed -= (0.1 * f * dodge_speed);
1111
            }
1112
            else
1113
            {
1114
                hspeed -= (0.5 * f * dodge_speed);
1115
                if (long_dodge == 0)
1116
                    hspeed -= (0.3 * f);
1117
            }
1118
            if (x <= (basex + (8 * f)))
1119
            {
1120
                speed = 0;
1121
                x = basex;
1122
                dodgecon = 5;
1123
                dodging = 0;
1124
                dodgetimer = 0;
1125
            }
1126
        }
1127
        if (drawflip == 1)
1128
        {
1129
            if (turboactive == 1 && long_dodge == 1)
1130
            {
1131
                hspeed += (0.1 * f * dodge_speed);
1132
            }
1133
            else
1134
            {
1135
                hspeed += (0.5 * f * dodge_speed);
1136
                if (long_dodge == 0)
1137
                    hspeed += (0.3 * f * dodge_speed);
1138
            }
1139
            if (x >= (basex - (8 * f)))
1140
            {
1141
                speed = 0;
1142
                x = basex;
1143
                dodgecon = 5;
1144
                dodging = 0;
1145
                dodgetimer = 0;
1146
            }
1147
        }
1148
    }
1149
    if (dodgecon == 5)
1150
        event_user(1);
1151
}
1152
if (duckcon > 0)
1153
{
1154
    long_duck = 0;
1155
    if (down_h())
1156
        long_duck = 1;
1157
    var duck_speed = 1;
1158
    if (turboactive == 1)
1159
        duck_speed = 2;
1160
    if (duckcon == 1)
1161
    {
1162
        x = basex;
1163
        y = basey;
1164
        ducking = 1;
1165
        image_index = 6;
1166
        vspeed = 5 * f * duck_speed;
1167
        duckcon = 2;
1168
        if (o_boxingcontroller.wireframe_boxing == 1 && o_boxing_wireframe.text == o_boxingcontroller.duck_string)
1169
            o_boxing_wireframe.text = o_boxingcontroller.default_string;
1170
    }
1171
    if (duckcon == 2)
1172
    {
1173
        repeat (duck_speed)
1174
            vspeed *= 0.81;
1175
        if (abs(vspeed) <= (1 * f) && long_duck == 0)
1176
            duckcon = 3;
1177
        if (abs(vspeed) <= (6 * f) && long_duck == 0 && turboactive == 1)
1178
            duckcon = 3;
1179
        if (abs(vspeed) <= (0.3 * f))
1180
            duckcon = 3;
1181
    }
1182
    if (duckcon == 3)
1183
    {
1184
        y = round(y);
1185
        duckcon = 4;
1186
        ducktimer = 0;
1187
    }
1188
    if (duckcon == 4)
1189
    {
1190
        ducktimer += 1;
1191
        if (ducktimer >= (6 / f) && turboactive == 0)
1192
            ducking = 0;
1193
        if (ducktimer >= (12 / f) && turboactive == 1)
1194
            ducking = 0;
1195
        if (turboactive == 1 && long_duck == 1)
1196
            vspeed -= (0.05 * f);
1197
        else
1198
            vspeed -= (0.5 * f * duck_speed);
1199
        if (y <= (basey + (6 * f)))
1200
        {
1201
            speed = 0;
1202
            y = basey;
1203
            duckcon = 5;
1204
        }
1205
    }
1206
    if (duckcon == 5)
1207
        event_user(1);
1208
}
1209
if (jumpcon > 0)
1210
{
1211
    long_jump = 0;
1212
    if (up_h())
1213
        long_jump = 1;
1214
    if (jumpcon == 1 && long_jump == 2)
1215
    {
1216
        x = basex;
1217
        y = basey;
1218
        jumping = 1;
1219
        image_index = 5;
1220
        vspeed = -5;
1221
        jumpcon = 2;
1222
    }
1223
    if (jumpcon == 2 && long_jump == 2)
1224
    {
1225
        vspeed *= 0.9;
1226
        if (vspeed >= -1 && long_jump == 0)
1227
            jumpcon = 3;
1228
        if (vspeed >= -0.5)
1229
            jumpcon = 3;
1230
    }
1231
    if (jumpcon == 1)
1232
    {
1233
        x = basex;
1234
        y = basey;
1235
        jumping = 1;
1236
        image_index = 5;
1237
        vspeed = -7;
1238
        jumpcon = 2;
1239
    }
1240
    if (jumpcon == 2)
1241
    {
1242
        vspeed += 0.3;
1243
        if (long_jump == 0)
1244
            vspeed += 0.2;
1245
        if (vspeed > 0 && y >= (basey - 6))
1246
        {
1247
            speed = 0;
1248
            y = basey;
1249
            jumpcon = 3;
1250
        }
1251
    }
1252
    if (jumpcon == 3)
1253
    {
1254
        y = round(y);
1255
        jumpcon = 4;
1256
        jumptimer = 0;
1257
    }
1258
    if (jumpcon == 4)
1259
    {
1260
        vspeed += 0.5;
1261
        if (y >= (basey - 6))
1262
        {
1263
            speed = 0;
1264
            y = basey;
1265
            jumpcon = 5;
1266
        }
1267
    }
1268
    if (jumpcon == 5)
1269
    {
1270
        jumping = 0;
1271
        event_user(1);
1272
    }
1273
}
1274
if (hurtcon > 0)
1275
{
1276
    if (hurtcon == 1)
1277
    {
1278
        if (arcade)
1279
        {
1280
            snd_play(snd_hurt1_bc);
1281
            snd_play(snd_punchmed_bc);
1282
            snd_play(snd_metalhit_bc);
1283
        }
1284
        else
1285
        {
1286
            snd_play(snd_hurt1);
1287
            snd_play(snd_punchmed);
1288
            snd_play(snd_metalhit);
1289
        }
1290
        image_index = 7;
1291
        vspeed = 5 * f;
1292
        friction = 1 * f;
1293
        if (drawflip == 0)
1294
            hspeed = 3 * f;
1295
        else
1296
            hspeed = -3 * f;
1297
        hurtcon = 2;
1298
    }
1299
    if (hurtcon == 2)
1300
    {
1301
        hurttimer += 1;
1302
        if (hurttimer >= hurt_length)
1303
        {
1304
            speed = 0;
1305
            friction = 0;
1306
            event_user(1);
1307
        }
1308
    }
1309
}
1310
if (specialcon >= 1)
1311
    image_index = 1;
1312
if (swordactive == 0)
1313
{
1314
    if (imagefisty[image_index] < 0)
1315
    {
1316
        flametimer++;
1317
        if (flameactive == 1 && flametimer >= 3)
1318
        {
1319
            flametimer = 0;
1320
            flippo = 1;
1321
            if (drawflip == 1)
1322
                flippo = -1;
1323
            flame = instance_create(x + (imagefistx[image_index] * flippo), y + imagefisty[image_index], o_boxingflame);
1324
            flame.direction = random(360);
1325
            flame.speed = 2;
1326
            flame.friction = 0.1;
1327
        }
1328
        if (flamepunch == 1)
1329
        {
1330
            flippo = 1;
1331
            if (drawflip == 1)
1332
                flippo = -1;
1333
            randdir = random(360);
1334
            for (i = 0; i < 8; i++)
1335
            {
1336
                flame = instance_create(x + (imagefistx[image_index] * flippo), y + imagefisty[image_index], o_boxingflame);
1337
                flame.direction = randdir + (i * 45);
1338
                flame.speed = 6;
1339
                flame.friction = 0.2;
1340
            }
1341
            flamepunch = 0;
1342
            flametimer = -10;
1343
        }
1344
    }
1345
    if (imagefisty[image_index] < 0)
1346
    {
1347
        lasertimer++;
1348
        if (laseractive == 1 && lasertimer >= 3)
1349
        {
1350
            lasertimer = 0;
1351
            flippo = 1;
1352
            if (drawflip == 1)
1353
                flippo = -1;
1354
            flame = instance_create(x + (imagefistx[image_index] * flippo), y + imagefisty[image_index], o_boxingflame);
1355
            flame.direction = random(360);
1356
            flame.speed = 2;
1357
            flame.friction = 0.1;
1358
            flame.sprite_index = spr_boxing_laser_square;
1359
            flame.dustmode = 1;
1360
        }
1361
        if (laserpunch == 1)
1362
        {
1363
            flippo = 1;
1364
            if (drawflip == 1)
1365
                flippo = -1;
1366
            randdir = random(360);
1367
            for (i = 0; i < 8; i++)
1368
            {
1369
                flame = instance_create(x + (imagefistx[image_index] * flippo), y + imagefisty[image_index], o_boxingflame);
1370
                flame.direction = randdir + (i * 45);
1371
                flame.speed = 6;
1372
                flame.friction = 0.2;
1373
                flame.sprite_index = spr_boxing_laser_square;
1374
                flame.dustmode = 1;
1375
            }
1376
            laserpunch = 0;
1377
            lasertimer = -10;
1378
        }
1379
    }
1380
}
1381
invincibility_timer += 1;
1382
if (invincibility_timer == 0 && invincible == 1)
1383
    invincible = 0;
1384
buffer_z -= 1;
1385
buffer_x -= 1;
1386
buffer_u -= 1;
1387
buffer_d -= 1;
1388
buffer_r -= 1;
1389
buffer_l -= 1;
1390
1391
enum UnknownEnum
1392
{
1393
    Value_0,
1394
    Value_13 = 13
1395
}