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