Deltarune (Chapter 2) script viewer

← back to main script listing

gml_Object_obj_swatchling_enemy_Step_0

(view raw script w/o annotations or w/e)
1
if (global.monster[myself] == 1)
2
{
3
    talkOrder = myself;
4
    if (!color_init)
5
    {
6
        var color_index = 0;
7
        with (obj_swatchling_enemy)
8
        {
9
            if (!color_init)
10
            {
11
                color_init = true;
12
                new_color = color_index;
13
                currentcolor = base_colors[new_color];
14
                previouscolor = base_colors[new_color];
15
                color_index++;
16
            }
17
        }
18
    }
19
    if (!loaded_color)
20
    {
21
        if (currentcolor != current_pal)
22
            current_pal = (current_pal > currentcolor) ? clamp(current_pal - 0.1, currentcolor, 255) : clamp(current_pal + 0.1, 0, currentcolor);
23
        else
24
            loaded_color = true;
25
    }
26
    if (
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
() == 1 && global.monsterstatus[myself] == 0)
27
        
scr_monster_make_tired
scr_monster_make_tired

function
scr_monster_make_tired(arg0)
{ global.monstercomment[arg0] = stringsetloc(
(Tired)
"(Tired)", "scr_monster_make_tired_slash_scr_monster_make_tired_gml_1_0"
);
global.monsterstatus[arg0] = 1; }
(myself);
28
    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)
29
    {
30
        
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; } }
();
31
        if (!instance_exists(obj_darkener))
32
            instance_create(0, 0, obj_darkener);
33
        var changedcolor = currentcolor != previouscolor;
34
        var justchanged = false;
35
        var allprimary = true;
36
        var mismatch_check = 0;
37
        with (obj_swatchling_enemy)
38
        {
39
            if (currentcolor != other.currentcolor)
40
                mismatch_check++;
41
            if (currentcolor != previouscolor)
42
                justchanged = true;
43
            if (currentcolor != blue && currentcolor != red && currentcolor != yellow)
44
                allprimary = false;
45
        }
46
        coordinated = mismatch_check == 0;
47
        var justcoordinated = coordinated && justchanged;
48
        msgsetloc(0, 
Welcome,
young masters.
"Welcome,&young masters.", "obj_swatchling_enemy_slash_Step_0_gml_54_0"
);
49
        if (talkOrder == 1)
50
            msgsetloc(0, 
We have prepared several
attack patterns for
your enjoyment.
"We have prepared several&attack patterns for&your enjoyment.", "obj_swatchling_enemy_slash_Step_0_gml_57_0"
);
51
        else if (talkOrder == 2)
52
            msgsetloc(0, 
Please enjoy them
at your convenience.
"Please enjoy them&at your convenience.", "obj_swatchling_enemy_slash_Step_0_gml_60_0"
);
53
        if (turns >= 1)
