Undertale Yellow script viewer

← back to main script listing

gml_GlobalScript_scr_generate_battle_flowey

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

function scr_generate_battle_flowey() //gml_Script_scr_generate_battle_flowey { if live_call() return global.live_result; global.battle_enemy_name_1 = "flowey" 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 = 1000 global.max_hp_enemy = 1000 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 = 2 global.enemy_defense_stat = 15 global.enemy_vulnerable = true global.enemy_attacking = true global.enemy_sparing = false global.enemy_dead = false global.enemy_spared = false global.enemy_betrayed = false global.enemy_fleeable = false global.enemy_special_text = 0 global.enemy_exp = 1500 global.enemy_gold = 20 global.enemy_count = 1 global.turns_passed = 0 global.last_action_selected = "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 = 0 global.important_cutscene = false global.can_attack = true global.action_1_selected_count = 0 global.action_2_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.attack_cycle = 0 global.attack_cycle_max = 7 global.enemy_mode = 0 global.enemy_mode_previous = 0 global.current_hp_self = 100 global.max_hp_self = 100 global.player_armor_modifier_defense = 0 global.player_defense = 0 if (global.sound_carry_overworld == false) scr_audio_stop_sound(0) audio_extend = false global.sound_carry_battle = false global.mettaton_voice_count = 1 global.enemy_target_x = 320 global.enemy_target_y = 60 global.last_text_move_select = -1 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(319, 320, 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.soul_mode = "Red" instance_create((obj_fight.x + 17), (obj_fight.y + 23), obj_heart_battle_menu) with (obj_heart_battle_menu) image_alpha = 0 global.boss_mini = false global.enemy_attack = "Flowey Opener" global.image_alpha_enemy_attacking_immunity = true global.battle_phase = 1 if (!instance_exists(obj_flowey_1_controller_base)) instance_create_depth(0, 0, 0, obj_flowey_1_controller_base) if (global.flowey_battle_1_phase > 1 || global.death_count[7] > 0) { obj_dialogue_box_battle.x = 32 obj_dialogue_box_battle.y = 250 global.enemy_attacking = false ...
() //gml_Script_scr_generate_battle_flowey
2
{
3
    if live_call()
4
        return global.live_result;
5
    global.battle_enemy_name_1 = "flowey"
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 = 1000
13
    global.max_hp_enemy = 1000
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 = 2
20
    global.enemy_defense_stat = 15
21
    global.enemy_vulnerable = true
22
    global.enemy_attacking = true
23
    global.enemy_sparing = false
24
    global.enemy_dead = false
25
    global.enemy_spared = false
26
    global.enemy_betrayed = false
27
    global.enemy_fleeable = false
28
    global.enemy_special_text = 0
29
    global.enemy_exp = 1500
30
    global.enemy_gold = 20
31
    global.enemy_count = 1
32
    global.turns_passed = 0
33
    global.last_action_selected = "Nothing"
34
    global.action_1_important = false
35
    global.action_2_important = false
36
    global.action_3_important = false
37
    global.action_1_color = 16777215
38
    global.action_2_color = 16777215
39
    global.action_3_color = 16777215
40
    global.action_amount = 3
41
    global.item_use = "Nothing"
42
    global.item_used = "Nothing"
43
    global.item_gift = "Nothing"
44
    global.item_gifted = "Nothing"
45
    global.image_alpha_enemy_attacking = 0
46
    global.important_cutscene = false
47
    global.can_attack = true
48
    global.action_1_selected_count = 0
49
    global.action_2_selected_count = 0
50
    global.spare_selected_count = 0
51
    global.hit_count = 0
52
    global.miss_count = 0
53
    global.no_hit_count = 0
54
    global.hurt_self_count = 0
55
    global.hurt_self_turn_count = 0
56
    global.item_use_count = 0
57
    global.item_gift_count = 0
58
    global.attack_cycle = 0
59
    global.attack_cycle_max = 7
60
    global.enemy_mode = 0
61
    global.enemy_mode_previous = 0
62
    global.current_hp_self = 100
63
    global.max_hp_self = 100
64
    global.player_armor_modifier_defense = 0
65
    global.player_defense = 0
66
    if (global.sound_carry_overworld == false)
67
        scr_audio_stop_sound
scr_audio_stop_sound

function scr_audio_stop_sound(argument0) //gml_Script_scr_audio_stop_sound { audio_array_val = 0 sound_y[audio_array_val] = mus_apprehension_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_dalvbattle_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_dalvopening_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_dalvbattle_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_decibat_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_dalvopening_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_attack_01_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_attack_02_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_attack_03_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_attack_04_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_attack_05_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_attack_06_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_attack_07_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_attack_08_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_attack_09_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_attack_10_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_attack_finale_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_danza_battle_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_floweynew_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_funsized_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_genobattle_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_mart_geno_wind_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_martletbattle_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_nobodycame_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_occupied_turf_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_prebattle1_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_prebattle2_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_battle_snowdin audio_array_val += 1 sound_y[audio_array_val] = mus_trial_by_fury audio_array_val += 1 sound_y[audio_array_val] = mus_prebattle3_yellow audio_array_val += 1 sound_y[audio_array_val] = mus_heatwave_approaching for (i = 0; i < array_length_1d(sound_y); i += 1) { var audio_gain = audio_sound_get_gain(sound_y[i]) if (audio_gain <= argument0) audio_stop_sound(sound_y[i]) } }
(0)
68
    audio_extend = false
69
    global.sound_carry_battle = false
70
    global.mettaton_voice_count = 1
71
    global.enemy_target_x = 320
72
    global.enemy_target_y = 60
73
    global.last_text_move_select = -1
74
    instance_create(0, 0, obj_battle_fade_in_screen)
75
    instance_create(275, 400, obj_battle_hp_current_self)
76
    instance_create(275, 400, obj_battle_hp_max_self)
77
    instance_create(275, 400, obj_battle_hp_cover_self)
78
    instance_create(0, 0, obj_text_battle_stat_name)
79
    instance_create(0, 0, obj_text_battle_stat_lv)
80
    instance_create(244, 405, obj_text_hp)
81
    instance_create(0, 0, obj_text_hp_stat)
82
    instance_create(319, 320, obj_dialogue_box_battle)
83
    instance_create(31, 431, obj_fight)
84
    instance_create(184, 431, obj_act)
85
    instance_create(344, 431, obj_item)
86
    instance_create(499, 431, obj_mercy)
87
    global.soul_mode = "Red"
88
    instance_create((obj_fight.x + 17), (obj_fight.y + 23), obj_heart_battle_menu)
89
    with (obj_heart_battle_menu)
90
        image_alpha = 0
91
    global.boss_mini = false
92
    global.enemy_attack = "Flowey Opener"
93
    global.image_alpha_enemy_attacking_immunity = true
94
    global.battle_phase = 1
95
    if (!instance_exists(obj_flowey_1_controller_base))
96
        instance_create_depth(0, 0, 0, obj_flowey_1_controller_base)
97
    if (global.flowey_battle_1_phase > 1 || global.death_count[7] > 0)
98
    {
99
        obj_dialogue_box_battle.x = 32
100
        obj_dialogue_box_battle.y = 250
101
        global.enemy_attacking = false
102
        with (obj_heart_battle_menu)
103
            image_alpha = 1
104
        instance_create_depth((obj_dialogue_box_battle.x + 20), (obj_dialogue_box_battle.x + 20), -642, obj_dialogue_battle_move_select_flowey)
105
        instance_create(0, 0, obj_attack_cycler_flowey)
106
        instance_destroy(obj_attack_cycler_flowey)
107
        global.turns_passed = 1
108
        instance_create_depth(0, 0, 0, obj_battle_flowey_background_ui)
109
        instance_create_depth(320, 140, 0, obj_battle_flowey_body_1)
110
        obj_battle_flowey_body_1.can_draw_ghost = true
111
        if (!audio_is_playing(mus_flowey_final_boss_1_main))
112
            global.battle_music = audio_play_sound(mus_flowey_final_boss_1_main, 1, 1)
113
    }
114
}