Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_generate_battle_jandroid_solo

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

function scr_generate_battle_jandroid_solo() { if (live_call()) return global.live_result; global.battle_enemy_name_1 = "jandroid a"; global.battle_menu_number = 1; global.speed_self = 4; global.invulnerability_self = global.player_invulnerability; global.attacking_damage_cap = -1; global.hit_self = false; global.hurt_self = false; global.current_hp_enemy = 150; global.max_hp_enemy = 150; global.last_hp_enemy = global.current_hp_enemy; global.current_hp_enemy_draw = global.current_hp_enemy; global.enemy_low_hp = false; global.enemy_hit = false; global.enemy_hurt = false; global.enemy_attack_stat = 11; global.enemy_defense_stat = 7; global.enemy_vulnerable = true; global.enemy_attacking = false; global.enemy_sparing = false; global.enemy_dead = false; global.enemy_spared = false; global.enemy_betrayed = false; global.enemy_fleeable = true; global.enemy_special_text = 0; global.enemy_exp = 0; global.enemy_gold = 18; global.enemy_count = 1; global.turns_passed = 0; global.last_action_selected = "Nothing"; global.last_action_selected_2 = "Nothing"; global.last_action_selected_3 = "Nothing"; global.action_1_important = false; global.action_2_important = false; global.action_3_important = false; global.action_1_color = 16777215; global.action_2_color = 16777215; global.action_3_color = 16777215; global.action_amount = 3; global.item_use = "Nothing"; global.item_used = "Nothing"; global.item_gift = "Nothing"; global.item_gifted = "Nothing"; global.image_alpha_enemy_attacking = 1; global.important_cutscene = false; global.can_attack = true; global.action_1_selected_count = 0; global.action_2_selected_count = 0; global.action_3_selected_count = 0; global.spare_selected_count = 0; global.hit_count = 0; global.miss_count = 0; global.no_hit_count = 0; global.hurt_self_count = 0; global.hurt_self_turn_count = 0; global.item_use_count = 0; global.item_gift_count = 0; global.enemy_mode = 0; global.enemy_mode_previous = 0; global.enemy_mode_gen = 0; global.enemy_mode_gen_previous = 0; scr_audio_stop_sound(0); script_execute(scr_determine_enemy_music_yellow); audio_extend = false; global.sound_carry_battle = false; global.mettaton_voice_count = 1; instance_create(316, 200, obj_jandroid_body_a); global.enemy_damage_x = obj_jandroid_body_a.x - 12; global.enemy_damage_y = obj_jandroid_body_a.y - 42; global.enemy_target_x = obj_jandroid_body_a.x - 12; global.enemy_target_y = obj_jandroid_body_a.y - 42; script_execute(scr_create_background_battle_yellow); instance_create(0, 0, obj_battle_fade_in_screen); instance_create(275, 400, obj_battle_hp_current_self); instance_create(275, 400, obj_battle_hp_max_self); instance_create(275, 400, obj_battle_hp_cover_self); instance_create(0, 0, obj_text_battle_stat_name); instance_create(0, 0, obj_text_battle_stat_lv); instance_create(244, 405, obj_text_hp); instance_create(0, 0, obj_text_hp_stat); instance_create(32, 250, obj_dialogue_box_battle); instance_create(31, 431, obj_fight); instance_create(184, 431, obj_act); instance_create(344, 431, obj_item); instance_create(499, 431, obj_mercy); global.last_text_move_select = 0; global.soul_mode = "Red"; instance_create(obj_fight.x + 17, obj_fight.y + 23, obj_heart_battle_menu); instance_create(0, 0, obj_dialogue_battle_move_select_intro); if (global.party_member != -4 && global.party_member.object_index == obj_ceroba_follower.object_index) { if (global.sworks_flag[4] == 0) { global.enemy_attacking = true; instance_destroy(obj_dialogue_box_battle); instance_create(319, 320, obj_dialogue_box_battle_transformation_any_out); instance_create(319, 320, obj_dialogue_box_battle_transformation_any); instance_destroy(obj_dialogue_box_battle_transformation_any_out); ...
()
2
{
3
    if (live_call())
4
        return global.live_result;
5
    global.battle_enemy_name_1 = "jandroid a";
6
    global.battle_menu_number = 1;
7
    global.speed_self = 4;
8
    global.invulnerability_self = global.player_invulnerability;
9
    global.attacking_damage_cap = -1;
10
    global.hit_self = false;
11
    global.hurt_self = false;
12
    global.current_hp_enemy = 150;
13
    global.max_hp_enemy = 150;
14
    global.last_hp_enemy = global.current_hp_enemy;
15
    global.current_hp_enemy_draw = global.current_hp_enemy;
16
    global.enemy_low_hp = false;
17
    global.enemy_hit = false;
18
    global.enemy_hurt = false;
19
    global.enemy_attack_stat = 11;
20
    global.enemy_defense_stat = 7;
21
    global.enemy_vulnerable = true;
22
    global.enemy_attacking = false;
23
    global.enemy_sparing = false;
24
    global.enemy_dead = false;
25
    global.enemy_spared = false;
26
    global.enemy_betrayed = false;
27
    global.enemy_fleeable = true;
28
    global.enemy_special_text = 0;
29
    global.enemy_exp = 0;
30
    global.enemy_gold = 18;
31
    global.enemy_count = 1;
32
    global.turns_passed = 0;
33
    global.last_action_selected = "Nothing";
34
    global.last_action_selected_2 = "Nothing";
35
    global.last_action_selected_3 = "Nothing";
36
    global.action_1_important = false;
37
    global.action_2_important = false;
38
    global.action_3_important = false;
39
    global.action_1_color = 16777215;
40
    global.action_2_color = 16777215;
41
    global.action_3_color = 16777215;
42
    global.action_amount = 3;
43
    global.item_use = "Nothing";
44
    global.item_used = "Nothing";
45
    global.item_gift = "Nothing";
46
    global.item_gifted = "Nothing";
47
    global.image_alpha_enemy_attacking = 1;
48
    global.important_cutscene = false;
49
    global.can_attack = true;
50
    global.action_1_selected_count = 0;
51
    global.action_2_selected_count = 0;
52
    global.action_3_selected_count = 0;
53
    global.spare_selected_count = 0;
54
    global.hit_count = 0;
55
    global.miss_count = 0;
56
    global.no_hit_count = 0;
57
    global.hurt_self_count = 0;
58
    global.hurt_self_turn_count = 0;
59
    global.item_use_count = 0;
60
    global.item_gift_count = 0;
61
    global.enemy_mode = 0;
62
    global.enemy_mode_previous = 0;
63
    global.enemy_mode_gen = 0;
64
    global.enemy_mode_gen_previous = 0;
65
    scr_audio_stop_sound
scr_audio_stop_sound

function scr_audio_stop_sound(arg0) { audio_array_val = 0; sound_y[audio_array_val] = 153; audio_array_val += 1; sound_y[audio_array_val] = 136; audio_array_val += 1; sound_y[audio_array_val] = 138; audio_array_val += 1; sound_y[audio_array_val] = 136; audio_array_val += 1; sound_y[audio_array_val] = 140; audio_array_val += 1; sound_y[audio_array_val] = 138; audio_array_val += 1; sound_y[audio_array_val] = 486; audio_array_val += 1; sound_y[audio_array_val] = 487; audio_array_val += 1; sound_y[audio_array_val] = 488; audio_array_val += 1; sound_y[audio_array_val] = 489; audio_array_val += 1; sound_y[audio_array_val] = 490; audio_array_val += 1; sound_y[audio_array_val] = 491; audio_array_val += 1; sound_y[audio_array_val] = 492; audio_array_val += 1; sound_y[audio_array_val] = 493; audio_array_val += 1; sound_y[audio_array_val] = 494; audio_array_val += 1; sound_y[audio_array_val] = 495; audio_array_val += 1; sound_y[audio_array_val] = 498; audio_array_val += 1; sound_y[audio_array_val] = 512; audio_array_val += 1; sound_y[audio_array_val] = 117; audio_array_val += 1; sound_y[audio_array_val] = 141; audio_array_val += 1; sound_y[audio_array_val] = 119; audio_array_val += 1; sound_y[audio_array_val] = 154; audio_array_val += 1; sound_y[audio_array_val] = 155; audio_array_val += 1; sound_y[audio_array_val] = 122; audio_array_val += 1; sound_y[audio_array_val] = 156; audio_array_val += 1; sound_y[audio_array_val] = 124; audio_array_val += 1; sound_y[audio_array_val] = 125; audio_array_val += 1; sound_y[audio_array_val] = 162; audio_array_val += 1; sound_y[audio_array_val] = 206; audio_array_val += 1; sound_y[audio_array_val] = 513; audio_array_val += 1; sound_y[audio_array_val] = 208; for (i = 0; i < array_length_1d(sound_y); i += 1) { var audio_gain = audio_sound_get_gain(sound_y[i]); if (audio_gain <= arg0) audio_stop_sound(sound_y[i]); } }
(0);
66
    script_execute(scr_determine_enemy_music_yellow);
67
    audio_extend = false;
68
    global.sound_carry_battle = false;
69
    global.mettaton_voice_count = 1;
70
    instance_create(316, 200, obj_jandroid_body_a);
71
    global.enemy_damage_x = obj_jandroid_body_a.x - 12;
72
    global.enemy_damage_y = obj_jandroid_body_a.y - 42;
73
    global.enemy_target_x = obj_jandroid_body_a.x - 12;
74
    global.enemy_target_y = obj_jandroid_body_a.y - 42;
75
    script_execute(scr_create_background_battle_yellow);
76
    instance_create(0, 0, obj_battle_fade_in_screen);
77
    instance_create(275, 400, obj_battle_hp_current_self);
78
    instance_create(275, 400, obj_battle_hp_max_self);
79
    instance_create(275, 400, obj_battle_hp_cover_self);
80
    instance_create(0, 0, obj_text_battle_stat_name);
81
    instance_create(0, 0, obj_text_battle_stat_lv);
82
    instance_create(244, 405, obj_text_hp);
83
    instance_create(0, 0, obj_text_hp_stat);
84
    instance_create(32, 250, obj_dialogue_box_battle);
85
    instance_create(31, 431, obj_fight);
86
    instance_create(184, 431, obj_act);
87
    instance_create(344, 431, obj_item);
88
    instance_create(499, 431, obj_mercy);
89
    global.last_text_move_select = 0;
90
    global.soul_mode = "Red";
91
    instance_create(obj_fight.x + 17, obj_fight.y + 23, obj_heart_battle_menu);
92
    instance_create(0, 0, obj_dialogue_battle_move_select_intro);
93
    if (global.party_member != -4 && global.party_member.object_index == obj_ceroba_follower.object_index)
94
    {
95
        if (global.sworks_flag[4] == 0)
96
        {
97
            global.enemy_attacking = true;
98
            instance_destroy(obj_dialogue_box_battle);
99
            instance_create(319, 320, obj_dialogue_box_battle_transformation_any_out);
100
            instance_create(319, 320, obj_dialogue_box_battle_transformation_any);
101
            instance_destroy(obj_dialogue_box_battle_transformation_any_out);
102
            instance_create(320, 320, obj_heart_battle_fighting_red);
103
            with (obj_heart_battle_fighting_parent)
104
            {
105
                image_alpha = 0;
106
                moveable = false;
107
            }
108
            with (obj_heart_battle_menu)
109
                image_alpha = 0;
110
            instance_destroy(obj_dialogue_battle_move_select_intro);
111
            global.boss_mini = false;
112
            global.enemy_attack = "Nothing";
113
            global.image_alpha_enemy_attacking_immunity = true;
114
            instance_create_depth(0, 0, 0, obj_steamworks_16_in_battle_cutscene);
115
        }
116
    }
117
}