| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
if (execute_create == true) |
| 4 |
{ |
| 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_multi); |
| 35 |
for (i = 0; i <= final_circle; i++) |
| 36 |
{ |
| 37 |
if (outline[i] <= 0 && shrink[i] == true) |
| 38 |
{ |
| 39 |
outline[i] = 0; |
| 40 |
shrink[i] = false; |
| 41 |
imagea[i] = 0; |
| 42 |
audio_play_sound(snd_fail, 1, 0); |
| 43 |
shrink_speed = 0; |
| 44 |
circle_current = final_circle + 1; |
| 45 |
var missed_shot = true; |
| 46 |
alarm[0] = 10; |
| 47 |
no_loop = true; |
| 48 |
} |
| 49 |
} |
| 50 |
if (key_select && circle_current <= final_circle) |
| 51 |
{ |
| 52 |
var missed_shot = false; |
| 53 |
var enemy_target_x_offset = 0; |
| 54 |
var enemy_target_y_offset = 0; |
| 55 |
switch (global.player_weapon_modifier) |
| 56 |
{ |
| 57 |
case "Flint": |
| 58 |
case "Ice Pellets": |
| 59 |
enemy_target_x_offset = irandom_range(-40, 40); |
| 60 |
enemy_target_y_offset = irandom_range(-40, 40); |
| 61 |
break; |
| 62 |
default: |
| 63 |
enemy_target_x_offset = 0; |
| 64 |
enemy_target_y_offset = 0; |
| 65 |
break; |
| 66 |
} |
| 67 |
if (outline[circle_current] >= small_circle) |
| 68 |
{ |
| 69 |
outline[circle_current] = 0; |
| 70 |
shrink[circle_current] = false; |
| 71 |
imagea[circle_current] = 0; |
| 72 |
shrink_speed = 0; |
| 73 |
circle_current = final_circle + 1; |
| 74 |
missed_shot = true; |
| 75 |
audio_play_sound(snd_fail, 1, 0); |
| 76 |
alarm[0] = 10; |
| 77 |
no_loop = true; |
| 78 |
} |
| 79 |
else if ((enemy_sparing == true && enemy_vulnerable == true) || (enemy_vulnerable == true && current_hp_enemy <= attacking_damage_stat_critical) || outline[circle_current] <= (small_circle * 0.25)) |
| 80 |
{ |
| 81 |
hit[circle_current] = 2; |
| 82 |
color_hit_number[circle_current] = 1; |
| 83 |
shot_total += 3; |
| 84 |
if (circle_current == final_circle) |
| 85 |
hit_object = 2913; |
| 86 |
else |
| 87 |
hit_object = 2916; |
| 88 |
} |
| 89 |
else if (outline[circle_current] <= (small_circle * 0.6) && outline[circle_current] > (small_circle * 0.25)) |
| 90 |
{ |
| 91 |
hit[circle_current] = 1; |
| 92 |
color_hit_number[circle_current] = 0; |
| 93 |
shot_total += 2; |
| 94 |
if (circle_current == final_circle) |
| 95 |
hit_object = 2912; |
| 96 |
else |
| 97 |
hit_object = 2915; |
| 98 |
} |
| 99 |
else if (outline[circle_current] < small_circle && outline[circle_current] > (small_circle * 0.6)) |
| 100 |
{ |
| 101 |
hit[circle_current] = 1; |
| 102 |
color_hit_number[circle_current] = 0; |
| 103 |
shot_total += 1; |
| 104 |
if (circle_current == final_circle) |
| 105 |
hit_object = 2911; |
| 106 |
else |
| 107 |
hit_object = 2914; |
| 108 |
} |
| 109 |
if (missed_shot == false) |
| 110 |
{ |
| 111 |
instance_create(enemy_target_x + enemy_target_x_offset, enemy_target_y + enemy_target_y_offset, hit_object); |
| 112 |
shrink[circle_current] = false; |
| 113 |
button_pressed = true; |
| 114 |
} |
| 115 |
circle_current += 1; |
| 116 |
} |
| 117 |
for (i = 0; i <= final_circle; i++) |
| 118 |
{ |
| 119 |
if (outline[i] > 0 && shrink[i] == true) |
| 120 |
{ |
| 121 |
outline[i] -= shrink_speed; |
| 122 |
if (outline[i] < 0) |
| 123 |
outline[i] = 0; |
| 124 |
} |
| 125 |
if (shrink[i] == false && imagea[i] > 0) |
| 126 |
{ |
| 127 |
if (hit[i] == 2) |
| 128 |
{ |
| 129 |
color_alt_total[i] += color_alt_speed; |
| 130 |
if (color_alt_total[i] >= color_alt_max) |
| 131 |
{ |
| 132 |
color_alt_total[i] = 0; |
| 133 |
color_hit_number[i] += 1; |
| 134 |
if (color_hit_number[i] > 2) |
| 135 |
color_hit_number[i] = 0; |
| 136 |
} |
| 137 |
} |
| 138 |
if (hit[i] != 0) |
| 139 |
{ |
| 140 |
cursor_color[i] = color_hit[color_hit_number[i]]; |
| 141 |
outline_color[i] = color_hit[color_hit_number[i]]; |
| 142 |
} |
| 143 |
thickness[i] += thick_increase; |
| 144 |
imagea[i] -= imagea_dec; |
| 145 |
if (imagea[i] < 0) |
| 146 |
imagea[i] = 0; |
| 147 |
} |
| 148 |
} |
| 149 |
if (no_loop == false) |
| 150 |
{ |
| 151 |
if (outline[final_circle] == 0 && hit[final_circle] == false) |
| 152 |
{ |
| 153 |
if (!instance_exists(obj_strike_fake)) |
| 154 |
{ |
| 155 |
if (button_pressed == true) |
| 156 |
alarm[0] = 3; |
| 157 |
else |
| 158 |
alarm[0] = 1; |
| 159 |
no_loop = true; |
| 160 |
} |
| 161 |
} |
| 162 |
} |
| 163 |
} |