Deltarune (Chapter 3) script viewer

← back to main script listing

gml_Object_obj_knight_enemy_Step_0

(view raw script w/o annotations or w/e)
1
if (!i_ex(obj_herosusie) || !i_ex(obj_heroralsei))
2
{
3
    if (debugvar == false && 
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
4
    {
5
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("You need Susie and Ralsei for this battle");
6
        debugvar = true;
7
    }
8
    exit;
9
}
10
if (global.monsterhp[myself] <= (global.monstermaxhp[myself] * 0.8))
11
    global.tempflag[96] = 1;
12
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
() && keyboard_check_pressed(vk_backspace))
13
    global.monsterhp[myself] -= 3000;
14
if (holdbreathcount > 0 && i_ex(obj_heart))
15
    obj_heart.wspeed = 5;
16
if (holdbreathcount > 0 && i_ex(obj_knight_roaring2) && i_ex(obj_heart))
17
    obj_heart.wspeed = 6;
18
damagereductiontimer++;
19
if (damagereductiontimer == 1)
20
{
21
    if (phaseturn == 1 && phase == 1)
22
    {
23
        phaseturn = 1;
24
        myattackchoice = 2;
25
        difficulty = 0;
26
    }
27
    damagereduction = 0.2;
28
    global.monstername[myself] = stringsetloc(
Knight
"Knight", "obj_knight_enemy_slash_Step_0_gml_23_0"
);
29
    if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
30
        
scr_debug_print
scr_debug_print

function
scr_debug_print(arg0)
{ } function print_message(arg0) { } function debug_print(arg0) { } function scr_debug_clear_all() { }
("damage reduction set to 0.8");
31
    blocking = 0;
32
    hurtsprite = spr_roaringknight_hurt;
33
}
34
if (
scr_debug
scr_debug

function
scr_debug()
{ if (global.debug == 1) return 1; }
())
35
    overrideAttack = 
scr_attack_override
scr_attack_override

