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