Deltarune (Chapter 5) script viewer

← back to main script listing

gml_Object_obj_terracota_enemy_Step_0

related scripts: Alarm_4Create_0Draw_0Other_22Step_0

(view raw script w/o annotations or w/e)
1
if (global.monster[myself] == 1)
2
{
3
    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)
4
    {
5
        
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; } }
();
6
        setbattlemsg = false;
7
        myattackchoice = 0;
8
        if (!instance_exists(obj_darkener))
9
            instance_create(0, 0, obj_darkener);
10
        global.typer = 50;
11
        rr = choose(0, 1, 2);
12
        if (global.flag[1750] == 0)
13
        {
14
            msgsetloc(0, 
PROTECT
...Delay 11 KING
"PROTECT&..^1. KING", "obj_terracota_enemy_slash_Step_0_gml_17_0"
);
15
            global.flag[1750] = 1;
16
        }
17
        else
18
        {
19
            if (rr == 0)
20
                msgsetloc(0, 
GOLDHAIR
GIVE WATER
...Delay 11 FRAIND
"GOLDHAIR&GIVE WATER&..^1. FRAIND", "obj_terracota_enemy_slash_Step_0_gml_22_0"
);
21
            if (rr == 1)
22
                msgsetloc(0, 
HUMAN...
DIGGING
...Delay 11
NO GOOD
"HUMAN...&DIGGING&..^1. &NO GOOD", "obj_terracota_enemy_slash_Step_0_gml_23_0"
);
23
            if (rr == 2)
24
                msgsetloc(0, 
LITTLE
DIRT
NEVER
HURT
"LITTLE&DIRT&NEVER&HURT", "obj_terracota_enemy_slash_Step_0_gml_24_0"
);
25
        }
26
        
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 == 13) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.auto_length = 1; myblcon.side = 2; return myblcon; } if (arg2 == 14) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; myblcon.auto_length = 1; myblcon.side = -1; return myblcon; } if (arg2 == 15) { myblcon = instance_create(arg0, arg1, obj_battleblcon); myblcon.sprite_index = spr_battleblcon_long; ...
(x - 20, y + 80, 10);
27
        talked = 1;
28
        talktimer = 0;
29
        rtimer = 0;
30
    }
31
    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"))
32
        
scr_blconskip
scr_blconskip

function
scr_blconskip(arg0)
{ if (arg0 >= 0) { if (button1_p() && talktimer > arg0) talktimer = talkmax; talktimer++; if (talktimer >= talkmax) { with (obj_writer) instance_destroy(); if (i_ex(obj_balloon_queue)) msgset_fromqueue(); else global.mnfight = 1.5; } } else if (arg0 == -1) { if (!instance_exists(obj_writer)) { if (i_ex(obj_balloon_queue)) msgset_fromqueue(); else global.mnfight = 1.5; } } else if (arg0 == -2) { talktimer++; if (talktimer > 15) talktimer = talkmax; if (talktimer >= talkmax) { with (obj_writer) instance_destroy(); if (i_ex(obj_balloon_queue)) msgset_fromqueue(); else global.mnfight = 1.5; } } }
(15);
33
    if (global.mnfight == 1.5)
34
    {
35
        if (!instance_exists(obj_growtangle))
36
            instance_create(__view_get(e__VW.XView, 0) + 320, __view_get(e__VW.YView, 0) + 170, obj_growtangle);
37
        if (!instance_exists(obj_moveheart))
38
            
scr_moveheart
scr_moveheart

function
scr_moveheart()
{ global.inv = 0; return instance_create(obj_herokris.x + 10, obj_herokris.y + 40, obj_moveheart); }
();
39
        global.mnfight = 2;
40
        
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(90);
41
    }
42
    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)