function
scr_attack_override(arg0, arg1, arg2, arg3 = false)
{ var __attackdebug = arg0; if (arg1 > 10) arg1 = 10; if (sunkus_kb_check_pressed(110) || sunkus_kb_check_pressed(189)) { __attackdebug = -1; if (arg3)
scr_debug_print(arg2 + " is normal now.");
else
scr_debug_print(arg2 + " attack randomized.");
} else { for (i = 0; i < arg1; i++) { if (sunkus_kb_check_pressed(ord(string(i))) || sunkus_kb_check_pressed(96 + i)) __attackdebug = i; } for (i = arg1; i < 10; i++) { if (sunkus_kb_check_pressed(ord(string(i))) || sunkus_kb_check_pressed(96 + i))
scr_debug_print(arg2 + " does not have an attack no. " + string(i));
} } if (__attackdebug != arg0 && __attackdebug > -1)
scr_debug_print(arg2 + " attack set to no. " + string(__attackdebug));
if (sunkus_kb_check_pressed(9)) { if (window_get_height() == 480) { var __screensize = floor(display_get_height() / 480); window_set_size(640 * __screensize, 480 * __screensize); } else { window_set_size(640, 480); } } return __attackdebug; }
(overrideAttack, 10, "The Roaring Knight", true);
36
if (blockanim == 1)
37
{
38
    snd_stop(snd_bell);
39
    snd_play(snd_bell);
40
    idlesprite = spr_roaringknight_block_ol;
41
    whiteflash = 2;
42
    blockanim = 2;
43
    blocktimer = 0;
44
    shakex = 5;
45
    state = 3;
46
    hurttimer = 30;
47
}
48
if (blockanim == 2)
49
{
50
    blocktimer++;
51
    if (blocktimer == 1)
52
    {
53
        anim = instance_create(x + 14, y + 40, obj_block_vfx);
54
        anim.sprite_index = spr_roaringknight_block_vfx;
55
        anim.image_xscale = 1.3;
56
        anim.image_yscale = 1.3;
57
        anim.vspeed = -8;
58
        anim.gravity_direction = 0;
59
        anim.gravity = 1;
60
        anim.image_speed = 0.5;
61
        anim = instance_create(x + 14, y + 40, obj_block_vfx);
62
        anim.sprite_index = spr_roaringknight_block_vfx;
63
        anim.image_xscale = 1.3;
64
        anim.image_yscale = 1.3;
65
        anim.vspeed = 8;
66
        anim.gravity_direction = 0;
67
        anim.gravity = 2;
68
        anim.image_speed = 0.5;
69
    }
70
    if (blocktimer == 3 || blocktimer == 6)
71
    {
72
        anim = instance_create(x + 14, y + 40, obj_block_vfx);
73
        anim.sprite_index = spr_roaringknight_block_vfx;
74
        anim.image_xscale = 1.3;
75
        anim.image_yscale = 1.3;
76
        anim.vspeed = choose(-8, 8);
77
        anim.gravity_direction = 0;
78
        anim.gravity = 2;
79
        anim.image_speed = 0.5;
80
    }
81
    if (blocktimer == 15)
82
    {
83
        blocktimer = 0;
84
        blockanim = 0;
85
        idlesprite = spr_roaringknight_idle;
86
    }
87
}
88
if (global.monster[myself] == 1)
89
{
90
    if (
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") && talked == 0 && end_cutscene_version == 0)
91
    {
92
        
scr_randomtarget
scr_randomtarget

function
scr_randomtarget()
{ abletotarget = 1; if (global.charcantarget[0] == 0 && global.charcantarget[1] == 0 && global.charcantarget[2] == 0) abletotarget = 0; mytarget = choose(0, 1, 2); if (abletotarget == 1) { while (global.charcantarget[mytarget] == 0) mytarget = choose(0, 1, 2); } else { mytarget = 3; } global.targeted[mytarget] = 1; if (global.chapter >= 2 && mytarget != 3) { if (global.charcantarget[0]) global.targeted[0] = 1; if (global.charcantarget[1]) global.targeted[1] = 1; if (global.charcantarget[2]) global.targeted[2] = 1; mytarget = 4; } }
();
93
        if (!instance_exists(obj_darkener))
94
            instance_create(0, 0, obj_darkener);
95
        global.fc = 22;
96
        global.typer = 81;
97
        var createballoon = false;
98
        susietalks = 1;
99
        if (global.hp[2] > 0)
100
        {
101
            balloonturn++;
102
            if (balloonturn == 6)
103
            {
104
                msgsetloc(0, 
Heheh...Wait for inputClose Message
"Heheh.../%", "obj_knight_enemy_slash_Step_0_gml_146_0"
);
105
                ballooncon = 1;
106
                balloonend = 0;
107
                createballoon = true;
108
            }
109
            if (balloonturn == 7)
110
            {
111
                msgsetloc(0, 
Thing is,
you actually...Wait for inputClose Message
"Thing is,&you actually.../%", "obj_knight_enemy_slash_Step_0_gml_147_0"
);
112
                ballooncon = 2;
113
                balloonend = 0;
114
                createballoon = true;
115
            }
116
            if (balloonturn == 8)
117
            {
118
                msgsetloc(0, 
You? You're all
damn alone...Wait for inputClose Message
"You? You're all&damn alone.../%", "obj_knight_enemy_slash_Step_0_gml_148_0"
);
119
                ballooncon = 3;
120
                balloonend = 0;
121
                createballoon = true;
122
            }
123
            if (balloonturn == 9)
124
            {
125
                msgsetloc(0, 
Even... even if
you knock me down...Wait for inputClose Message
"Even... even if&you knock me down.../%", "obj_knight_enemy_slash_Step_0_gml_149_0"
);
126
                ballooncon = 4;
127
                balloonend = 0;
128
                createballoon = true;
129
            }
130
            if (balloonturn == 9 && global.hp[1] < 1 && global.hp[3] < 1)
131
            {
132
                msgsetloc(0, 
Even... even if
you knock them down...Wait for inputClose Message
"Even... even if&you knock them down.../%", "obj_knight_enemy_slash_Step_0_gml_150_0"
);
133
                ballooncon = 5;
134
                balloonend = 0;
135
                createballoon = true;
136
            }
137
            if (balloonturn == 10)
138
            {
139
                msgsetloc(0, 
As long as Kris has got
a hand to lift me up with...Wait for inputClose Message
"As long as Kris has got&a hand to lift me up with.../%", "obj_knight_enemy_slash_Step_0_gml_151_0"
);
140
                ballooncon = 6;
141
                balloonend = 0;
142
                createballoon = true;
143
            }
144
            if (balloonturn == 10 && global.hp[1] < 1 && global.hp[3] < 1)
145
            {
146
                msgsetloc(0, 
As long as I'm here to
lift them back up...Wait for inputClose Message
"As long as I'm here to&lift them back up.../%", "obj_knight_enemy_slash_Step_0_gml_152_0"
);
147
                ballooncon = 6;
148
                balloonend = 0;
149
                createballoon = true;
150
            }
151
            if (balloonturn == 11)
152
            {
153
                msgsetloc(0, 
So... give up.Wait for inputClose Message
"So... give up./%", "obj_knight_enemy_slash_Step_0_gml_153_0"
);
154
                ballooncon = 0;
155
                balloonend = 1;
156
                createballoon = true;
157
            }
158
            if (balloonturn == 12)
159
            {
160
                msgsetloc(0, 
You know you can't
win... so... give up!Wait for inputClose Message
"You know you can't&win... so... give up!/%", "obj_knight_enemy_slash_Step_0_gml_154_0"
);
161
                ballooncon = 0;
162
                balloonend = 1;
163
                createballoon = true;
164
            }
165
            if (balloonturn == 13)
166
            {
167
                msgsetloc(0, 
... You won't even...Wait for inputClose Message
"... You won't even.../%", "obj_knight_enemy_slash_Step_0_gml_155_0"
);
168
                ballooncon = 7;
169
                balloonend = 0;
170
                createballoon = true;
171
            }
172
            if (balloonturn == 14)
173
            {
174
                msgsetloc(0, 
... heh... heheheh...Wait for inputClose Message
"... heh... heheheh.../%", "obj_knight_enemy_slash_Step_0_gml_156_0"
);
175
                ballooncon = 8;
176
                balloonend = 0;
177
                createballoon = true;
178
            }
179
        }
180
        if (createballoon)
181
        {
182
            global.typer = 75;
183
            
scr_enemyblcon
scr_enemyblcon

function
scr_enemyblcon(arg0, arg1, arg2)
{ if (arg2 == 0) { mywriter = instance_create(arg0, arg1, obj_writer); return mywriter; } if (arg2 == 1) { myblcon = instance_create(arg0, arg1, obj_battleblcon); return myblcon; } if (arg2 == 2) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v; return myblcon; } if (arg2 == 3) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; return myblcon; } if (arg2 == 4) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.image_index = 0; myblcon.image_speed = 0; return myblcon; } if (arg2 == 5) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.image_index = 1; myblcon.image_speed = 0; return myblcon; } if (arg2 == 6) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_clubs; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 7) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_r; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 8) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_tall; return myblcon; } if (arg2 == 10) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.auto_length = 1; return myblcon; } if (arg2 == 11) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v2_left; return myblcon; } if (arg2 == 12) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v2_right; return myblcon; } if (arg2 == 12.1) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v2_right2; return myblcon; } if (arg2 == 12.2) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v2_right3; return myblcon; } if (arg2 == 12.3) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v2_right4; return myblcon; } if (arg2 == 12.4) { ...
(obj_herosusie.x + 92, obj_herosusie.y + 38, 14);
184
            
scr_guardpeek
scr_guardpeek

function
scr_guardpeek(arg0)
{ if (global.faceaction[arg0.myself] == 4) { var _peeker = 0; if (arg0 == obj_heroralsei) { obj_heroralsei.image_alpha = 0; _peeker =
scr_battle_marker(obj_heroralsei.x, obj_heroralsei.y, spr_ralsei_defend_peek);
_peeker.depth = obj_heroralsei.depth; _peeker.sourceobject = obj_heroralsei; _peeker.endanimation = spr_ralsei_redefend; } else if (arg0 == obj_herosusie) { obj_herosusie.image_alpha = 0; _peeker =
scr_battle_marker(obj_herosusie.x + 8, obj_herosusie.y + 4, spr_susie_defend_peek);
_peeker.depth = obj_herosusie.depth; _peeker.sourceobject = obj_herosusie; } return _peeker; } }
(obj_herosusie);
185
            myblcon.depth = depth - 100;
186
        }
187
        ralseitalks = 0;
188
        susietalks = 0;
189
        if (createballoon == false)
190
        {
191
            global.mnfight = 1.5;
192
        }
193
        else if (ballooncon == 0)
194
        {
195
            talked = 0.5;
196
            talktimer = 0;
197
        }
198
        else
199
        {
200
            talked = 0.6;
201
            talktimer = 0;
202
        }
203
        rtimer = 0;
204
    }
205
    if (talked == 0.5)
206
    {
207
        talktimer++;
208
        if ((button3_p() && talktimer > 15) || !i_ex(obj_writer))
209
        {
210
            with (obj_writer)
211
                instance_destroy();
212
            alarm[6]
 = 1;
gml_Object_obj_knight_enemy_Alarm_6.gml

if (balloonend == 1) { talked = 1; } else { talked = 0.6; talktimer = 0; }
213
        }
214
    }
215
    if (talked == 0.6)