54
        {
55
            msgsetloc(0, 
Tut, tut.
It looks like pain.
"Tut, tut.&It looks like pain.", "obj_swatchling_enemy_slash_Step_0_gml_157_0"
);
56
            if (!setmessage)
57
            {
58
                var myRandom = choose(0, 1, 2);
59
                with (obj_swatchling_enemy)
60
                {
61
                    randomMessage = myRandom;
62
                    setmessage = true;
63
                }
64
            }
65
            if (randomMessage < 2)
66
            {
67
                if (currentcolor == blue)
68
                    msgsetloc(0, 
We'll shine your shoes
'til they're black and blue.
"We'll shine your shoes&'til they're black and blue.", "obj_swatchling_enemy_slash_Step_0_gml_162_0"
);
69
                else if (currentcolor == red)
70
                    msgsetloc(0, 
We'll make your bed
with sheets blood red.
"We'll make your bed&with sheets blood red.", "obj_swatchling_enemy_slash_Step_0_gml_165_0"
);
71
                else if (currentcolor == yellow)
72
                    msgsetloc(0, 
We'll make yellow sweets
for you, just try
not to hurt your tooth.
"We'll make yellow sweets&for you, just try&not to hurt your tooth.", "obj_swatchling_enemy_slash_Step_0_gml_168_0"
);
73
                else if (currentcolor == orange)
74
                    msgsetloc(0, 
Please enjoy these
complimentary birds.
"Please enjoy these&complimentary birds.", "obj_swatchling_enemy_slash_Step_0_gml_178_0"
);
75
                else if (currentcolor == green)
76
                    msgsetloc(0, 
Would you like
some horse'dovours?
"Would you like&some horse'dovours?", "obj_swatchling_enemy_slash_Step_0_gml_181_0"
);
77
            }
78
            else if (randomMessage == 2)
79
            {
80
                if (currentcolor == blue)
81
                {
82
                    var blueText = (random(100) >= 95) ? stringsetloc(
What? The lasagna
has some kind of
explosive in it?
"What? The lasagna&has some kind of&explosive in it?", "obj_swatchling_enemy_slash_Step_0_gml_174_0"
) : stringsetloc(
Please enjoy this
complimentary body slam.
"Please enjoy this&complimentary body slam.", "obj_swatchling_enemy_slash_Step_0_gml_174_1"
);
83
                    msgset(0, blueText);
84
                }
85
            }
86
            if (changedcolor)
87
            {
88
                if (currentcolor == blue)
89
                    msgsetloc(0, 
I'm feeling
blue.
"I'm feeling&blue.", "obj_swatchling_enemy_slash_Step_0_gml_119_0"
);
90
                else if (currentcolor == red)
91
                    msgsetloc(0, 
I'm seeing
red.
"I'm seeing&red.", "obj_swatchling_enemy_slash_Step_0_gml_122_0"
);
92
                else if (currentcolor == yellow)
93
                    msgsetloc(0, 
I'm a yellow
fellow.
"I'm a yellow&fellow.", "obj_swatchling_enemy_slash_Step_0_gml_125_0"
);
94
                else if (currentcolor == orange)
95
                    msgsetloc(0, 
How about some
orange peel.
"How about some&orange peel.", "obj_swatchling_enemy_slash_Step_0_gml_160_0"
);
96
                else if (currentcolor == green)
97
                    msgsetloc(0, 
A green lime
for your drink?
"A green lime&for your drink?", "obj_swatchling_enemy_slash_Step_0_gml_164_0"
);
98
            }
99
        }
100
        if (justcoordinated)
101
        {
102
            if (talkOrder == 0)
103
                msgsetloc(0, 
We feel so
coordinated.
"We feel so&coordinated.", "obj_swatchling_enemy_slash_Step_0_gml_106_0"
);
104
            else if (talkOrder == 1)
105
                msgsetloc(0, 
Thank you,
young masters.
"Thank you,&young masters.", "obj_swatchling_enemy_slash_Step_0_gml_109_0"
);
106
            else if (talkOrder == 2)
107
                msgsetloc(0, 
Thank you.
"Thank you.", "obj_swatchling_enemy_slash_Step_0_gml_112_0"
);
108
        }
109
        if (
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
() == 1 && !becameAlone)
110
        {
111
            becameAlone = true;
112
            msgsetloc(0, 
My outfit is coordinated now.
With myself.
"My outfit is coordinated now.&With myself.", "obj_swatchling_enemy_slash_Step_0_gml_46_0"
);
113
        }
114
        if (myself == (
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
() - 1))
115
        {
116
            with (obj_swatchling_enemy)
117
                previouscolor = currentcolor;
118
        }
119
        global.typer = 50;
120
        
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_clubs; 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_clubs; 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; } }
(x - 10, global.monstery[myself], 10);
121
        talked = 1;
122
        talktimer = 0;
123
    }
124
    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"))
