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