216
    {
217
        talktimer++;
218
        if ((button3_p() && talktimer > 15) || !i_ex(obj_writer))
219
        {
220
            with (obj_writer)
221
                instance_destroy();
222
            if (ballooncon == 1)
223
            {
224
                msgsetloc(0, 
Didn't... think
we'd still be
standing, did you?Wait for inputClose Message
"Didn't... think&we'd still be&standing, did you?/%", "obj_knight_enemy_slash_Step_0_gml_203_0"
);
225
                ballooncon = 0;
226
                balloonend = 1;
227
            }
228
            else if (ballooncon == 2)
229
            {
230
                msgsetloc(0, 
You actually messed up,
picking a fight with US!Wait for inputClose Message
"You actually messed up,&picking a fight with US!/%", "obj_knight_enemy_slash_Step_0_gml_204_0"
);
231
                ballooncon = 0;
232
                balloonend = 1;
233
            }
234
            else if (ballooncon == 3)
235
            {
236
                msgsetloc(0, 
Me? I got...
Kris and Ralsei
behind me.Wait for inputClose Message
"Me? I got...&Kris and Ralsei&behind me./%", "obj_knight_enemy_slash_Step_0_gml_205_0"
);
237
                ballooncon = 0;
238
                balloonend = 1;
239
            }
240
            else if (ballooncon == 4)
241
            {
242
                msgsetloc(0, 
As long as Kris,
Ralsei, are here...Wait for inputClose Message
"As long as Kris,&Ralsei, are here.../%", "obj_knight_enemy_slash_Step_0_gml_206_0"
);
243
                ballooncon = 0;
244
                balloonend = 1;
245
            }
246
            else if (ballooncon == 5)
247
            {
248
                msgsetloc(0, 
As long as
I'm here...Wait for inputClose Message
"As long as&I'm here.../%", "obj_knight_enemy_slash_Step_0_gml_207_0"
);
249
                ballooncon = 0;
250
                balloonend = 1;
251
            }
252
            else if (ballooncon == 6)
253
            {
254
                msgsetloc(0, 
Heh... you're never gonna
win, you hear me?!Wait for inputClose Message
"Heh... you're never gonna&win, you hear me?!/%", "obj_knight_enemy_slash_Step_0_gml_208_0"
);
255
                ballooncon = 0;
256
                balloonend = 1;
257
            }
258
            else if (ballooncon == 7)
259
            {
260
                msgsetloc(0, 
... say a thing, huh...Wait for inputClose Message
"... say a thing, huh.../%", "obj_knight_enemy_slash_Step_0_gml_209_0"
);
261
                ballooncon = 0;
262
                balloonend = 1;
263
            }
264
            else if (ballooncon == 8)
265
            {
266
                msgsetloc(0, 
Man, I'm done talking.Wait for inputClose Message
"Man, I'm done talking./%", "obj_knight_enemy_slash_Step_0_gml_210_0"
);
267
                ballooncon = 9;
268
                balloonend = 0;
269
            }
270
            else if (ballooncon == 9)
271
            {
272
                msgsetloc(0, 
... people like you...
just piss me off.Wait for inputClose Message
"... people like you...&just piss me off./%", "obj_knight_enemy_slash_Step_0_gml_211_0"
);
273
                ballooncon = 0;
274
                balloonend = 1;
275
            }
276
            talked = 0.7;
277
            susietalks = 1;
278
            global.typer = 75;
279
            
scr_enemyblcon
scr_enemyblcon

function
scr_enemyblcon(arg0, arg1, arg2)
{ if (arg2 == 0) { mywriter = instance_create(arg0, arg1, obj_writer); return mywriter; } if (arg2 == 1) { myblcon = instance_create(arg0, arg1, obj_battleblcon); return myblcon; } if (arg2 == 2) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v; return myblcon; } if (arg2 == 3) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; return myblcon; } if (arg2 == 4) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.image_index = 0; myblcon.image_speed = 0; return myblcon; } if (arg2 == 5) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.image_index = 1; myblcon.image_speed = 0; return myblcon; } if (arg2 == 6) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_clubs; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 7) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_r; myblcon.image_index = 2; myblcon.image_speed = 0; return myblcon; } if (arg2 == 8) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long_tall; return myblcon; } if (arg2 == 10) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.auto_length = 1; return myblcon; } if (arg2 == 11) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v2_left; return myblcon; } if (arg2 == 12) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v2_right; return myblcon; } if (arg2 == 12.1) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v2_right2; return myblcon; } if (arg2 == 12.2) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v2_right3; return myblcon; } if (arg2 == 12.3) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_v2_right4; return myblcon; } if (arg2 == 12.4) { ...
(obj_herosusie.x + 92, obj_herosusie.y + 38, 14);
280
            
scr_guardpeek
scr_guardpeek

function
scr_guardpeek(arg0)
{ if (global.faceaction[arg0.myself] == 4) { var _peeker = 0; if (arg0 == obj_heroralsei) { obj_heroralsei.image_alpha = 0; _peeker =
scr_battle_marker(obj_heroralsei.x, obj_heroralsei.y, spr_ralsei_defend_peek);
_peeker.depth = obj_heroralsei.depth; _peeker.sourceobject = obj_heroralsei; _peeker.endanimation = spr_ralsei_redefend; } else if (arg0 == obj_herosusie) { obj_herosusie.image_alpha = 0; _peeker =
scr_battle_marker(obj_herosusie.x + 8, obj_herosusie.y + 4, spr_susie_defend_peek);
_peeker.depth = obj_herosusie.depth; _peeker.sourceobject = obj_herosusie; } return _peeker; } }
(obj_herosusie);
281
            myblcon.depth = depth - 100;
282
            ralseitalks = 0;
283
            susietalks = 0;
284
            alarm[6]
 = 1;
gml_Object_obj_knight_enemy_Alarm_6.gml

if (balloonend == 1) { talked = 1; } else { talked = 0.6; talktimer = 0; }
285
        }
286
    }