125
    {
126
        rtimer = 0;
127
        
scr_blconskip
scr_blconskip

function
scr_blconskip(arg0)
{ if (arg0 >= 0) { if (button1_p() && talktimer > arg0) talktimer = talkmax; talktimer += 1; if (talktimer >= talkmax) { with (obj_writer) instance_destroy(); global.mnfight = 2; } } else if (arg0 == -1) { if (instance_exists(obj_writer) == false) global.mnfight = 2; } else if (arg0 == -2) { talktimer += 1; if (talktimer > 15) talktimer = talkmax; if (talktimer >= talkmax) { with (obj_writer) instance_destroy(); global.mnfight = 2; } } }
(15);
128
        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"))
129
        {
130
            if (!instance_exists(obj_moveheart))
131
                
scr_moveheart
scr_moveheart

function
scr_moveheart()
{ global.inv = 0; if (global.chapter == 2 && instance_exists(obj_gigaqueen_enemy)) return instance_create(o_boxingcontroller.x + 4, o_boxingcontroller.y - 120, obj_moveheart); else return instance_create(obj_herokris.x + 10, obj_herokris.y + 40, obj_moveheart); }
();
132
            if (!instance_exists(obj_growtangle))
133
                instance_create(__view_get(e__VW.XView, 0) + 320, __view_get(e__VW.YView, 0) + 170, obj_growtangle);
134
        }
135
    }
136
    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)
137
    {
138
        rtimer += 1;
139
        if (rtimer == 1)
140
        {
141
            if (!instance_exists(obj_swatchling_battle_controller))
142
                instance_create(0, 0, obj_swatchling_battle_controller);
143
            if (currentcolor == blue)
144
                obj_swatchling_battle_controller.blue_count++;
145
            else if (currentcolor == red || currentcolor == orange)
146
                obj_swatchling_battle_controller.red_count++;
147
            else
148
                obj_swatchling_battle_controller.yellow_count++;
149
        }
150
        if (currentcolor == blue && rtimer == 2)
151
        {
152
            global.monsterattackname[myself] = "Bounce";
153
            dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
154
            dc.type = 7;
155
            dc.creator = myself;
156
        }
157
        if (rtimer == 16)
158
        {
159
            if (!instance_exists(obj_swatchling_battle_controller))
160
                instance_create(0, 0, obj_swatchling_battle_controller);
161
            if (currentcolor == red || currentcolor == orange)
162
            {
163
                global.monsterattackname[myself] = "Shockwave";
164
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
165
                dc.type = 5;
166
                if (currentcolor == orange)
167
                    dc.special = 1;
168
                dc.creator = myself;
169
            }
170
            else if (currentcolor == yellow || currentcolor == green)
171
            {
172
                global.monsterattackname[myself] = "Platter";
173
                dc = 
scr_bulletspawner
scr_bulletspawner

function
scr_bulletspawner(arg0, arg1, arg2)
{ __dc = instance_create(arg0, arg1, arg2); __dc.creator = myself; __dc.target = mytarget; __dc.damage = global.monsterat[myself] * 5; return __dc; }
(x, y, obj_dbulletcontroller);
174
                dc.type = 6;
175
                if (currentcolor == green)
176
                    dc.special = 1;
177
                dc.creator = myself;
178
            }
179
            else
180
            {
181
                global.monsterattackname[myself] = "Bounce";
182
            }
183
            
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(180);
184
            setmessage = false;
185
            turns += 1;
186
            global.typer = 6;
187
            global.fc = 0;
188
            var battleText = "";
189
            var monsterPop = 
scr_monsterpop
scr_monsterpop

function
scr_monsterpop()
{ return global.monster[0] + global.monster[1] + global.monster[2]; }
();
190
            rr = choose(0, 1, 2, 3, 4);
191
            if (rr == 0)
192
                battleText = (monsterPop > 1) ? stringsetloc(
* The Swatchlings are cleaning each other off with feather dusters.
"* The Swatchlings are cleaning each other off with feather dusters.", "obj_swatchling_enemy_slash_Step_0_gml_284_0"
) : stringsetloc(
* Swatchling feather dusts itself.
"* Swatchling feather dusts itself.", "obj_swatchling_enemy_slash_Step_0_gml_284_1"
);
193
            if (rr == 1)
194
                battleText = (monsterPop > 1) ? stringsetloc(
* Swatchlings flex their backs while bending over to inspect a teacup.
"* Swatchlings flex their backs while bending over to inspect a teacup.", "obj_swatchling_enemy_slash_Step_0_gml_285_0"
) : stringsetloc(
* Swatchling flexes all of its back muscles while inspecting a teacup.
"* Swatchling flexes all of its back muscles while inspecting a teacup.", "obj_swatchling_enemy_slash_Step_0_gml_285_1"
);
195
            if (rr == 2)
196
                battleText = stringsetloc(
* The Swatchlings wipe at the face of their chained pocketwatch, which is digital.
"* The Swatchlings wipe at the face of their chained pocketwatch, which is digital.", "obj_swatchling_enemy_slash_Step_0_gml_286_0"
);
197
            if (rr == 3)
198
                battleText = stringsetloc(
* The Swatchlings are adjusting their hue and saturation.
"* The Swatchlings are adjusting their hue and saturation.", "obj_swatchling_enemy_slash_Step_0_gml_287_0"
);
199
            if (rr == 4)
200
                battleText = stringsetloc(
* Smells like paint and feathers.
"* Smells like paint and feathers.", "obj_swatchling_enemy_slash_Step_0_gml_288_0"
);
201
            if (coordinated)
202
                battleText = stringsetloc(
* The Swatchlings are relieved their wardrobe has been coordinated.
"* The Swatchlings are relieved their wardrobe has been coordinated.", "obj_swatchling_enemy_slash_Step_0_gml_302_0"
);
203
            if (global.monsterstatus[myself] == 1)
204
                battleText = stringsetloc(
* The Swatchling is dreading doing all of the work by itself.
"* The Swatchling is dreading doing all of the work by itself.", "obj_swatchling_enemy_slash_Step_0_gml_307_0"
);
205
            global.battlemsg[0] = battleText;
206
            attacked = 1;
207
        }
208
        else
209
        {
210
            
scr_turntimer
scr_turntimer

function
scr_turntimer(arg0)
{ if (global.turntimer < arg0) global.turntimer = arg0; }
(120);
211
        }
212
    }
