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