Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_battle_core_directory_action_1_name

(view raw script w/o annotations or w/e)
1
function scr_battle_core_directory_action_1_name
scr_battle_core_directory_action_1_name

function scr_battle_core_directory_action_1_name(argument0, argument1) //gml_Script_scr_battle_core_directory_action_1_name { if (global.battling_boss == true) { var battle_enemy_name = global.battle_enemy_name if (global.action_1_important == true) draw_set_color(global.action_1_color) else draw_set_color(c_white) } else { var act_number = global.act_number switch act_number { case 1: battle_enemy_name = global.battle_enemy_name_1 if (global.action_1_important == true) draw_set_color(global.action_1_color) else draw_set_color(c_white) break case 2: battle_enemy_name = global.battle_enemy_name_2 if (global.action_1_important_2 == true) draw_set_color(global.action_1_color_2) else draw_set_color(c_white) break case 3: battle_enemy_name = global.battle_enemy_name_3 if (global.action_1_important_3 == true) draw_set_color(global.action_1_color_3) else draw_set_color(c_white) break default: battle_enemy_name = global.battle_enemy_name_1 if (global.action_1_important == true) { draw_set_color(global.action_1_color) break } else draw_set_color(c_white) } } var game_mode = global.game_mode if (game_mode == "customs") { if (battle_enemy_name == "craniex") { battle_menu_option_x = obj_dialogue_box_battle.x + argument0 battle_menu_option_y = obj_dialogue_box_battle.y + argument1 battle_menu_option_string = "* Talk" script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options) } else if (battle_enemy_name == "ms mettaton") { var turns_passed = global.turns_passed if (turns_passed < 4) { battle_menu_option_x = obj_dialogue_box_battle.x + argument0 battle_menu_option_y = obj_dialogue_box_battle.y + argument1 battle_menu_option_string = "* Whoops!" script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options) } else if (turns_passed == 4) { battle_menu_option_x = obj_dialogue_box_battle.x + argument0 battle_menu_option_y = obj_dialogue_box_battle.y + argument1 battle_menu_option_string = "* Charm" script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options) } else if (turns_passed > 4) { battle_menu_option_x = obj_dialogue_box_battle.x + argument0 battle_menu_option_y = obj_dialogue_box_battle.y + argument1 battle_menu_option_string = "* Cry" script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options) } } } else if (game_mode == "yellow") { if (battle_enemy_name == "froggit intro") { battle_menu_option_x = obj_dialogue_box_battle.x + argument0 battle_menu_option_y = obj_dialogue_box_battle.y + argument1 battle_menu_option_string = "* Compliment" script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options) } else if (battle_enemy_name == "flier a" || battle_enemy_name == "flier b" || battle_enemy_name == "flier c") { battle_menu_option_x = obj_dialogue_box_battle.x + argument0 battle_menu_option_y = obj_dialogue_box_battle.y + argument1 battle_menu_option_string = "* Comfort" script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options) } else if (battle_enemy_name == "penilla a" || battle_enemy_name == "penilla b") ...
(argument0, argument1) //gml_Script_scr_battle_core_directory_action_1_name
2
{
3
    if (global.battling_boss == true)
4
    {
5
        var battle_enemy_name = global.battle_enemy_name
6
        if (global.action_1_important == true)
7
            draw_set_color(global.action_1_color)
8
        else
9
            draw_set_color(c_white)
10
    }
11
    else
12
    {
13
        var act_number = global.act_number
14
        switch act_number
15
        {
16
            case 1:
17
                battle_enemy_name = global.battle_enemy_name_1
18
                if (global.action_1_important == true)
19
                    draw_set_color(global.action_1_color)
20
                else
21
                    draw_set_color(c_white)
22
                break
23
            case 2:
24
                battle_enemy_name = global.battle_enemy_name_2
25
                if (global.action_1_important_2 == true)
26
                    draw_set_color(global.action_1_color_2)
27
                else
28
                    draw_set_color(c_white)
29
                break
30
            case 3:
31
                battle_enemy_name = global.battle_enemy_name_3
32
                if (global.action_1_important_3 == true)
33
                    draw_set_color(global.action_1_color_3)
34
                else
35
                    draw_set_color(c_white)
36
                break
37
            default:
38
                battle_enemy_name = global.battle_enemy_name_1
39
                if (global.action_1_important == true)
40
                {
41
                    draw_set_color(global.action_1_color)
42
                    break
43
                }
44
                else
45
                    draw_set_color(c_white)
46
        }
47
48
    }
49
    var game_mode = global.game_mode
50
    if (game_mode == "customs")
51
    {
52
        if (battle_enemy_name == "craniex")
53
        {
54
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
55
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
56
            battle_menu_option_string = "* Talk"
57
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
58
        }
59
        else if (battle_enemy_name == "ms mettaton")
60
        {
61
            var turns_passed = global.turns_passed
62
            if (turns_passed < 4)
63
            {
64
                battle_menu_option_x = obj_dialogue_box_battle.x + argument0
65
                battle_menu_option_y = obj_dialogue_box_battle.y + argument1
66
                battle_menu_option_string = "* Whoops!"
67
                script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
68
            }
69
            else if (turns_passed == 4)
70
            {
71
                battle_menu_option_x = obj_dialogue_box_battle.x + argument0
72
                battle_menu_option_y = obj_dialogue_box_battle.y + argument1
73
                battle_menu_option_string = "* Charm"
74
                script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
75
            }
76
            else if (turns_passed > 4)
77
            {
78
                battle_menu_option_x = obj_dialogue_box_battle.x + argument0
79
                battle_menu_option_y = obj_dialogue_box_battle.y + argument1
80
                battle_menu_option_string = "* Cry"
81
                script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
82
            }
83
        }
84
    }
85
    else if (game_mode == "yellow")
86
    {
87
        if (battle_enemy_name == "froggit intro")
88
        {
89
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
90
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
91
            battle_menu_option_string = "* Compliment"
92
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
93
        }
94
        else if (battle_enemy_name == "flier a" || battle_enemy_name == "flier b" || battle_enemy_name == "flier c")
95
        {
96
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
97
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
98
            battle_menu_option_string = "* Comfort"
99
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
100
        }
101
        else if (battle_enemy_name == "penilla a" || battle_enemy_name == "penilla b")
102
        {
103
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
104
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
105
            battle_menu_option_string = "* Compliment"
106
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
107
        }
108
        else if (battle_enemy_name == "sweet corn a" || battle_enemy_name == "sweet corn b")
109
        {
110
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
111
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
112
            battle_menu_option_string = "* Lick"
113
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
114
        }
115
        else if (battle_enemy_name == "crispy scroll a")
116
        {
117
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
118
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
119
            battle_menu_option_string = "* Transform"
120
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
121
        }
122
        else if (battle_enemy_name == "rorrim a")
123
        {
124
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
125
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
126
            battle_menu_option_string = "* Adjust"
127
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
128
        }
129
        else if (battle_enemy_name == "decibat")
130
        {
131
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
132
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
133
            battle_menu_option_string = "* Talk"
134
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
135
        }
136
        else if (battle_enemy_name == "dalv")
137
        {
138
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
139
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
140
            battle_menu_option_string = "* Talk"
141
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
142
        }
143
        else if (battle_enemy_name == "micro froggit")
144
        {
145
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
146
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
147
            battle_menu_option_string = "* Compliment"
148
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
149
        }
150
        else if (battle_enemy_name == "insomnitot a" || battle_enemy_name == "insomnitot b")
151
        {
152
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
153
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
154
            battle_menu_option_string = "* Sing"
155
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
156
        }
157
        else if (battle_enemy_name == "know cone a" || battle_enemy_name == "know cone b")
158
        {
159
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
160
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
161
            battle_menu_option_string = "* Encourage"
162
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
163
        }
164
        else if (battle_enemy_name == "frostermit a")
165
        {
166
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
167
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
168
            battle_menu_option_string = "* Inspect"
169
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
170
        }
171
        else if (battle_enemy_name == "trihecta")
172
        {
173
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
174
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
175
            battle_menu_option_string = "* Push"
176
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
177
        }
178
        else if (battle_enemy_name == "tri" || battle_enemy_name == "hec" || battle_enemy_name == "ta")
179
        {
180
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
181
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
182
            battle_menu_option_string = "* Laugh"
183
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
184
        }
185
        else if (battle_enemy_name == "martlet pacifist")
186
        {
187
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
188
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
189
            battle_menu_option_string = "* Rush"
190
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
191
        }
192
        else if (battle_enemy_name == "martlet genocide")
193
        {
194
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
195
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
196
            battle_menu_option_string = "* Apologize"
197
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
198
        }
199
        else if (battle_enemy_name == "dunebud a" || battle_enemy_name == "dunebud b")
200
        {
201
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
202
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
203
            battle_menu_option_string = "* Pat"
204
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
205
        }
206
        else if (battle_enemy_name == "cactony a")
207
        {
208
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
209
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
210
            battle_menu_option_string = "* Touch"
211
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
212
        }
213
        else if (battle_enemy_name == "slither a" || battle_enemy_name == "slither b")
214
        {
215
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
216
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
217
            battle_menu_option_string = "* Challenge"
218
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
219
        }
220
        else if (battle_enemy_name == "bowll a")
221
        {
222
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
223
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
224
            battle_menu_option_string = "* Clean"
225
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
226
        }
227
        else if (battle_enemy_name == "el bailador")
228
        {
229
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
230
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
231
            if (global.route != 3)
232
                battle_menu_option_string = "* Twirl"
233
            else
234
                battle_menu_option_string = "* Stare"
235
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
236
        }
237
        else if (battle_enemy_name == "flower girls")
238
        {
239
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
240
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
241
            switch global.dunes_flag[31]
242
            {
243
                case 1:
244
                    battle_menu_option_string = "* Flatter"
245
                    break
246
                case 2:
247
                    battle_menu_option_string = "* Accept"
248
                    break
249
                case 3:
250
                    battle_menu_option_string = "* Flatter"
251
                    break
252
            }
253
254
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
255
        }
256
        else if (battle_enemy_name == "dummy training pacifist")
257
        {
258
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
259
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
260
            battle_menu_option_string = "* Talk"
261
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
262
        }
263
        else if (battle_enemy_name == "ceroba genocide")
264
        {
265
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
266
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
267
            battle_menu_option_string = "* Resist"
268
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
269
        }
270
        else if (battle_enemy_name == "starlo")
271
        {
272
            if (global.attack_cycle < 10)
273
            {
274
                battle_menu_option_x = obj_dialogue_box_battle.x + argument0
275
                battle_menu_option_y = obj_dialogue_box_battle.y + argument1
276
                battle_menu_option_string = "* Struggle"
277
                script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
278
            }
279
            else if (global.turns_passed >= 18)
280
            {
281
                battle_menu_option_x = obj_dialogue_box_battle.x + argument0
282
                battle_menu_option_y = obj_dialogue_box_battle.y + argument1
283
                battle_menu_option_string = "* Surrender"
284
                script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
285
            }
286
            else
287
            {
288
                battle_menu_option_x = obj_dialogue_box_battle.x + argument0
289
                battle_menu_option_y = obj_dialogue_box_battle.y + argument1
290
                battle_menu_option_string = "* Spin"
291
                script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
292
            }
293
        }
294
        else if (battle_enemy_name == "ed" || battle_enemy_name == "moray" || battle_enemy_name == "ace" || battle_enemy_name == "mooch")
295
        {
296
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
297
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
298
            battle_menu_option_string = "* Steady"
299
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
300
        }
301
        else if (battle_enemy_name == "jandroid a" || battle_enemy_name == "jandroid b")
302
        {
303
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
304
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
305
            battle_menu_option_string = "* Question"
306
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
307
        }
308
        else if (battle_enemy_name == "tellyvis a")
309
        {
310
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
311
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
312
            battle_menu_option_string = "* Watch"
313
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
314
        }
315
        else if (battle_enemy_name == "goosic a" || battle_enemy_name == "goosic b")
316
        {
317
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
318
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
319
            battle_menu_option_string = "* Vibe"
320
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
321
        }
322
        else if (battle_enemy_name == "sousborg")
323
        {
324
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
325
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
326
            switch global.enemy_mode
327
            {
328
                case 0:
329
                    battle_menu_option_string = "* Crack"
330
                    break
331
                case 1:
332
                    battle_menu_option_string = "* Boil"
333
                    break
334
                case 2:
335
                    battle_menu_option_string = "* Refrigerate"
336
                    break
337
            }
338
339
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
340
        }
341
        else if (battle_enemy_name == "axis")
342
        {
343
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
344
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
345
            battle_menu_option_string = "* Brace"
346
            if (global.action_1_important == true)
347
            {
348
                if (global.route == 1)
349
                    battle_menu_option_string = "* Compliment"
350
                else if (global.route == 2)
351
                    battle_menu_option_string = "* Plan B"
352
            }
353
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
354
        }
355
        else if (battle_enemy_name == "macro froggit")
356
        {
357
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
358
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
359
            if (global.turns_passed == 0)
360
                battle_menu_option_string = "* Compliment"
361
            else
362
                battle_menu_option_string = "* Frog"
363
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
364
        }
365
        else if (battle_enemy_name == "axis genocide")
366
        {
367
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
368
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
369
            battle_menu_option_string = "* Push"
370
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
371
        }
372
        else if (battle_enemy_name == "guardener")
373
        {
374
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
375
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
376
            battle_menu_option_string = "* Gather"
377
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
378
        }
379
        else if (battle_enemy_name == "flowey")
380
        {
381
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
382
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
383
            switch global.flowey_act[0]
384
            {
385
                case 0:
386
                    battle_menu_option_string = "* Forget"
387
                    break
388
                case 1:
389
                    battle_menu_option_string = "* Scream"
390
                    break
391
                case 2:
392
                    battle_menu_option_string = "* Suffocate"
393
                    break
394
                case 3:
395
                    battle_menu_option_string = "* Hide"
396
                    break
397
                case 4:
398
                    battle_menu_option_string = "* Persist"
399
                    break
400
            }
401
402
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
403
        }
404
        else if (battle_enemy_name == "ceroba")
405
        {
406
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
407
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
408
            switch global.hotland_flag[2]
409
            {
410
                case 0:
411
                    battle_menu_option_string = "* Negotiate"
412
                    break
413
                default:
414
                    battle_menu_option_string = "* Hope"
415
                    break
416
            }
417
418
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
419
        }
420
        else if (battle_enemy_name == "martlet genocide final")
421
        {
422
            battle_menu_option_x = obj_dialogue_box_battle.x + argument0
423
            battle_menu_option_y = obj_dialogue_box_battle.y + argument1
424
            battle_menu_option_string = "* Remind"
425
            if (global.hotland_flag[9] >= 2)
426
                battle_menu_option_string = "* Focus"
427
            script_execute(gml_Script_scr_draw_text_effect_twitchy_textbox_battle_menu_options)
428
        }
429
    }
430
}