43
    {
44
        rtimer += 1;
45
        if (rtimer == 12)
46
        {
47
            if (myattackchoice == 0)
48
            {
49
                global.monsterattackname[myself] = "terracota pots";
50
                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);
51
                dc.type = 150;
52
                dc.special = global.flag[1916];
53
                if (global.flag[1916] == 0)
54
                    
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(190);
55
                if (global.flag[1916] == 1)
56
                    
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(275);
57
                if (global.flag[1916] == 2)
58
                    
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(245);
59
                if (global.flag[1916] == 3)
60
                    
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(365);
61
                global.flag[1916]++;
62
                if (global.flag[1916] > 3)
63
                    global.flag[1916] = 3;
64
            }
65
            if (wateringcan)
66
            {
67
                inst = instance_create(x, y, obj_terracota_wateringcan);
68
                if (slowercan)
69
                    inst.slower = true;
70
                slowercan = false;
71
                wateringcan = false;
72
            }
73
            turns += 1;
74
            attacked = 1;
75
        }
76
    }
77
    if (global.mnfight == 2 && global.turntimer <= 2 && bonsaicon == 1)
78
    {
79
        msgsetloc(0, 
* The enemy bloomed!
"* The enemy bloomed!", "obj_terracota_enemy_slash_Step_0_gml_82_0"
);
80
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
81
        snd_stop(snd_bell_bounce_short);
82
        with (obj_pine_tree_telegraph)
83
            instance_destroy();
84
        if (i_ex(obj_growtangle))
85
        {
86
            snd_play_x(snd_ghostappear, 1, 1.1);
87
            bg = instance_create(obj_growtangle.x - 74, obj_growtangle.y - 74, obj_marker);
88
            bg.sprite_index = spr_terracota_bg;
89
            bg.image_xscale = 2;
90
            bg.image_yscale = 2;
91
            bg.image_alpha = 0;
92
            bg.depth = obj_growtangle.depth - 1;
93
            with (bg)
94
                
scr_lerpvar
scr_lerpvar

function
scr_lerpvar()
{ var _id = self; if (!is_struct(self)) _id = id; if (argument_count < 6) ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3]);
else ___lerpvar =
scr_lerpvar_instance(_id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]);
return ___lerpvar; } function scr_lerpcol() { if (argument_count < 6) ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3]); else ___lerpvar = scr_lerpcol_instance(id, argument[0], argument[1], argument[2], argument[3], argument[4], argument[5]); return ___lerpvar; }
("image_alpha", 0, 1, 6);
95
        }
96
        global.turntimer = 90;
97
        bonsaicon = 2;
98
        bonsaitimer = 0;
99
        headballooncon = 1;
100
    }
101
    if (global.mnfight == 2 && global.turntimer <= 1)
102
    {
103
        if (setbattlemsg == false)
104
        {
105
            global.typer = 6;
106
            global.fc = 0;
107
            rr = choose(0, 1, 2, 3);
108
            if (
scr_messagepriority
scr_messagepriority

function
scr_messagepriority(arg0)
{ if (i_ex(obj_battlecontroller)) { if (obj_battlecontroller.messagepriority < arg0) { obj_battlecontroller.messagepriority = arg0; return true; } else { return false; } } else { return false; } }
(random(2)))
109
            {
110
                var substring = string(myself);
111
                if (rr == 0)
112
                    global.battlemsg[0] = stringsetsubloc(
* Terakota thunders with each step.
"* Terakota thunders with each step.", "obj_terracota_enemy_slash_Step_0_gml_183_0"
);
113
                if (rr == 1)
114
                    global.battlemsg[0] = stringsetsubloc(
* Terakota offers a battle prayer to the Great Pumpkin.
"* Terakota offers a battle prayer to the Great Pumpkin.", "obj_terracota_enemy_slash_Step_0_gml_184_0"
);
115
                if (rr == 2)
116
                    global.battlemsg[0] = stringsetsubloc(
* Terakota attempts to dig bedrock.
"* Terakota attempts to dig bedrock.", "obj_terracota_enemy_slash_Step_0_gml_185_0"
);
117
                if (rr == 3)
118
                    global.battlemsg[0] = stringsetsubloc(
* Birds (from the song Weird Birds) land on Terakota peacefully.
"* Birds (from the song Weird Birds) land on Terakota peacefully.", "obj_terracota_enemy_slash_Step_0_gml_186_0"
);
119
                if (irandom(100) < 3)
120
                    global.battlemsg[0] = stringsetsubloc(
* Smells like fresh soil.
"* Smells like fresh soil.", "obj_terracota_enemy_slash_Step_0_gml_187_0"
);
121
            }
122
            if (global.monsterstatus[myself] == 1)
123
            {
124
                if (
scr_messagepriority
scr_messagepriority

function
scr_messagepriority(arg0)
{ if (i_ex(obj_battlecontroller)) { if (obj_battlecontroller.messagepriority < arg0) { obj_battlecontroller.messagepriority = arg0; return true; } else { return false; } } else { return false; } }
(100))
125
                    global.battlemsg[0] = stringsetloc(
* Terakota's eyes (?) blink slowly.
"* Terakota's eyes (?) blink slowly.", "obj_terracota_enemy_slash_Step_0_gml_198_0"
);
126
            }
127
            if (global.monsterhp[myself] <= (global.monstermaxhp[myself] / 4))
128
            {
129
                if (
scr_messagepriority
scr_messagepriority

function
scr_messagepriority(arg0)
{ if (i_ex(obj_battlecontroller)) { if (obj_battlecontroller.messagepriority < arg0) { obj_battlecontroller.messagepriority = arg0; return true; } else { return false; } } else { return false; } }
(101))
130
                {
131
                    var substring = string(myself);
132
                    global.battlemsg[0] = stringsetloc(
* Terakota's armor pH is out of wack.
"* Terakota's armor pH is out of wack.", "obj_terracota_enemy_slash_Step_0_gml_193_0"
);
133
                }
134
            }
135
            setbattlemsg = true;
136
            attackalreadyseenbyplayer = true;
137
        }
138
    }