287
    if (talked == 1 && 
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") && !i_ex(obj_writer))
288
    {
289
        global.mnfight = 1.5;
290
        attackchosen = false;
291
    }
292
    if (global.mnfight == 1.5 && end_cutscene_version == 0)
293
    {
294
        if (!instance_exists(obj_growtangle))
295
        {
296
            event_user(0);
297
            setdownmessage = false;
298
            if (damagereduction >= 0.2 && damagereduction < 0.35)
299
                damagereduction += 0.01;
300
            if (myattackchoice == -1)
301
            {
302
            }
303
            else if (myattackchoice == 0)
304
            {
305
                instance_create((__view_get(e__VW.XView, 0) + 320) - 152, __view_get(e__VW.YView, 0) + 170, obj_growtangle);
306
            }
307
            else if (myattackchoice == 11)
308
            {
309
                instance_create(__view_get(e__VW.XView, 0) + 320, __view_get(e__VW.YView, 0) + 190, obj_growtangle);
310
            }
311
            else if (myattackchoice == 13)
312
            {
313
                instance_create(__view_get(e__VW.XView, 0) + 300, __view_get(e__VW.YView, 0) + 190, obj_growtangle);
314
            }
315
            else
316
            {
317
                instance_create(__view_get(e__VW.XView, 0) + 320, __view_get(e__VW.YView, 0) + 170, obj_growtangle);
318
            }
319
            if (myattackchoice == 0)
320
                obj_growtangle.maxxscale = 0.5;
321
            if (myattackchoice == 1)
322
            {
323
                obj_growtangle.maxxscale = 2.25;
324
                obj_growtangle.maxyscale = 1.75;
325
            }
326
            if (myattackchoice == 4)
327
            {
328
                obj_growtangle.maxxscale = 3.5;
329
                obj_growtangle.maxyscale = 3.5;
330
            }
331
            if (myattackchoice == 13)
332
                obj_growtangle.maxxscale = 3;
333
            if (myattackchoice == 15)
334
            {
335
            }
336
        }
337
        if (!instance_exists(obj_moveheart) && !i_ex(obj_heart) && myattackchoice != -1)
338
        {
339
            
scr_moveheart
scr_moveheart

function
scr_moveheart()
{ global.inv = 0; return instance_create(obj_herokris.x + 10, obj_herokris.y + 40, obj_moveheart); }
();
340
            if (myattackchoice == 13)
341
            {
342
                with (obj_moveheart)
343
                {
344
                    distx = obj_growtangle.x - 40;
345
                    disty = obj_growtangle.y - 8;
346
                    dist = point_distance(x, y, distx, disty);
347
                    move_towards_point(distx, disty, dist / flytime);
348
                }
349
            }
350
        }
351
        global.mnfight = 2;
352
        
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(90);
353
    }
354
    if (
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; }
("bullets") && attacked == 0 && end_cutscene_version == 0)
355
    {
356
        rtimer += 1;
357
        if (rtimer == 12)
358
        {
359
            aoedamage = false;
360
            if (myattackchoice == 0)
361
            {
362
                global.monsterattackname[myself] = "Swordslash";
363
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
364
                dc.type = 109;
365
                dc.difficulty = difficulty;
366
                global.invc = 0.4;
367
            }
368
            else if (myattackchoice == 1)
369
            {
370
                global.monsterattackname[myself] = "Stars";
371
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
372
                dc.type = 98;
373
                dc.difficulty = difficulty;
374
                global.invc = 1;
375
            }
376
            else if (myattackchoice == 2)
377
            {
378
                global.monsterattackname[myself] = "Flurry";
379
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
380
                dc.type = 99;
381
                dc.difficulty = difficulty;
382
                global.invc = 0.4;
383
            }
384
            else if (myattackchoice == 3)
385
            {
386
                global.monsterattackname[myself] = "swordtunnel";
387
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
388
                dc.type = 102;
389
                global.invc = 0.4;
390
            }
391
            else if (myattackchoice == 4)
392
            {
393
                global.monsterattackname[myself] = "xattacks";
394
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
395
                dc.type = 103;
396
                global.invc = 0.4;
397
            }
398
            else if (myattackchoice == 5)
399
            {
400
                global.monsterattackname[myself] = "rotatingslash";
401
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
402
                dc.type = 104;
403
                dc.difficulty = difficulty;
404
                global.invc = 1;
405
            }
406
            else if (myattackchoice == 6)
407
            {
408
                global.monsterattackname[myself] = "underboxattack";
409
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
410
                dc.type = 106;
411
                global.invc = 0.4;
412
            }
413
            else if (myattackchoice == 7)
414
            {
415
                global.monsterattackname[myself] = "combinationattack";
416
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
417
                dc.type = 105;
418
                global.invc = 0.4;
419
            }
420
            else if (myattackchoice == 9)
421
            {
422
                global.monsterattackname[myself] = "roaring";
423
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
424
                dc.type = 107;
425
                global.invc = 1;
426
            }
427
            else if (myattackchoice == 10)
428
            {
429
                global.monsterattackname[myself] = "swords falling";
430
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
431
                dc.type = 108;
432
                dc.difficulty = difficulty;
433
                global.invc = 0.4;
434
            }
435
            else if (myattackchoice == 11)
436
            {
437
                global.monsterattackname[myself] = "tracking swords";
438
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
439
                dc.type = 151;
440
                dc.difficulty = 0;
441
                dc.damage = 206;
442
                global.invc = 0.4;
443
            }
444
            else if (myattackchoice == 12)
445
            {
446
                global.monsterattackname[myself] = "diagonal bullets";
447
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
448
                dc.type = 152;
449
                dc.difficulty = difficulty;
450
                global.invc = 0.4;
451
            }
452
            else if (myattackchoice == 13)
453
            {
454
                global.monsterattackname[myself] = "sword tunnel new";
455
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
456
                dc.type = 153;
457
                dc.difficulty = difficulty;
458
                dc.damage = 62;
459
                global.invc = 0.14;
460
            }
461
            else if (myattackchoice == 14)
462
            {
463
                global.monsterattackname[myself] = "tracking swords";
464
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
465
                dc.type = 151;
466
                dc.difficulty = 3;
467
                dc.damage = 206;
468
                global.invc = 0.4;
469
            }
470
            else if (myattackchoice == 15)
471
            {
472
                global.monsterattackname[myself] = "sword vortex";
473
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
474
                dc.type = 154;
475
                dc.difficulty = 3;
476
                dc.damage = 206;
477
                global.monsterattackname[myself] = "tracking swords";
478
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
479
                dc.type = 151;
480
                dc.difficulty = 0;
481
                dc.damage = 206;
482
                global.invc = 0.4;
483
            }
484
            else if (myattackchoice == 16)
485
            {
486
                global.monsterattackname[myself] = "rotatingslash";
487
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
488
                dc.type = 104;
489
                dc.difficulty = 0;
490
                global.monsterattackname[myself] = "tracking swords";
491
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
492
                dc.type = 151;
493
                dc.difficulty = 0;
494
                dc.damage = 206;
495
                global.invc = 0.4;
496
            }
497
            else if (myattackchoice == 17)
498
            {
499
                global.monsterattackname[myself] = "tracking swords";
500
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
501
                dc.type = 151;
502
                dc.difficulty = 2;
503
                dc.damage = 206;
504
                global.invc = 0.4;
505
            }
506
            if (myattackchoice == -1)
507
            {
508
                chargeupcon = 1;
509
            }
510
            else if (myattackchoice == 20)
511
            {
512
                global.monsterattackname[myself] = "knightlines";
513
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.creatorid = id; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
514
                dc.type = 101;
515
            }
516
            if (myattackchoice == 7)
517
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(270);
518
            else if (myattackchoice == 2)
519
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(350);
520
            else if (myattackchoice == 0 && difficulty == 0)
521
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(300);
522
            else if (myattackchoice == 0 && difficulty == 1)
523
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(300);
524
            else if (myattackchoice == 11 && difficulty == 0)
525
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(292);
526
            else if (myattackchoice == 11)
527
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(300);
528
            else if (myattackchoice == 12)
529
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(300);
530
            else if (myattackchoice == 13 && difficulty == 3)
531
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(360);
532
            else if (myattackchoice == 13)
533
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(330);
534
            else if (myattackchoice == 14)
535
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(300);
536
            else if (myattackchoice == 15)
537
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(300);
538
            else
539
                
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(240);
540
            if (damagereductiontimer >= 750)
541
                global.monstername[myself] = stringsetloc(
Knight
"Knight", "obj_knight_enemy_slash_Step_0_gml_281_0"
);
542
            turns += 1;
543
            global.typer = 6;
544
            global.fc = 0;
545
            if (phase == 1)
546
            {
547
                if (phaseturn == 0)
548
                    global.battlemsg[0] = stringsetloc(
* You felt lightheaded.
* You saw silver stars...
"* You felt lightheaded.&* You saw silver stars...", "obj_knight_enemy_slash_Step_0_gml_496_0"
);
549
                if (phaseturn == 1)
550
                    global.battlemsg[0] = stringsetloc(
* You felt something hovering close behind your head...
"* You felt something hovering close behind your head...", "obj_knight_enemy_slash_Step_0_gml_521_0"
);
551
                if (phaseturn == 2)
552
                    global.battlemsg[0] = stringsetloc(
* Suddenly, the north wind blew fiercely.
"* Suddenly, the north wind blew fiercely.", "obj_knight_enemy_slash_Step_0_gml_498_0"
);
553
                if (phaseturn == 3)
554
                    global.battlemsg[0] = stringsetloc(
* Your vision narrows.
"* Your vision narrows.", "obj_knight_enemy_slash_Step_0_gml_499_0"
);
555
                if (phaseturn == 4)
556
                    global.battlemsg[0] = stringsetloc(
* Your chest feels tight.
"* Your chest feels tight.", "obj_knight_enemy_slash_Step_0_gml_500_0"
);
557
            }
558
            if (phase == 2)
559
            {
560
                if (phaseturn == 0)
561
                    global.battlemsg[0] = stringsetloc(
* You felt lightheaded.
* You saw golden stars...
"* You felt lightheaded.&* You saw golden stars...", "obj_knight_enemy_slash_Step_0_gml_504_0"
);
562
                if (phaseturn == 1)
563
                    global.battlemsg[0] = stringsetloc(
* Suddenly, the north and east winds blew fiercely.
"* Suddenly, the north and east winds blew fiercely.", "obj_knight_enemy_slash_Step_0_gml_505_0"
);
564
                if (phaseturn == 2)
565
                    global.battlemsg[0] = stringsetloc(
* Your vision narrows.
* ... Your head is spinning.
"* Your vision narrows.&* ... Your head is spinning.", "obj_knight_enemy_slash_Step_0_gml_506_0"
);
566
                if (phaseturn == 3)
567
                    global.battlemsg[0] = stringsetloc(
* You feel surrounded.
"* You feel surrounded.", "obj_knight_enemy_slash_Step_0_gml_531_0"
);
568
                if (phaseturn == 4)
569
                    global.battlemsg[0] = stringsetloc(
* You felt your chest twisting.
"* You felt your chest twisting.", "obj_knight_enemy_slash_Step_0_gml_508_0"
);
570
            }
571
            if (phase == 3)
572
            {
573
                if (phaseturn == 0)
574
                    global.battlemsg[0] = stringsetloc(
* You felt lightheaded.
* You felt a migraine coming on...
"* You felt lightheaded.&* You felt a migraine coming on...", "obj_knight_enemy_slash_Step_0_gml_514_0"
);
575
                if (phaseturn == 1)
576
                    global.battlemsg[0] = stringsetloc(
* Suddenly, a tempest.
"* Suddenly, a tempest.", "obj_knight_enemy_slash_Step_0_gml_515_0"
);
577
                if (phaseturn == 2)
578
                    global.battlemsg[0] = stringsetloc(
* Your vision narrows.
* ... The world revolves around you.
"* Your vision narrows.&* ... The world revolves around you.", "obj_knight_enemy_slash_Step_0_gml_516_0"
);
579
                if (phaseturn == 3)
580
                    global.battlemsg[0] = stringsetloc(
* You feel cornered.
"* You feel cornered.", "obj_knight_enemy_slash_Step_0_gml_541_0"
);
581
                if (phaseturn == 4)
582
                    global.battlemsg[0] = stringsetloc(
* Your heartbeat becomes twisted.
"* Your heartbeat becomes twisted.", "obj_knight_enemy_slash_Step_0_gml_518_0"
);
583
            }
584
            if (phase == 4 || haveusedroaring == true)
585
            {
586
                if (phase4turn == 2)
587
                    global.battlemsg[0] = stringsetloc(
* The Knight's hands glow a strange color...
"* The Knight's hands glow a strange color...", "obj_knight_enemy_slash_Step_0_gml_319_0"
);
588
                if (phase4turn > 2)
589
                    global.battlemsg[0] = stringsetloc(
* The enemy suddenly let down its guard!
"* The enemy suddenly let down its guard!", "obj_knight_enemy_slash_Step_0_gml_321_0"
);
590
                if (phase4turn == 3 && progamer == true)
591
                    global.battlemsg[0] = stringsetloc(
* Kris coughed.
* The enemy slowly tilted its head...
"* Kris coughed.&* The enemy slowly tilted its head...", "obj_knight_enemy_slash_Step_0_gml_322_0"
);
592
            }
593
            attacked = 1;
594
        }
595
    }
