1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
if (created_spawner != 0) |
4 |
created_spawner.attack_stop = true; |
5 |
var list_pos = irandom_range(0, ds_list_size(attack_list) - 1); |
6 |
var attack_choice = ds_list_find_value(attack_list, list_pos); |
7 |
var attack_index; |
8 |
do |
9 |
{ |
10 |
attack_index = ds_list_find_index(attack_list, attack_choice); |
11 |
ds_list_delete(attack_list, attack_index); |
12 |
} |
13 |
until (attack_index == -1); |
14 |
switch (attack_choice) |
15 |
{ |
16 |
case 0: |
17 |
created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_p2_spawner_mask); |
18 |
attack_duration = 90; |
19 |
break; |
20 |
case 1: |
21 |
created_spawner = instance_create_depth(0, 0, 0, obj_ceroba_attack_bullet_spawner_spawner); |
22 |
attack_duration = 80; |
23 |
break; |
24 |
case 2: |
25 |
created_spawner = instance_create_depth(0, 0, -100, obj_battle_enemy_attack_ceroba_phase_2_bell_spawner); |
26 |
attack_duration = 75; |
27 |
break; |
28 |
case 3: |
29 |
created_spawner = instance_create_depth(0, 0, 0, obj_ceroba_attack_fire_pillar_spawner); |
30 |
attack_duration = 40; |
31 |
break; |
32 |
case 4: |
33 |
created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_flower_circle_full_checker); |
34 |
attack_duration = 85; |
35 |
break; |
36 |
case 5: |
37 |
created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_diamond_attack_phase2_spawner); |
38 |
created_spawner.alarm[0] = 10; |
39 |
attack_duration = 20; |
40 |
break; |
41 |
case 6: |
42 |
created_spawner = instance_create_depth(battle_box.x, battle_box.y, -100, obj_battle_enemy_attack_ceroba_phase_2_p2_rope_circle); |
43 |
attack_duration = 60; |
44 |
break; |
45 |
case 7: |
46 |
created_spawner = instance_create_depth(0, 0, -100, obj_battle_enemy_attack_ceroba_phase_2_mask); |
47 |
attack_duration = 100; |
48 |
break; |
49 |
case 8: |
50 |
created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_p2_circling_lanterns); |
51 |
if (alarm[1] > 270) |
52 |
alarm[1] |
53 |
attack_duration =alarm[1] |
54 |
modifier_noloop = true; |
55 |
break; |
56 |
case 9: |
57 |
created_spawner = instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_p2_obstacle_spawner); |
58 |
if (alarm[1] > 270) |
59 |
alarm[1] |
60 |
attack_duration =alarm[1] |
61 |
modifier_noloop = true; |
62 |
break; |
63 |
} |
64 |
if (modifier_enabled == 1 && modifier_noloop == false) |
65 |
{ |
66 |
modifier_noloop = true; |
67 |
if (modifier_attack == 1) |
68 |
instance_create_depth(0, 0, 0, obj_battle_enemy_attack_ceroba_phase_2_black_hole_checker); |
69 |
if (modifier_attack == 2) |
70 |
instance_create_depth(battle_box.x, battle_box.y, -100, obj_battle_enemy_attack_ceroba_phase_2_p2_rope_circle); |
71 |
} |
72 |
show_debug_message("Spawning" + string(attack_choice)); |
73 |
if (attack_choice != 8 && attack_choice != 9) |
74 |
alarm[0] |
75 |
attack_index = ds_list_find_index(attack_list, 8); |
76 |
ds_list_delete(attack_list, attack_index); |
77 |
attack_index = ds_list_find_index(attack_list, 9); |
78 |
ds_list_delete(attack_list, attack_index); |