1 |
if (live_call()) |
2 |
return global.live_result; |
3 |
if (can_execute == false) |
4 |
exit; |
5 |
var fight_number = global.fight_number; |
6 |
var enemy_sparing, enemy_vulnerable, current_hp_enemy, attacking_damage_stat_critical, enemy_target_x, enemy_target_y; |
7 |
if (fight_number == 1) |
8 |
{ |
9 |
enemy_sparing = global.enemy_sparing; |
10 |
enemy_vulnerable = global.enemy_vulnerable; |
11 |
current_hp_enemy = global.current_hp_enemy; |
12 |
attacking_damage_stat_critical = global.attacking_damage_stat_critical; |
13 |
enemy_target_x = global.enemy_target_x; |
14 |
enemy_target_y = global.enemy_target_y; |
15 |
} |
16 |
else if (fight_number == 2) |
17 |
{ |
18 |
enemy_sparing = global.enemy_sparing_2; |
19 |
enemy_vulnerable = global.enemy_vulnerable_2; |
20 |
current_hp_enemy = global.current_hp_enemy_2; |
21 |
attacking_damage_stat_critical = global.attacking_damage_stat_critical_2; |
22 |
enemy_target_x = global.enemy_target_x_2; |
23 |
enemy_target_y = global.enemy_target_y_2; |
24 |
} |
25 |
else if (fight_number == 3) |
26 |
{ |
27 |
enemy_sparing = global.enemy_sparing_3; |
28 |
enemy_vulnerable = global.enemy_vulnerable_3; |
29 |
current_hp_enemy = global.current_hp_enemy_3; |
30 |
attacking_damage_stat_critical = global.attacking_damage_stat_critical_3; |
31 |
enemy_target_x = global.enemy_target_x_3; |
32 |
enemy_target_y = global.enemy_target_y_3; |
33 |
} |
34 |
script_execute(scr_controls_battle_reticle); |
35 |
if (outline <= 0 && no_loop == false) |
36 |
{ |
37 |
outline = 0; |
38 |
shrink = false; |
39 |
image_alpha = 0; |
40 |
alarm[0] = 1; |
41 |
no_loop = true; |
42 |
} |
43 |
if (key_select) |
44 |
{ |
45 |
var shot_sound; |
46 |
if ((outline < small_circle && ((enemy_sparing == true && enemy_vulnerable == true) || (enemy_vulnerable == true && current_hp_enemy <= attacking_damage_stat_critical))) || outline <= (small_circle * 0.5)) |
47 |
{ |
48 |
shot_type = "strong"; |
49 |
hit_object = 2913; |
50 |
shot_sound = audio_play_sound(snd_attackhitperfect, 1, 0); |
51 |
} |
52 |
else if (outline < small_circle && outline > (small_circle * 0.5)) |
53 |
{ |
54 |
shot_type = "medium"; |
55 |
hit_object = 2912; |
56 |
shot_sound = audio_play_sound(snd_attackhit, 1, 0); |
57 |
} |
58 |
else |
59 |
{ |
60 |
shrink = false; |
61 |
image_alpha = 0; |
62 |
alarm[0] = 5; |
63 |
no_loop = true; |
64 |
button_pressed = true; |
65 |
button_pressed_main = true; |
66 |
audio_play_sound(snd_fail, 1, 0); |
67 |
exit; |
68 |
} |
69 |
audio_sound_pitch(shot_sound, 1 + (obj_wild_revolver_battle_outline.target_current * 0.08)); |
70 |
instance_create(enemy_target_x, enemy_target_y, hit_object); |
71 |
shrink = false; |
72 |
button_pressed = true; |
73 |
button_pressed_main = true; |
74 |
} |
75 |
if (outline > 0 && shrink == true) |
76 |
outline -= shrink_speed; |
77 |
if (button_pressed_main == true && shrink == false) |
78 |
{ |
79 |
color_alt_total += color_alt_speed; |
80 |
if (color_alt_total >= color_alt_max) |
81 |
{ |
82 |
color_alt_total = 0; |
83 |
color_number += 1; |
84 |
if (color_number > 1) |
85 |
color_number = 0; |
86 |
} |
87 |
cursor_color = color[color_number]; |
88 |
color_number_2 = color_number + 1; |
89 |
if (color_number_2 > 1) |
90 |
color_number_2 = 0; |
91 |
outline_color = color[color_number_2]; |
92 |
} |