213
}
214
if (global.myfight == 3)
215
{
216
    xx = __view_get(e__VW.XView, 0);
217
    yy = __view_get(e__VW.YView, 0);
218
    if (acting == 1 && actcon == 0)
219
    {
220
        actcon = 1;
221
        msgsetloc(0, 
* SWATCHLING - Happiest when their outfits are color-coordinated.Wait for inputClose Message
"* SWATCHLING - Happiest when their outfits are color-coordinated./%", "obj_swatchling_enemy_slash_Step_0_gml_328_0"
);
222
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
223
    }
224
    if (acting == 2 && actcon == 0)
225
    {
226
        rr = choose(0, 1, 2);
227
        if (rr == 0)
228
            msgsetloc(0, 
* Talked about the color of the summer sun shining on a beach ball.Wait for inputClose Message
"* Talked about the color of the summer sun shining on a beach ball./%", "obj_swatchling_enemy_slash_Step_0_gml_336_0"
);
229
        if (rr == 1)
230
            msgsetloc(0, 
* Talked about the steam of a fresh hot chocolate.Wait for inputClose Message
"* Talked about the steam of a fresh hot chocolate./%", "obj_swatchling_enemy_slash_Step_0_gml_337_0"
);
231
        if (rr == 2)
232
            msgsetloc(0, 
* Talked about the warmth of a loving embrace.Wait for inputClose Message
"* Talked about the warmth of a loving embrace./%", "obj_swatchling_enemy_slash_Step_0_gml_338_0"
);
233
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
234
        actcon = 5;
235
    }
236
    if (acting == 3 && actcon == 0)
237
    {
238
        rr = choose(0, 1, 2);
239
        if (rr == 0)
240
            msgsetloc(0, 
* Talked about the crunch of the last pickle in the refrigerator.Wait for inputClose Message
"* Talked about the crunch of the last pickle in the refrigerator./%", "obj_swatchling_enemy_slash_Step_0_gml_348_0"
);
241
        if (rr == 1)
242
            msgsetloc(0, 
* Talked about the chill of the wind on the ice skating pond.Wait for inputClose Message
"* Talked about the chill of the wind on the ice skating pond./%", "obj_swatchling_enemy_slash_Step_0_gml_349_0"
);
243
        if (rr == 2)
244
            msgsetloc(0, 
* Talked about the snow matted on your brother's nose.Wait for inputClose Message
"* Talked about the snow matted on your brother's nose./%", "obj_swatchling_enemy_slash_Step_0_gml_350_0"
);
245
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
246
        actcon = 5;
247
    }
248
    if (actcon == 5)
249
    {
250
        previouscolor = currentcolor;
251
        var warmify = acting == 2 || actconsus == 2;
252
        var extreme = (actconsus == 2 || actconral == 2) ? 1 : 2;
253
        if (extreme == 2 && instance_number(obj_swatchling_enemy) != 1)
254
        {
255
            var a = 0;
256
            if (currentcolor == blue || currentcolor == yellow)
257
            {
258
                for (i = 0; i < instance_number(obj_swatchling_enemy); i += 1)
259
                {
260
                    enemy[i] = instance_find(obj_swatchling_enemy, i);
261
                    if (enemy[i].currentcolor == green)
262
                        a++;
263
                }
264
            }
265
            if (currentcolor == red || currentcolor == yellow)
266
            {
267
                for (i = 0; i < instance_number(obj_swatchling_enemy); i += 1)
268
                {
269
                    enemy[i] = instance_find(obj_swatchling_enemy, i);
270
                    if (enemy[i].currentcolor == orange)
271
                        a++;
272
                }
273
            }
274
            if (currentcolor == orange || currentcolor == green)
275
            {
276
                for (i = 0; i < instance_number(obj_swatchling_enemy); i += 1)
277
                {
278
                    enemy[i] = instance_find(obj_swatchling_enemy, i);
279
                    if (enemy[i].currentcolor == yellow)
280
                        a++;
281
                }
282
            }
283
            if (a == (instance_number(obj_swatchling_enemy) - 1))
284
                extreme = 1;
285
        }
286
        if (warmify)
287
            currentcolor = clamp(currentcolor + extreme, blue, red);
288
        else
289
            currentcolor = clamp(currentcolor - extreme, blue, red);
290
        actcon = 10;
291
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
292
    }
293
    if (actcon == 10 && !instance_exists(obj_writer))
294
    {
295
        if (currentcolor != current_pal)
296
            current_pal = (current_pal > currentcolor) ? clamp(current_pal - 0.1, currentcolor, 255) : clamp(current_pal + 0.1, 0, currentcolor);
297
        else
298
            actcon = 20;
299
    }
300
    if (actcon == 20 && !instance_exists(obj_writer))
301
    {
302
        var changedcolor = currentcolor != previouscolor;
303
        if (changedcolor == false)
304
        {
305
            var temp = (currentcolor == blue) ? stringsetloc(
cold
"cold", "obj_swatchling_enemy_slash_Step_0_gml_383_0"
) : stringsetloc(
warm
"warm", "obj_swatchling_enemy_slash_Step_0_gml_383_1"
);
306
            msgsetsubloc(0, "* But Swatchling is already as ~1 as can be!/%", temp, "obj_swatchling_enemy_slash_Step_0_gml_395_0");
307
        }
308
        else
309
        {
310
            var warmify = currentcolor > previouscolor;
311
            var colorText = stringsetloc(
blue
"blue", "obj_swatchling_enemy_slash_Step_0_gml_422_0_b"
);
312
            if (currentcolor == red)
313
                colorText = stringsetloc(
red
"red", "obj_swatchling_enemy_slash_Step_0_gml_425_0"
);
314
            else if (currentcolor == yellow)
315
                colorText = stringsetloc(
yellow
"yellow", "obj_swatchling_enemy_slash_Step_0_gml_428_0"
);
316
            if (currentcolor == green)
317
                colorText = stringsetloc(
green
"green", "obj_swatchling_enemy_slash_Step_0_gml_431_0"
);
318
            if (currentcolor == orange)
319
                colorText = stringsetloc(
orange
"orange", "obj_swatchling_enemy_slash_Step_0_gml_434_0"
);
320
            var extreme = (actconsus == 2 || actconral == 2) ? stringsetloc(
a little bit
"a little bit", "obj_swatchling_enemy_slash_Step_0_gml_404_0"
) : stringsetloc(
a lot
"a lot", "obj_swatchling_enemy_slash_Step_0_gml_404_1"
);
321
            if (warmify)
322
                msgsetsubloc(0, "* Swatchling's color got ~1 warmer...! It's now ~2!/%", extreme, colorText, "obj_swatchling_enemy_slash_Step_0_gml_419_0");
323
            else
324
                msgsetsubloc(0, "* Swatchling's color turned ~1 colder...! It's now ~2!/%", extreme, colorText, "obj_swatchling_enemy_slash_Step_0_gml_422_0");
325
        }
326
        var mismatch_check = 0;
327
        with (obj_swatchling_enemy)
328
        {
329
            if (currentcolor != other.currentcolor)
330
                mismatch_check++;
331
        }
332
        var newly_coordinated = mismatch_check == 0;
333
        if (newly_coordinated)
334
        {
335
            with (obj_swatchling_enemy)
336
            {
337
                if (global.mercymod[myself] < global.mercymax[myself])
338
                    
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; if (i_ex(obj_dmgwriter)) { with (obj_dmgwriter) { if (type == 5) _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]++; }
(myself, 100);
339
            }
340
        }
341
        actcon = 1;
342
        actconral = 0;
343
        actconsus = 0;
344
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
345
    }
346
    if (actingsus == 1 && actconsus == 1)
347
    {
348
        var sentenceEnd = (currentcolor == red) ? "/" : "/%";
349
        var random_text = choose(0, 1, 2);
350
        if (random_text == 0)
351
            msgsetsubloc(0, "* Susie mentions explosions.~1", sentenceEnd, "obj_swatchling_enemy_slash_Step_0_gml_444_0");
352
        if (random_text == 1)
353
            msgsetsubloc(0, "* Susie mentions lava.~1", sentenceEnd, "obj_swatchling_enemy_slash_Step_0_gml_432_0");
354
        if (random_text == 2)
355
            msgsetsubloc(0, "* Susie mentions hot peppers.~1", sentenceEnd, "obj_swatchling_enemy_slash_Step_0_gml_436_0");
356
        if (currentcolor == red)
357
        {
358
            msgnextloc(
* But nothing happened!Wait for inputClose Message
"* But nothing happened!/%", "obj_swatchling_enemy_slash_Step_0_gml_437_0"
);
359
            actcon = 1;
360
            actconsus = 0;
361
        }
362
        else
363
        {
364
            actcon = 5;
365
            actconsus = 2;
366
        }
367
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
368
    }
369
    if (actingral == 1 && actconral == 1)
370
    {
371
        var sentenceEnd = (currentcolor == blue) ? "/" : "/%";
372
        var random_text = choose(0, 1, 2);
373
        if (random_text == 0)
374
            msgsetsubloc(0, "* Ralsei mentions mint tea.~1", sentenceEnd, "obj_swatchling_enemy_slash_Step_0_gml_456_0");
375
        if (random_text == 1)
376
            msgsetsubloc(0, "* Ralsei mentions icy scarves.~1", sentenceEnd, "obj_swatchling_enemy_slash_Step_0_gml_465_0");
377
        if (random_text == 2)
378
            msgsetsubloc(0, "* Ralsei mentions ice cream.~1", sentenceEnd, "obj_swatchling_enemy_slash_Step_0_gml_469_0");
379
        if (currentcolor == blue)
380
        {
381
            msgnextloc(
* But nothing happened!Wait for inputClose Message
"* But nothing happened!/%", "obj_swatchling_enemy_slash_Step_0_gml_460_0"
);
382
            actcon = 1;
383
            actconral = 0;
384
        }
385
        else
386
        {
387
            actcon = 5;
388
            actconral = 2;
389
        }
390
        
scr_battletext_default
scr_battletext_default

function
scr_battletext_default()
{ global.fc = 0; global.typer = 4;
scr_battletext();
return battlewriter; }
();
391
    }
392
    if (actcon == 1 && !instance_exists(obj_writer))
393
        
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();
} }
();
394
}
395
396
enum e__VW
397
{
398
    XView,
399
    YView,
400
    WView,
401
    HView,
402
    Angle,
403
    HBorder,
404
    VBorder,
405
    HSpeed,
406
    VSpeed,
407
    Object,
408
    Visible,
409
    XPort,
410
    YPort,
411
    WPort,
412
    HPort,
413
    Camera,
414
    SurfaceID
415
}