596
    if (global.mnfight == 2 && global.turntimer <= 1 && setdownmessage == false)
597
    {
598
        setdownmessage = true;
599
        if (global.monsterhp[myself] <= (global.monstermaxhp[myself] * 0.8) && haveusedroaring == false && phase != 4)
600
            phase = 4;
601
        if (phase == 4 && phase4turn < 3)
602
        {
603
            if (phase4turn == 0)
604
                global.battlemsg[0] = stringsetloc(
* Your heartbeat becomes twisted.
"* Your heartbeat becomes twisted.", "obj_knight_enemy_slash_Step_0_gml_547_0"
);
605
            if (phase4turn == 1 && global.hp[2] > 0)
606
                global.battlemsg[0] = stringsetloc(
* Susie grew pale.
"* Susie grew pale.", "obj_knight_enemy_slash_Step_0_gml_548_0"
);
607
            if (phase4turn == 1 && global.hp[2] < 1)
608
                global.battlemsg[0] = stringsetloc(
* Susie struggled to give some kind of warning.
"* Susie struggled to give some kind of warning.", "obj_knight_enemy_slash_Step_0_gml_317_0"
);
609
        }
610
        else
611
        {
612
            var krisdown = "";
613
            var susiedown = "";
614
            var ralseidown = "";
615
            var downcount = 0;
616
            if (krisdownmessage == false && global.hp[1] < 1)
617
            {
618
                krisdown = stringsetloc(
* Kris kneeled in silence.
"* Kris kneeled in silence.&", "obj_knight_enemy_slash_Step_0_gml_343_0"
);
619
                downcount++;
620
                krisdownmessage = true;
621
                global.battlemsg[0] = krisdown;
622
            }
623
            if (susiedownmessage == false && global.hp[2] < 1)
624
            {
625
                susiedown = stringsetloc(
* Susie was hurt and beaten.
"* Susie was hurt and beaten.&", "obj_knight_enemy_slash_Step_0_gml_344_0"
);
626
                downcount++;
627
                susiedownmessage = true;
628
                global.battlemsg[0] = susiedown;
629
            }
630
            if (ralseidownmessage == false && global.hp[3] < 1)
631
            {
632
                ralseidown = stringsetloc(
* Ralsei became a pile of fluff.
"* Ralsei became a pile of fluff.&", "obj_knight_enemy_slash_Step_0_gml_345_0"
);
633
                downcount++;
634
                ralseidownmessage = true;
635
                global.battlemsg[0] = ralseidown;
636
            }
637
            if (downcount == 2)
638
                global.battlemsg[0] = krisdown + susiedown + ralseidown;
639
        }
640
    }
