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 |
exit; |
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 |
exit; |
16 |
image_alpha = 0.5; |
17 |
} |
18 |
if (damage_disjoint_count > 0) |
19 |
damage_disjoint_count -= 1; |
20 |
else if (enemy_dead == false && enemy_spared == false) |
21 |
sprite_index = spr_macro_froggit_body; |
22 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
23 |
{ |
24 |
image_speed = 0; |
25 |
image_index = 0; |
26 |
damage_disjoint_count = 12; |
27 |
no_loop_damage_disjoint_count = true; |
28 |
} |
29 |
else if (!instance_exists(obj_text_damage_count)) |
30 |
{ |
31 |
no_loop_damage_disjoint_count = false; |
32 |
} |
33 |
if (damage_disjoint_count == 12) |
34 |
damage_disjoint_x = -50; |
35 |
else if (damage_disjoint_count == 10) |
36 |
damage_disjoint_x = 50; |
37 |
else if (damage_disjoint_count == 8) |
38 |
damage_disjoint_x = -20; |
39 |
else if (damage_disjoint_count == 6) |
40 |
damage_disjoint_x = 20; |
41 |
else if (damage_disjoint_count == 4) |
42 |
damage_disjoint_x = -10; |
43 |
else if (damage_disjoint_count == 2) |
44 |
damage_disjoint_x = 10; |
45 |
else if (damage_disjoint_count == 0) |
46 |
damage_disjoint_x = 0; |
47 |
if (damage_disjoint_count > 0 || global.current_hp_enemy <= 0) |
48 |
sprite_index = spr_macro_froggit_hurt; |
49 |
x = draw_position_x + damage_disjoint_x; |
50 |
y = draw_position_y + damage_disjoint_y; |
51 |
if (!(instance_exists(obj_text_damage_count) && global.fight_number == 1) && enemy_dead == false && enemy_spared == false) |
52 |
image_speed = image_speed_default; |