1 |
var enemy_dead = global.enemy_dead |
2 |
var enemy_spared = global.enemy_spared |
3 |
if (global.turns_passed < 1 || instance_exists(obj_buff_froggit_body)) |
4 |
return; |
5 |
if (enemy_dead == false && enemy_spared == false) |
6 |
image_alpha = global.image_alpha_enemy_attacking |
7 |
if (enemy_dead == true) |
8 |
{ |
9 |
x = starting_point_x |
10 |
y = starting_point_y |
11 |
image_xscale = starting_point_xscale |
12 |
image_yscale = starting_point_yscale |
13 |
instance_create(starting_point_x, starting_point_y, obj_froggit_intro_dead_yellow) |
14 |
instance_destroy() |
15 |
return; |
16 |
} |
17 |
if (damage_disjoint_count > 0) |
18 |
damage_disjoint_count -= 1 |
19 |
else if (enemy_dead == false && enemy_spared == false) |
20 |
sprite_index = spr_macro_froggit_body |
21 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
22 |
{ |
23 |
image_speed = 0 |
24 |
image_index = 0 |
25 |
damage_disjoint_count = 12 |
26 |
no_loop_damage_disjoint_count = true |
27 |
} |
28 |
else if (!instance_exists(obj_text_damage_count)) |
29 |
no_loop_damage_disjoint_count = false |
30 |
if (damage_disjoint_count == 12) |
31 |
damage_disjoint_x = -50 |
32 |
else if (damage_disjoint_count == 10) |
33 |
damage_disjoint_x = 50 |
34 |
else if (damage_disjoint_count == 8) |
35 |
damage_disjoint_x = -20 |
36 |
else if (damage_disjoint_count == 6) |
37 |
damage_disjoint_x = 20 |
38 |
else if (damage_disjoint_count == 4) |
39 |
damage_disjoint_x = -10 |
40 |
else if (damage_disjoint_count == 2) |
41 |
damage_disjoint_x = 10 |
42 |
else if (damage_disjoint_count == 0) |
43 |
damage_disjoint_x = 0 |
44 |
if (damage_disjoint_count > 0 || global.current_hp_enemy <= 0) |
45 |
sprite_index = spr_macro_froggit_hurt |
46 |
x = draw_position_x + damage_disjoint_x |
47 |
y = draw_position_y + damage_disjoint_y |
48 |
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 1))) && enemy_dead == false && enemy_spared == false) |
49 |
image_speed = image_speed_default |