139
}
140
if (bonsaicon == 2)
141
{
142
    with (obj_terracota_leaf_bullet)
143
    {
144
        mask_index = spr_nothing;
145
        image_alpha -= 0.1;
146
        if (image_alpha <= 0)
147
            instance_destroy();
148
    }
149
    with (obj_terracota_leaf_bullet2)
150
    {
151
        mask_index = spr_nothing;
152
        image_alpha -= 0.1;
153
        if (image_alpha <= 0)
154
            instance_destroy();
155
    }
156
    with (obj_terracota_flower_bullet)
157
    {
158
        mask_index = spr_nothing;
159
        image_alpha -= 0.1;
160
        if (image_alpha <= 0)
161
            instance_destroy();
162
    }
163
    with (obj_terracota_split_flower_bullet)
164
    {
165
        mask_index = spr_nothing;
166
        image_alpha -= 0.1;
167
        if (image_alpha <= 0)
168
            instance_destroy();
169
    }
170
    with (obj_terracota_wateringcan_bullet)
171
    {
172
        mask_index = spr_nothing;
173
        image_alpha -= 0.1;
174
        if (image_alpha <= 0)
175
            instance_destroy();
176
    }
177
    with (obj_terracota_pine_bullet)
178
    {
179
        mask_index = spr_nothing;
180
        image_alpha -= 0.1;
181
        if (image_alpha <= 0)
182
            instance_destroy();
183
    }
184
    with (obj_terracota_wateringcan)
185
    {
186
        mask_index = spr_nothing;
187
        image_alpha -= 0.2;
188
        if (image_alpha <= 0)
189
            instance_destroy();
190
        timer = 0;
191
    }
192
}
193
if (global.myfight == 3)
194
{
195
    xx = __view_get(e__VW.XView, 0);
196
    yy = __view_get(e__VW.YView, 0);
197
    if (acting == 1 && actcon == 0)
198
    {
199
        actcon = 1;
200
        msgsetloc(0, 
* TERAKOTA - A thick exterior.Delay 11 But it's what's inside that counts.Wait for inputClose Message
"* TERAKOTA - A thick exterior^1. But it's what's inside that counts./%", "obj_terracota_enemy_slash_Step_0_gml_219_0"
);
201
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
202
    }
203
    if (acting == 2 && actcon == 0)
204
        acting = 1.1;
205
    if (acting == 3 && actcon == 0)
206
    {
207
        acting = 1.1;
208
        slowercan = true;
209
    }
210
    if (acting == 1.1)
211
    {
212
        msgsetloc(0, 
* Use watering can droplets to turn all pots green!Wait for inputClose Message
"* Use watering can droplets to turn all pots green!/%", "obj_terracota_enemy_slash_Step_0_gml_236_0"
);
213
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
214
        wateringcan = true;
215
        acting = 0;
216
        actcon = 1;
217
    }
218
    if (actingsus == 1 && actconsus == 1)
219
    {
220
        var _rand = choose(0, 1, 2);
221
        if (_rand == 0)
222
            msgsetloc(0, 
* Susie ate dirt unharmed!
"* Susie ate dirt unharmed!", "obj_terracota_enemy_slash_Step_0_gml_246_0"
);
223
        if (_rand == 1)
224
            msgsetloc(0, 
* Susie lifted pots!
"* Susie lifted pots!", "obj_terracota_enemy_slash_Step_0_gml_247_0"
);
225
        if (_rand == 2)
226
            msgsetloc(0, 
* Susie lifted weeds!
"* Susie lifted weeds!", "obj_terracota_enemy_slash_Step_0_gml_248_0"
);
227
        
scr_mercyadd
scr_mercyadd

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

function
scr_simultext(arg0)
{ __simulorder = 0; if (arg0 == "kris") __simulorder = simulorderkri; if (arg0 == "susie") __simulorder = simulordersus; if (arg0 == "ralsei") __simulorder = simulorderral; if (arg0 == "noelle") __simulorder = simulordernoe; __yoffset = __simulorder * 30; global.typer = 4; battlewriter = instance_create(xx + 30, yy + 376 + __yoffset, obj_writer); }
("susie");
229
        if (simulordersus == 0)
230
            actconsus = 20;
231
        else
232
            actconsus = 0;
233
        global.flag[1888] = 1;
234
    }
235
    if (actingral == 1 && actconral == 1)
236
    {
237
        var _rand = choose(0, 1, 2);
238
        if (_rand == 0)
239
            msgsetloc(0, 
* Ralsei alters soil pH!
"* Ralsei alters soil pH!", "obj_terracota_enemy_slash_Step_0_gml_258_0"
);
240
        if (_rand == 1)
241
            msgsetloc(0, 
* Ralsei does the worm!
"* Ralsei does the worm!", "obj_terracota_enemy_slash_Step_0_gml_259_0"
);
242
        if (_rand == 2)
243
            msgsetloc(0, 
* Ralsei acts stone!
"* Ralsei acts stone!", "obj_terracota_enemy_slash_Step_0_gml_260_0"
);
244
        
scr_mercyadd
scr_mercyadd

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

function
scr_simultext(arg0)
{ __simulorder = 0; if (arg0 == "kris") __simulorder = simulorderkri; if (arg0 == "susie") __simulorder = simulordersus; if (arg0 == "ralsei") __simulorder = simulorderral; if (arg0 == "noelle") __simulorder = simulordernoe; __yoffset = __simulorder * 30; global.typer = 4; battlewriter = instance_create(xx + 30, yy + 376 + __yoffset, obj_writer); }
("ralsei");
246
        if (simulorderral == 0)
247
            actconral = 20;
248
        else
249
            actconral = 0;
250
        global.flag[1888] = 1;
251
    }
252
    if (actcon == 20 || actconsus == 20 || actconral == 20)
253
    {
254
        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; }
())
255
        {
256
            actconsus = -1;
257
            actconral = -1;
258
            actcon = 1;
259
        }
260
    }
261
    if (actcon == 1 && !instance_exists(obj_writer))
262
        
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();
} }
();
263
}
264
if (state == 3)
265
{
266
    
scr_enemyhurt_tired_after_damage
scr_enemyhurt_tired_after_damage

function
scr_enemyhurt_tired_after_damage(arg0)
{ if (global.monsterhp[myself] <= (global.monstermaxhp[myself] * arg0))
scr_monster_make_tired(myself);
}
(0.5);
267
    
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; } } }
();
268
}
269
270
enum e__VW
271
{
272
    XView,
273
    YView,
274
    WView,
275
    HView,
276
    Angle,
277
    HBorder,
278
    VBorder,
279
    HSpeed,
280
    VSpeed,
281
    Object,
282
    Visible,
283
    XPort,
284
    YPort,
285
    WPort,
286
    HPort,
287
    Camera,
288
    SurfaceID
289
}