Undertale Yellow script viewer

← back to main script listing

gml_Object_obj_battle_enemy_attack_ceroba_phase_2_shield_bells_attack_Alarm_0

(view raw script w/o annotations or w/e)
1
if (live_call())
2
    return global.live_result;
3
if (!instance_exists(obj_ceroba_phase_2_shield))
4
    exit;
5
var shot_offset = 6;
6
var wave_offset = 15;
7
var bullet_number = 5;
8
var bullet_speed = 6;
9
var spawn_dir = bullet_spawn_direction;
10
if (current_bell == -4)
11
{
12
    bullet_spawn_direction = irandom_range(0, 360);
13
    do
14
        current_bell = instance_find(obj_ceroba_phase_2_bell, irandom(instance_number(obj_ceroba_phase_2_bell) - 1));
15
    until (current_bell != last_bell || instance_number(obj_ceroba_phase_2_bell) <= 1);
16
    last_bell = current_bell;
17
}
18
if (instance_exists(current_bell))
19
{
20
    with (current_bell)
21
    {
22
        var i = spawn_dir;
23
        while (i < (360 + spawn_dir))
24
        {
25
            var fireball = instance_create_depth(x, y, depth + 1, obj_ceroba_attack_fireball);
26
            fireball.direction = i;
27
            fireball.speed = bullet_speed;
28
            i += (360 / bullet_number);
29
        }
30
        image_xscale = 1.5;
31
        image_yscale = 1.5;
32
    }
33
}
34
else
35
{
36
    alarm[0] = wave_offset;
gml_Object_obj_battle_enemy_attack_ceroba_phase_2_shield_bells_attack_Alarm_0.gml

if (live_call()) return global.live_result; if (!instance_exists(obj_ceroba_phase_2_shield)) exit; var shot_offset = 6; var wave_offset = 15; var bullet_number = 5; var bullet_speed = 6; var spawn_dir = bullet_spawn_direction; if (current_bell == -4) { bullet_spawn_direction = irandom_range(0, 360); do current_bell = instance_find(obj_ceroba_phase_2_bell, irandom(instance_number(obj_ceroba_phase_2_bell) - 1)); until (current_bell != last_bell || instance_number(obj_ceroba_phase_2_bell) <= 1); last_bell = current_bell; } if (instance_exists(current_bell)) { with (current_bell) { var i = spawn_dir; while (i < (360 + spawn_dir)) { var fireball = instance_create_depth(x, y, depth + 1, obj_ceroba_attack_fireball); fireball.direction = i; fireball.speed = bullet_speed; i += (360 / bullet_number); } image_xscale = 1.5; image_yscale = 1.5; } } else { alarm[0] = wave_offset; current_bell = -4; shot_count = shot_count_max; exit; } if (shot_count > 1) { alarm[0] = shot_offset; shot_count -= 1; bullet_spawn_direction += bullet_spawn_direction_inc; } else { alarm[0] = wave_offset; current_bell = -4; shot_count = shot_count_max; }
37
    current_bell = -4;
38
    shot_count = shot_count_max;
39
    exit;
40
}
41
if (shot_count > 1)
42
{
43
    alarm[0] = shot_offset;
gml_Object_obj_battle_enemy_attack_ceroba_phase_2_shield_bells_attack_Alarm_0.gml

if (live_call()) return global.live_result; if (!instance_exists(obj_ceroba_phase_2_shield)) exit; var shot_offset = 6; var wave_offset = 15; var bullet_number = 5; var bullet_speed = 6; var spawn_dir = bullet_spawn_direction; if (current_bell == -4) { bullet_spawn_direction = irandom_range(0, 360); do current_bell = instance_find(obj_ceroba_phase_2_bell, irandom(instance_number(obj_ceroba_phase_2_bell) - 1)); until (current_bell != last_bell || instance_number(obj_ceroba_phase_2_bell) <= 1); last_bell = current_bell; } if (instance_exists(current_bell)) { with (current_bell) { var i = spawn_dir; while (i < (360 + spawn_dir)) { var fireball = instance_create_depth(x, y, depth + 1, obj_ceroba_attack_fireball); fireball.direction = i; fireball.speed = bullet_speed; i += (360 / bullet_number); } image_xscale = 1.5; image_yscale = 1.5; } } else { alarm[0] = wave_offset; current_bell = -4; shot_count = shot_count_max; exit; } if (shot_count > 1) { alarm[0] = shot_offset; shot_count -= 1; bullet_spawn_direction += bullet_spawn_direction_inc; } else { alarm[0] = wave_offset; current_bell = -4; shot_count = shot_count_max; }
44
    shot_count -= 1;
45
    bullet_spawn_direction += bullet_spawn_direction_inc;
46
}
47
else
48
{
49
    alarm[0] = wave_offset;
gml_Object_obj_battle_enemy_attack_ceroba_phase_2_shield_bells_attack_Alarm_0.gml

if (live_call()) return global.live_result; if (!instance_exists(obj_ceroba_phase_2_shield)) exit; var shot_offset = 6; var wave_offset = 15; var bullet_number = 5; var bullet_speed = 6; var spawn_dir = bullet_spawn_direction; if (current_bell == -4) { bullet_spawn_direction = irandom_range(0, 360); do current_bell = instance_find(obj_ceroba_phase_2_bell, irandom(instance_number(obj_ceroba_phase_2_bell) - 1)); until (current_bell != last_bell || instance_number(obj_ceroba_phase_2_bell) <= 1); last_bell = current_bell; } if (instance_exists(current_bell)) { with (current_bell) { var i = spawn_dir; while (i < (360 + spawn_dir)) { var fireball = instance_create_depth(x, y, depth + 1, obj_ceroba_attack_fireball); fireball.direction = i; fireball.speed = bullet_speed; i += (360 / bullet_number); } image_xscale = 1.5; image_yscale = 1.5; } } else { alarm[0] = wave_offset; current_bell = -4; shot_count = shot_count_max; exit; } if (shot_count > 1) { alarm[0] = shot_offset; shot_count -= 1; bullet_spawn_direction += bullet_spawn_direction_inc; } else { alarm[0] = wave_offset; current_bell = -4; shot_count = shot_count_max; }
50
    current_bell = -4;
51
    shot_count = shot_count_max;
52
}