Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_flowey_battle_final_Create_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
global.battle_enemy_name = "flowey2";
4
scr_generate_battle_flowey_phase_2
scr_generate_battle_flowey_phase_2

function scr_generate_battle_flowey_phase_2() { if (live_call()) return global.live_result; global.battle_enemy_name_1 = "flowey2"; 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.current_hp_self = 100; global.max_hp_self = 100; 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 = 99; 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; 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; global.soul_mode = "Red"; global.boss_mini = false; }
();
5
if (!variable_global_exists("flowey_phase_2_noloop"))
6
    global.flowey_phase_2_noloop = false;
7
intro_noloop = false;
8
scene = 0;
9
cutscene_timer = 0;
10
draw_alpha = 0;
11
white_alpha = 0;
12
clover_alpha = 1;
13
clover_offset_x = 0;
14
clover_offset_y = 0;
15
clover_shake_strength = 0;
16
soul_overlay_alpha = 0;
17
obj_heart_battle_fighting_yellow_final.image_alpha = 0;
18
timestamp_current = 0;
19
timestamp = [7.36, 9.7, 10.84, 12.94, 15.6, 17.45];
20
timestamp_image_index = [0, 1, 2, 1, 2, 0];
21
intro_song = audio_play_sound(mus_crescendo_of_dread, 1, 0);
22
image_speed = 0;
23
switch_timer = 25;
24
stage_switch = -1;
25
stage_current = 0;
26
sprite_flowey[0] = 2807;
27
sprite_flowey[1] = 3141;
28
sprite_flowey[2] = 2974;
29
sprite_flowey[3] = 3398;
30
sprite_flowey[4] = 2242;
31
sprite_flowey[5] = 2792;
32
sprite_flowey[6] = 3586;
33
music_flowey[0] = 171;
34
music_flowey[1] = 585;
35
music_flowey[2] = 637;
36
music_flowey[3] = 22;
37
music_flowey[4] = 527;
38
music_flowey[5] = 51;
39
music_flowey[6] = 599;
40
controller_flowey[0] = 56;
41
controller_flowey[1] = 659;
42
controller_flowey[2] = 707;
43
controller_flowey[3] = 1709;
44
controller_flowey[4] = 2938;
45
controller_flowey[5] = 986;
46
controller_flowey[6] = 446;
47
petal_alive = [1, 1, 1, 1, 1, 1];
48
petal_count = 6;
49
hp_bar_alpha = 0;
50
if (global.flowey_phase_2_noloop == true)
51
{
52
    obj_heart_battle_fighting_yellow_final.image_alpha = 1;
53
    clover_alpha = 0;
54
    scene = 8;
55
    audio_stop_sound(intro_song);
56
    if (file_exists("tempsave.sav"))
57
    {
58
        ini_open("tempsave.sav");
59
        for (var i = 0; i < array_length(petal_alive); i++)
60
            petal_alive[i] = ini_read_real("petal", string(i), 1);
61
        petal_count = ini_read_real("petal", "count", 6);
62
        ini_close();
63
    }
64
    if (petal_count < 6)
65
        switch_timer = 20;
66
}
67
global.current_hp_self = 100;
68
global.max_hp_self = 100;