| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
if (instance_exists(obj_battle_enemy_attack_ceroba_phase_2_mask) && obj_battle_enemy_attack_ceroba_phase_2_mask.attack_stop == true) |
| 4 |
scene = 8; |
| 5 |
var spawn_delay = 0; |
| 6 |
var start_delay = 0.5; |
| 7 |
var fire_count = 7; |
| 8 |
var fire_distance = 60; |
| 9 |
var moving_time = 1; |
| 10 |
var pause_time = 0.75; |
| 11 |
if (global.hotland_flag[2] == 2) |
| 12 |
{ |
| 13 |
pause_time = 0.5; |
| 14 |
fire_distance = 75; |
| 15 |
} |
| 16 |
if (global.hotland_flag[2] == 3) |
| 17 |
{ |
| 18 |
pause_time = 0.2; |
| 19 |
fire_count = 9; |
| 20 |
fire_distance = 75; |
| 21 |
} |
| 22 |
scr_enemy_attack_bullet_hitscr_enemy_attack_bullet_hitfunction scr_enemy_attack_bullet_hit()
{
if (live_call())
return global.live_result;
if (variable_instance_exists(id, "bullet_hit_draw_timer"))
{
if (bullet_hit_draw_timer > 0)
bullet_hit_draw_timer -= 1;
}
var collider_id = instance_place(x, y, obj_heart_yellow_shot);
if (collider_id != -4)
{
var collider_object_index = collider_id.object_index;
instance_create_depth(collider_id.x, collider_id.bbox_top, -999, obj_heart_yellow_shot_destroy);
if (collider_object_index == 690)
{
if (object_index == obj_ceroba_phase_2_bell)
instance_destroy(collider_id);
if (variable_instance_exists(id, "collider_id_last") && collider_id_last == collider_id)
exit;
if (collider_object_index == 690)
collider_id_last = collider_id;
}
else if (collider_object_index == 2561)
{
if (variable_instance_exists(id, "collider_id_last") && collider_id_last == collider_id)
exit;
collider_id_last = collider_id;
}
else if (!variable_instance_exists(id, "collider_id_last") || collider_id != collider_id_last)
{
collider_id.alarm[0] = 1;
collider_id.image_alpha = 0;
collider_id_last = collider_id;
}
audio_play_sound(snd_arc_hit, 0.1, 0);
if (variable_instance_exists(id, "bullet_hit_points"))
{
bullet_hit_draw_timer = 5;
if (collider_object_index == 690)
bullet_hit_points -= 3;
else
bullet_hit_points -= 1;
if (bullet_hit_points <= 0)
bullet_destroy_self = true;
}
return true;
}
} (); |
| 23 |
if (bullet_destroy_self) |
| 24 |
{ |
| 25 |
instance_destroy(); |
| 26 |
instance_create_depth(x, y, depth, obj_ceroba_attack_fire_mask_destroy); |
| 27 |
} |
| 28 |
switch (scene) |
| 29 |
{ |
| 30 |
case 0: |
| 31 |
image_alpha += 0.1; |
| 32 |
if (global.hotland_flag[2] >= 2) |
| 33 |
image_alpha += 0.15; |
| 34 |
if (image_alpha >= 1) |
| 35 |
{ |
| 36 |
image_alpha = 1; |
| 37 |
scene++; |
| 38 |
} |
| 39 |
break; |
| 40 |
case 1: |
| 41 |
cutscene_wait(spawn_delay); |
| 42 |
break; |
| 43 |
case 2: |
| 44 |
var i = 0; |
| 45 |
while (i < 360) |
| 46 |
{ |
| 47 |
var xx = x + lengthdir_x(fire_distance, i); |
| 48 |
var yy = y + lengthdir_y(fire_distance, i); |
| 49 |
fireball_array[fireball_current] = instance_create_depth(xx, yy, -100, obj_ceroba_attack_fireball); |
| 50 |
fireball_array[fireball_current].alarm[0] = 1 + (fireball_current * 3); |
| 51 |
if (global.hotland_flag[2] >= 2) |
| 52 |
fireball_array[fireball_current].alarm[0] = 1 + (fireball_current * 1); |
| 53 |
fireball_dir[fireball_current] = i; |
| 54 |
fireball_current += 1; |
| 55 |
i += (360 / fire_count); |
| 56 |
} |
| 57 |
scene++; |
| 58 |
break; |
| 59 |
case 3: |
| 60 |
for (var i = 0; i < array_length(fireball_array); i++) |
| 61 |
{ |
| 62 |
if (instance_exists(fireball_array[i])) |
| 63 |
{ |
| 64 |
if (fireball_array[i].image_alpha < 1) |
| 65 |
exit; |
| 66 |
} |
| 67 |
} |
| 68 |
cutscene_wait(start_delay); |
| 69 |
break; |
| 70 |
case 4: |
| 71 |
x_target = obj_heart_battle_fighting_parent.x; |
| 72 |
y_target = obj_heart_battle_fighting_parent.y; |
| 73 |
direction = point_direction(x, y, x_target, y_target); |
| 74 |
scene++; |
| 75 |
break; |
| 76 |
case 5: |
| 77 |
multiplier = lerp(multiplier, 1, 0.15); |
| 78 |
cutscene_wait(moving_time); |
| 79 |
break; |
| 80 |
case 6: |
| 81 |
multiplier = lerp(multiplier, 0, 0.15); |
| 82 |
cutscene_wait(pause_time); |
| 83 |
break; |
| 84 |
case 7: |
| 85 |
if (attack_count > 0) |
| 86 |
{ |
| 87 |
scene = 4; |
| 88 |
attack_count -= 1; |
| 89 |
} |
| 90 |
else |
| 91 |
{ |
| 92 |
scene++; |
| 93 |
} |
| 94 |
break; |
| 95 |
case 8: |
| 96 |
image_alpha -= 0.2; |
| 97 |
for (var i = 0; i < array_length(fireball_array); i++) |
| 98 |
{ |
| 99 |
if (instance_exists(fireball_array[i])) |
| 100 |
fireball_array[i].image_alpha = image_alpha; |
| 101 |
} |
| 102 |
if (image_alpha < 0.2) |
| 103 |
{ |
| 104 |
instance_destroy(); |
| 105 |
exit; |
| 106 |
} |
| 107 |
break; |
| 108 |
} |
| 109 |
if (scene >= 4) |
| 110 |
{ |
| 111 |
for (var i = 0; i < array_length(fireball_array); i++) |
| 112 |
{ |
| 113 |
if (instance_exists(fireball_array[i])) |
| 114 |
{ |
| 115 |
var xx = x + lengthdir_x(fire_distance, fireball_dir[i] + dir_offset); |
| 116 |
var yy = y + lengthdir_y(fire_distance, fireball_dir[i] + dir_offset); |
| 117 |
fireball_array[i].x = xx; |
| 118 |
fireball_array[i].y = yy; |
| 119 |
} |
| 120 |
} |
| 121 |
} |
| 122 |
speed = move_speed_max * multiplier; |
| 123 |
spin_speed = spin_speed_max * multiplier; |
| 124 |
dir_offset -= spin_speed; |