1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
|
4 |
function shoot_fail() |
5 |
{ |
6 |
if (!shoot_miss) |
7 |
{ |
8 |
gun_spin = false; |
9 |
hit[circle_current] = 0; |
10 |
color_hit_number[circle_current] = 0; |
11 |
button_pressed = true; |
12 |
if (shot_add == 0) |
13 |
button_pressed = false; |
14 |
var shot_sound = audio_play_sound(snd_fail, 1, 0); |
15 |
shrink[circle_current] = false; |
16 |
shrink_speed = 0; |
17 |
alarm[0] = 20;gml_Object_obj_wild_revolver_circle_multi_pre_Alarm_0.gmlwith (obj_target_bar_battle)
{
shot_total_pre += obj_wild_revolver_circle_multi_pre.shot_add;
if (button_pressed_pre == false)
button_pressed_pre = obj_wild_revolver_circle_multi_pre.button_pressed;
if (other.shoot_miss == true)
alarm[0] = 1;
}
with (obj_wild_revolver_battle_outline)
continue_shot = obj_wild_revolver_circle_multi_pre.button_pressed;
instance_destroy(); |
18 |
shoot_miss = true; |
19 |
key_select = 0; |
20 |
no_loop = true; |
21 |
} |
22 |
} |
23 |
|
24 |
if (execute_create == true) |
25 |
{ |
26 |
if (can_execute == false) |
27 |
exit; |
28 |
var fight_number = global.fight_number; |
29 |
var enemy_sparing, enemy_vulnerable, current_hp_enemy, attacking_damage_stat_critical, enemy_target_x, enemy_target_y; |
30 |
if (fight_number == 1) |
31 |
{ |
32 |
enemy_sparing = global.enemy_sparing; |
33 |
enemy_vulnerable = global.enemy_vulnerable; |
34 |
current_hp_enemy = global.current_hp_enemy; |
35 |
attacking_damage_stat_critical = global.attacking_damage_stat_critical; |
36 |
enemy_target_x = global.enemy_target_x; |
37 |
enemy_target_y = global.enemy_target_y; |
38 |
} |
39 |
else if (fight_number == 2) |
40 |
{ |
41 |
enemy_sparing = global.enemy_sparing_2; |
42 |
enemy_vulnerable = global.enemy_vulnerable_2; |
43 |
current_hp_enemy = global.current_hp_enemy_2; |
44 |
attacking_damage_stat_critical = global.attacking_damage_stat_critical_2; |
45 |
enemy_target_x = global.enemy_target_x_2; |
46 |
enemy_target_y = global.enemy_target_y_2; |
47 |
} |
48 |
else if (fight_number == 3) |
49 |
{ |
50 |
enemy_sparing = global.enemy_sparing_3; |
51 |
enemy_vulnerable = global.enemy_vulnerable_3; |
52 |
current_hp_enemy = global.current_hp_enemy_3; |
53 |
attacking_damage_stat_critical = global.attacking_damage_stat_critical_3; |
54 |
enemy_target_x = global.enemy_target_x_3; |
55 |
enemy_target_y = global.enemy_target_y_3; |
56 |
} |
57 |
script_execute(scr_controls_battle_reticle_multi); |
58 |
for (i = 0; i <= final_circle; i++) |
59 |
{ |
60 |
if (outline[i] <= 0 && shrink[i] == true) |
61 |
{ |
62 |
outline[i] = 0; |
63 |
shrink[i] = false; |
64 |
imagea[i] = 0; |
65 |
circle_current += 1; |
66 |
} |
67 |
} |
68 |
if (key_select) |
69 |
{ |
70 |
var shot_sound; |
71 |
if (outline[circle_current] > small_circle) |
72 |
{ |
73 |
shoot_fail(); |
74 |
exit; |
75 |
} |
76 |
else if ((enemy_sparing == true && enemy_vulnerable == true) || (enemy_vulnerable == true && current_hp_enemy <= attacking_damage_stat_critical) || outline[circle_current] <= (small_circle * 0.5)) |
77 |
{ |
78 |
gun_spin = true; |
79 |
hit[circle_current] = 2; |
80 |
color_hit_number[circle_current] = 1; |
81 |
shot_add += 3; |
82 |
if (circle_current == final_circle) |
83 |
hit_object = 2916; |
84 |
else |
85 |
hit_object = 2916; |
86 |
shot_sound = audio_play_sound(snd_attackhitperfect, 1, 0); |
87 |
} |
88 |
else if (outline[circle_current] <= small_circle && outline[circle_current] > (small_circle * 0.5)) |
89 |
{ |
90 |
gun_spin = true; |
91 |
hit[circle_current] = 1; |
92 |
color_hit_number[circle_current] = 0; |
93 |
shot_add += 2; |
94 |
if (circle_current == final_circle) |
95 |
hit_object = 2915; |
96 |
else |
97 |
hit_object = 2915; |
98 |
shot_sound = audio_play_sound(snd_attackhit, 1, 0); |
99 |
} |
100 |
audio_sound_pitch(shot_sound, 1 + (obj_wild_revolver_battle_outline.target_current * 0.08)); |
101 |
instance_create(enemy_target_x + irandom_range(-50, 50), enemy_target_y + irandom_range(-50, 50), hit_object); |
102 |
shrink[circle_current] = false; |
103 |
button_pressed = true; |
104 |
button_pressed_main = true; |
105 |
circle_current += 1; |
106 |
if (circle_current > final_circle) |
107 |
alarm[0] = 5;gml_Object_obj_wild_revolver_circle_multi_pre_Alarm_0.gmlwith (obj_target_bar_battle)
{
shot_total_pre += obj_wild_revolver_circle_multi_pre.shot_add;
if (button_pressed_pre == false)
button_pressed_pre = obj_wild_revolver_circle_multi_pre.button_pressed;
if (other.shoot_miss == true)
alarm[0] = 1;
}
with (obj_wild_revolver_battle_outline)
continue_shot = obj_wild_revolver_circle_multi_pre.button_pressed;
instance_destroy(); |
108 |
key_select = 0; |
109 |
} |
110 |
for (i = 0; i <= final_circle; i++) |
111 |
{ |
112 |
if (outline[i] > 0 && shrink[i] == true) |
113 |
{ |
114 |
outline[i] -= shrink_speed; |
115 |
if (outline[i] <= 0) |
116 |
{ |
117 |
outline[i] = 0; |
118 |
shoot_fail(); |
119 |
} |
120 |
} |
121 |
if (shrink[i] == false && imagea[i] > 0) |
122 |
{ |
123 |
if (hit[i] == 2) |
124 |
{ |
125 |
color_alt_total[i] += color_alt_speed; |
126 |
if (color_alt_total[i] >= color_alt_max) |
127 |
{ |
128 |
color_alt_total[i] = 0; |
129 |
color_hit_number[i] += 1; |
130 |
if (color_hit_number[i] > 2) |
131 |
color_hit_number[i] = 0; |
132 |
} |
133 |
} |
134 |
if (hit[i] != 0) |
135 |
{ |
136 |
cursor_color[i] = color_hit[color_hit_number[i]]; |
137 |
outline_color[i] = color_hit[color_hit_number[i]]; |
138 |
} |
139 |
thickness[i] += thick_increase; |
140 |
imagea[i] -= imagea_dec; |
141 |
if (imagea[i] < 0) |
142 |
imagea[i] = 0; |
143 |
} |
144 |
} |
145 |
if (no_loop == false) |
146 |
{ |
147 |
if (outline[final_circle] == 0 && hit[final_circle] == false) |
148 |
{ |
149 |
if (!instance_exists(obj_strike_fake)) |
150 |
{ |
151 |
alarm[0] = 5;gml_Object_obj_wild_revolver_circle_multi_pre_Alarm_0.gmlwith (obj_target_bar_battle)
{
shot_total_pre += obj_wild_revolver_circle_multi_pre.shot_add;
if (button_pressed_pre == false)
button_pressed_pre = obj_wild_revolver_circle_multi_pre.button_pressed;
if (other.shoot_miss == true)
alarm[0] = 1;
}
with (obj_wild_revolver_battle_outline)
continue_shot = obj_wild_revolver_circle_multi_pre.button_pressed;
instance_destroy(); |
152 |
no_loop = true; |
153 |
} |
154 |
} |
155 |
} |
156 |
} |