641
    if (global.hp[1] < 1 && global.hp[2] < 1 && global.hp[3] < 1 && global.turntimer > 0)
642
    {
643
        global.turntimer = 0;
644
        with (obj_lerpvar)
645
            instance_destroy();
646
        with (obj_script_delayed)
647
            instance_destroy();
648
        with (obj_afterimage_grow)
649
            instance_destroy();
650
    }
651
    if (global.mnfight == 2 && global.turntimer < 1 && global.hp[1] < 1 && global.hp[2] < 1 && global.hp[3] < 1 && endcon == 0)
652
    {
653
        endcon = 1;
654
        with (obj_particle_generic)
655
            instance_destroy();
656
        if (scr_get_knight_total_attempts() > 0)
657
        {
658
            
scr_gameover
scr_gameover

function
scr_gameover()
{ if (global.flag[35 gameover_mode] == 0) { audio_stop_all(); snd_play(snd_hurt1); global.screenshot = sprite_create_from_surface(application_surface, 0, 0, __view_get(e__VW.WView, 0), __view_get(e__VW.HView, 0), 0, 0, 0, 0); snd_free_all(); room_goto(room_gameover ); } if (global.flag[35 gameover_mode] == 1) { global.turntimer = -1; global.flag[36 dojo_failure] = 1; global.flag[39 dojo_abort?] = 1; } if (global.flag[35 gameover_mode] == 2) { audio_stop_all(); snd_play(snd_hurt1); snd_free_all(); global.entrance = 0; global.tempflag[9] = 1; global.fighting = 0; global.interact = 0; global.hp[0] = 1; global.hp[1] = 1; global.hp[2] = 1; global.hp[3] = 1; __room = room; if (global.chapter == 2) { with (instance_create(0, 0, obj_persistentfadein)) image_alpha = 1.2; } room_goto(__room); } } enum e__VW { XView, YView, WView, HView, Angle, HBorder, VBorder, HSpeed, VSpeed, Object, Visible, XPort, YPort, WPort, HPort, Camera, SurfaceID }
();
659
        }
660
        else
661
        {
662
            obj_battlecontroller.noreturn = 1;
663
            obj_battlecontroller.intro = 2;
664
            with (obj_tensionbar)
665
            {
666
alarm[5]
667
                hspeed = -10;
668
                friction = -0.4;
669
            }
670
            mus_volume(global.batmusic[1], 0, 90);
671
            event_user(3);
672
            global.fighting = 0;
673
        }
674
    }
675
}
676
if (global.myfight == 3)
677
{
678
    xx = __view_get(e__VW.XView, 0);
679
    yy = __view_get(e__VW.YView, 0);
680
    if (acting == 1 && actcon == 0)
681
    {
682
        actcon = 1;
683
        checkcount++;
684
        if (checkcount == 1)
685
        {
686
            msgsetloc(0, 
* Kris analyzed the enemy!Wait for input
"* Kris analyzed the enemy!/", "obj_knight_enemy_slash_Step_0_gml_393_0"
);
687
            msgnextloc(
* But Kris
couldn't learn anything.Wait for inputClose Message
"* But Kris&couldn't learn anything./%", "obj_knight_enemy_slash_Step_0_gml_394_0"
);
688
        }
689
        else
690
        {
691
            msgsetloc(0, 
* Kris points into the distance.Wait for input
"* Kris points into the distance./", "obj_knight_enemy_slash_Step_0_gml_398_0"
);
692
            msgnextloc(
* Nothing happened.Wait for inputClose Message
"* Nothing happened./%", "obj_knight_enemy_slash_Step_0_gml_399_0"
);
693
        }
694
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
695
    }
696
    if (acting == 2 && actcon == 0)
697
    {
698
        actcon = 1;
699
        holdbreathcount++;
700
        if (holdbreathcount <= 1)
701
            msgsetloc(0, 
* Kris held their breath.
* Their heartbeat quickened.
* The SOUL now moves faster.Wait for inputClose Message
"* Kris held their breath.&* Their heartbeat quickened.&* The SOUL now moves faster./%", "obj_knight_enemy_slash_Step_0_gml_497_0"
);
702
        if (holdbreathcount > 1)
703
            msgsetloc(0, 
* Kris held their breath...
* Kris smiled.
* Nothing happened.Wait for inputClose Message
"* Kris held their breath...&* Kris smiled.&* Nothing happened./%", "obj_knight_enemy_slash_Step_0_gml_415_0"
);
704
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
705
        holdbreathcount = 1;
706
    }
707
    if (actingsus == 1 && actconsus == 1)
708
    {
709
        
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("noone");
710
        msgsetloc(0, 
* Susie talked to the Knight!Wait for input
"* Susie talked to the Knight!/", "obj_knight_enemy_slash_Step_0_gml_424_0"
);
711
        
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("susie", "J");
712
        msgnextloc(
Face J* I don't know what the hell you are, but...Wait for input
"\\EJ* I don't know what the hell you are, but.../", "obj_knight_enemy_slash_Step_0_gml_426_0"
);
713
        msgnextloc(
Face J* Leave Toriel alone! You hear me!?Wait for input
"\\EJ* Leave Toriel alone! You hear me!?/", "obj_knight_enemy_slash_Step_0_gml_427_0"
);
714
        msgnextloc(
Face V* ...Wait for input
"\\EV* .../", "obj_knight_enemy_slash_Step_0_gml_428_0"
);
715
        msgnextloc(
Face W* ... Fine, you don't wanna listen?Wait for input
"\\EW* ... Fine, you don't wanna listen?/", "obj_knight_enemy_slash_Step_0_gml_429_0"
);
716
        msgnextloc(
Face X* Then we'll just. Have to do things the hard way.Wait for input
"\\EX* Then we'll just. Have to do things the hard way./", "obj_knight_enemy_slash_Step_0_gml_430_0"
);
717
        
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("none", 0);
718
        msgnextloc(
* (Susie will not ACT any more.)Wait for inputClose Message
"* (Susie will not ACT any more.)/%", "obj_knight_enemy_slash_Step_0_gml_432_0"
);
719
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
720
        sactcount = 1;
721
        actcon = 1;
722
        actconsus = 0;
723
        global.canactsus[myself][0] = 0;
724
        global.actnamesus[myself][0] = "";
725
        global.actsimulsus[myself][0] = 0;
726
        global.actactorsus[myself][0] = 0;
727
        global.actcostsus[myself][0] = 0;
728
        global.battlespell[1][0] = 0;
729
        global.battlespell[1][0] = -1;
730
        global.battleactcount[1] = 0;
731
        global.battlespellname[1][0] = "";
732
        global.battlespelldesc[1][0] = "";
733
        
scr_spellmenu_setup
scr_spellmenu_setup

function
scr_spellmenu_setup()
{ var __actnamecheck = 0; var __monstertype = global.monstertype[0]; for (__i = 1; __i < 3; __i++) { if (global.monster[__i] == 1 && global.monstertype[__i] != __monstertype) __actnamecheck = 1; } for (__i = 0; __i < 3; __i++) { for (__fj = 0; __fj < 6; __fj++) { global.battlespell[__i][__fj] = 0; if (global.char[__i] == 1) { if (global.canact[0][__fj] == 1) { global.battlespell[__i][__fj] = -1; if (global.battleactcount[__i] < (__fj + 1)) global.battleactcount[__i] = __fj + 1; global.battlespellcost[__i][__fj] = global.actcost[0][__fj]; global.battlespellname[__i][__fj] = global.actname[0][__fj]; global.battlespelldesc[__i][__fj] = global.actdesc[0][__fj]; global.battlespelltarget[__i][__fj] = 0; global.battlespellspecial[__i][__fj] = 1; } } if (global.char[__i] == 2) { if (global.canactsus[0][__fj] == 1) { global.battlespell[__i][__fj] = -1; if (global.battleactcount[__i] < (__fj + 1)) global.battleactcount[__i] = __fj + 1; global.battlespellcost[__i][__fj] = global.actcostsus[0][__fj]; global.battlespellname[__i][__fj] = global.actnamesus[0][__fj]; if (__actnamecheck) global.battlespellname[__i][__fj] = stringsetloc(
S-Action
"S-Action", "scr_monstersetup_slash_scr_monstersetup_gml_1053_0"
);
if (__actnamecheck && global.chapter == 3 && i_ex(obj_elnina_lanino_controller)) global.battlespellname[__i][__fj] = stringsetloc(
ILoveTV
"ILoveTV", "scr_spellmenu_setup_slash_scr_spellmenu_setup_gml_39_0"
);
global.battlespelldesc[__i][__fj] = global.actdescsus[0][__fj]; global.battlespelltarget[__i][__fj] = 2; global.battlespellspecial[__i][__fj] = 2; } } if (global.char[__i] == 3) { if (global.canactral[0][__fj] == 1) { global.battlespell[__i][__fj] = -1; if (global.battleactcount[__i] < (__fj + 1)) global.battleactcount[__i] = __fj + 1; global.battlespellcost[__i][__fj] = global.actcostral[0][__fj]; global.battlespellname[__i][__fj] = global.actnameral[0][__fj]; if (__actnamecheck) global.battlespellname[__i][__fj] = stringsetloc(
R-Action
"R-Action", "scr_monstersetup_slash_scr_monstersetup_gml_1057_0"
);
if (__actnamecheck && global.chapter == 3 && i_ex(obj_elnina_lanino_controller)) global.battlespellname[__i][__fj] = stringsetloc(
ILoveTV
"ILoveTV", "scr_spellmenu_setup_slash_scr_spellmenu_setup_gml_54_0"
);
global.battlespelldesc[__i][__fj] = global.actdescral[0][__fj]; global.battlespelltarget[__i][__fj] = 2; global.battlespellspecial[__i][__fj] = 3; } } if (global.char[__i] == 4) { if (global.canactnoe[0][__fj] == 1) { global.battlespell[__i][__fj] = -1; if (global.battleactcount[__i] < (__fj + 1)) global.battleactcount[__i] = __fj + 1; global.battlespellcost[__i][__fj] = global.actcostnoe[0][__fj]; global.battlespellname[__i][__fj] = global.actnamenoe[0][__fj]; if (__actnamecheck) global.battlespellname[__i][__fj] = stringsetloc(
N-Action
"N-Action", "scr_monstersetup_slash_scr_monstersetup_gml_1061_0"
);
global.battlespelldesc[__i][__fj] = global.actdescnoe[0][__fj]; global.battlespelltarget[__i][__fj] = 2; global.battlespellspecial[__i][__fj] = 4; } } } }
scr_spellinfo_all();
for (__i = 0; __i < 3; __i++) { for (__fj = 0; __fj < 12; __fj++) { __ib = global.battleactcount[__i] + __fj; global.battlespell[__i][__ib] = global.spell[global.char[__i]][__fj]; global.battlespellcost[__i][__ib] = global.spellcost[global.char[__i]][__fj]; global.battlespellname[__i][__ib] = global.spellnameb[global.char[__i]][__fj]; global.battlespelldesc[__i][__ib] = global.spelldescb[global.char[__i]][__fj]; global.battlespelltarget[__i][__ib] = global.spelltarget[global.char[__i]][__fj]; } } }
();
734
    }
735
    if (actingral == 1 && actconral == 1)
736
    {
737
        ractcount++;
738
        if (ractcount == 1)
739
        {
740
            
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("noone");
741
            msgsetloc(0, 
* Ralsei tried talking...Wait for input
"* Ralsei tried talking.../", "obj_knight_enemy_slash_Step_0_gml_461_0"
);
742
            
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("ralsei", "Q");
743
            msgnextloc(
Face Q* Please... please, don't do this...Wait for input
"\\EQ* Please... please, don't do this.../", "obj_knight_enemy_slash_Step_0_gml_463_0"
);
744
            msgnextloc(
Face e* If the Roaring happens, then... then...Wait for input
"\\Ee* If the Roaring happens, then... then.../", "obj_knight_enemy_slash_Step_0_gml_464_0"
);
745
            msgnextloc(
Face Z* Please... stop...!Wait for input
"\\EZ* Please... stop...!/", "obj_knight_enemy_slash_Step_0_gml_465_0"
);
746
            
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("none", 0);
747
            msgnextloc(
* (... but nothing happened.)Wait for inputClose Message
"* (... but nothing happened.)/%", "obj_knight_enemy_slash_Step_0_gml_467_0"
);
748
            
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("noone");
749
        }
750
        else
751
        {
752
            
scr_speaker
scr_speaker

function
scr_speaker(arg0)
{ _speaker = arg0; global.typer = 5; if (global.darkzone == 1) global.typer = 6; if (global.fighting == 1) global.typer = 4; global.fc = 0; global.fe = 0; if (_speaker == "silent" && global.darkzone == 0) global.typer = 2; if (_speaker == "silent" && global.darkzone == 1) global.typer = 36; if (_speaker == "balloon" || _speaker == "enemy") global.typer = 50; if (_speaker == "sans") { global.typer = 14; global.fc = 6; } if (_speaker == "undyne" || _speaker == "und") { global.typer = 17; global.fc = 9; } if (_speaker == "temmie" || _speaker == "tem") global.typer = 21; if (_speaker == "jevil") global.typer = 35; if (_speaker == "catti") global.fc = 13; if (_speaker == "jockington" || _speaker == "joc") global.fc = 14; if (_speaker == "catty" || _speaker == "caddy") global.fc = 16; if (_speaker == "bratty" || _speaker == "bra") global.fc = 17; if (_speaker == "rouxls" || _speaker == "rou") global.fc = 18; if (_speaker == "burgerpants" || _speaker == "bur") global.fc = 19; if (_speaker == "spamton") { if (global.fighting == 0) global.typer = 66; else global.typer = 68; } if (_speaker == "sneo") global.typer = 67; if (_speaker == "tenna") { global.typer = 80; if (global.fighting == 1) global.typer = 81; } if (_speaker == "susie" || _speaker == "sus") { global.fc = 1; global.typer = 10; if (global.darkzone == 1) { global.typer = 30; if (global.fighting == 1) global.typer = 47; } } if (_speaker == "ralsei" || _speaker == "ral") { global.fc = 2; global.typer = 31; if (global.fighting == 1) global.typer = 45; if (global.flag[30 ralsei_hat_state] == 1) global.typer = 6; } if (_speaker == "noelle" || _speaker == "noe") { global.fc = 3; if (global.darkzone == 0) global.typer = 12; else global.typer = 56; if (global.fighting == 1) global.typer = 59; } if (_speaker == "toriel" || _speaker == "tor") { global.fc = 4; global.typer = 7; } if (_speaker == "asgore" || _speaker == "asg") { global.fc = 10; global.typer = 18; } if (_speaker == "king" || _speaker == "kin") { global.fc = 20; global.typer = 33; ...
("noone");
753
            msgsetloc(0, 
* Ralsei tried talking...Wait for input
"* Ralsei tried talking.../", "obj_knight_enemy_slash_Step_0_gml_473_0"
);
754
            
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("ralsei", "8");
755
            msgnextloc(
Face 8* Please, stop...Wait for input
"\\E8* Please, stop.../", "obj_knight_enemy_slash_Step_0_gml_475_0"
);
756
            
scr_anyface_next
scr_anyface_next

function
scr_anyface_next(arg0, arg1)
{ global.msgno++;
scr_anyface(arg0, global.msgno, arg1);
}
("none", 0);
757
            msgnextloc(
* (... but nothing happened.)Wait for inputClose Message
"* (... but nothing happened.)/%", "obj_knight_enemy_slash_Step_0_gml_477_0"
);
758
        }
759
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
760
        actcon = 1;
761
        actconral = 0;
762
    }
763
    if (actcon == 20 || actconsus == 20 || actconral == 20)
764
    {
765
        if (
scr_terminate_writer
scr_terminate_writer

function
scr_terminate_writer()
{ __writerkilled = 0; __writerkillable = 0; __writerended = 0; if (instance_exists(obj_writer)) { obj_writer.__endcheckid = id; with (obj_writer) { if (reachedend == 1) { with (__endcheckid) __writerended++; } } if (__writerended == instance_number(obj_writer)) __writerkillable = 1; } else { __writerkilled = 1; } if (button1_p() && __writerkillable == 1) { with (obj_writer) instance_destroy(); __writerkilled = 1; } return __writerkilled; }
())
766
        {
767
            actconsus = -1;
768
            actconral = -1;
769
            actcon = 1;
770
        }
771
    }
772
    if (actcon == 1 && !instance_exists(obj_writer))
773
        
scr_nextact
scr_nextact

function
scr_nextact()
{ global.acting[0] = 0; global.acting[1] = 0; global.acting[2] = 0; global.actingsingle[global.currentactingchar] = 0; __minstance = global.monsterinstance[global.actingtarget[global.currentactingchar]]; with (__minstance) { acting = 0; actcon = 0; actconsus = 0; actconral = 0; actconnoe = 0; } var singleactcomplete = 0; while (global.currentactingchar < 3) { global.currentactingchar++; if (global.currentactingchar < 3) { if (global.actingsingle[global.currentactingchar] == 1) { __minstance = global.monsterinstance[global.actingtarget[global.currentactingchar]]; if (global.char[global.currentactingchar] == 2) { with (__minstance) actconsus = 1; if (global.actingsimul[global.currentactingchar] == 0) singleactcomplete = 1; break; } if (global.char[global.currentactingchar] == 3) { with (__minstance) actconral = 1; if (global.actingsimul[global.currentactingchar] == 0) singleactcomplete = 1; break; } if (global.char[global.currentactingchar] == 4) { with (__minstance) actconnoe = 1; if (global.actingsimul[global.currentactingchar] == 0) singleactcomplete = 1; break; } } } } if (global.currentactingchar >= 3) { with (obj_monsterparent) { acting = 0; actingsus = 0; actingral = 0; actingnoe = 0; } global.currentactingchar = 0;
scr_attackphase();
} else if (!singleactcomplete) {
scr_act_simul();
} }
();
774
}
775
if (state == 3)
776
    
scr_enemy_hurt
scr_enemy_hurt

function
scr_enemy_hurt()
{ hurttimer -= 1; if (hurttimer < 0) { state = 0; } else { if (global.monster[myself] == 0)
scr_defeatrun();
hurtshake += 1; if (hurtshake > 1) { if (shakex > 0) shakex -= 1; if (shakex < 0) shakex += 1; shakex = -shakex; hurtshake = 0; } } }
();
777
if (end_cutscene_version == 1)
778
{
779
    endtimer++;
780
    if (endtimer == 32)
781
    {
782
        
scr_fadeout
scr_fadeout

function
scr_fadeout(arg0)
{ __fadeouter = instance_create(camerax() - 200, cameray() - 200, obj_fadeout); __fadeouter.fadespeed = 1 / arg0; __fadeouter.depth = 3; return __fadeouter; }
(15);
783
        with (obj_fadeout)
784
        {
785
            image_blend = c_white;
786
            x -= 40;
787
            length *= 2;
788
        }
789
    }
790
    if (endcon == 1 && endtimer > 45)
791
    {
792
        global.flag[50 last_encounter_end] = 0;
793
        global.flag[51 last_monster_end_0] = 1;
794
        with (obj_attackpress)
795
            instance_destroy();
796
        with (obj_dmgwriter)
797
            instance_destroy();
798
        with (obj_ch3_PTB02)
799
            teamdefeated = false;
800
        endcon = 2;
801
        obj_battlecontroller.noreturn = 1;
802
        obj_battlecontroller.intro = 2;
803
        with (obj_tensionbar)
804
        {
805
alarm[5]
806
            hspeed = -10;
807
            friction = -0.4;
808
        }
809
        event_user(3);
810
        global.fighting = 0;
811
        mus_volume(global.batmusic[1], 0, 90);
812
    }
813
}
814
if (chargeupcon == 1)
815
{
816
    chargeuptimer++;
817
    if (chargeuptimer == 1)
818
        snd_play(snd_knight_powerup_white);
819
    if ((chargeuptimer % 4) == 0 && chargeuptimer > 10)
820
    {
821
        fade = instance_create_depth(x, y, depth + 1, obj_afterimage_fade_to_white);
822
        fade.sprite_index = sprite_index;
823
        fade.image_index = image_index;
824
        fade.image_speed = 0;
825
        fade.image_xscale = image_xscale;
826
        fade.image_yscale = image_yscale;
827
        fade.image_alpha = 0.6;
828
        fade.speed = 4;
829
        fade.direction = random(360);
830
    }
831
    if (chargeuptimer == 60)
832
        global.turntimer = 1;
833
}
834
835
enum e__VW
836
{
837
    XView,
838
    YView,
839
    WView,
840
    HView,
841
    Angle,
842
    HBorder,
843
    VBorder,
844
    HSpeed,
845
    VSpeed,
846
    Object,
847
    Visible,
848
    XPort,
849
    YPort,
850
    WPort,
851
    HPort,
852
    Camera,
853
    SurfaceID
854
}