1 |
if (obj_dalv_body.cloak_direction == 0) |
2 |
{ |
3 |
var enemy_dead = global.enemy_dead; |
4 |
var enemy_spared = global.enemy_spared; |
5 |
var enemy_mode = global.enemy_mode; |
6 |
if (enemy_dead == false && enemy_spared == false) |
7 |
image_alpha = global.image_alpha_enemy_attacking; |
8 |
if (enemy_dead == true) |
9 |
{ |
10 |
instance_destroy(); |
11 |
exit; |
12 |
image_alpha = 0.5; |
13 |
} |
14 |
else if (enemy_spared == true) |
15 |
{ |
16 |
instance_destroy(); |
17 |
exit; |
18 |
} |
19 |
if (damage_disjoint_count > 0) |
20 |
{ |
21 |
damage_disjoint_count -= 1; |
22 |
} |
23 |
else if (enemy_dead == false && enemy_spared == false) |
24 |
{ |
25 |
if (global.current_hp_enemy <= 0) |
26 |
{ |
27 |
head_sprite = 1777; |
28 |
} |
29 |
else |
30 |
{ |
31 |
switch (enemy_mode) |
32 |
{ |
33 |
case 0: |
34 |
head_sprite = 1755; |
35 |
break; |
36 |
case 1: |
37 |
head_sprite = 1780; |
38 |
break; |
39 |
case 2: |
40 |
head_sprite = 1781; |
41 |
break; |
42 |
default: |
43 |
head_sprite = 1755; |
44 |
} |
45 |
} |
46 |
} |
47 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
48 |
{ |
49 |
damage_disjoint_count = 12; |
50 |
no_loop_damage_disjoint_count = true; |
51 |
} |
52 |
else if (!instance_exists(obj_text_damage_count)) |
53 |
{ |
54 |
no_loop_damage_disjoint_count = false; |
55 |
} |
56 |
if (damage_disjoint_count == 12) |
57 |
damage_disjoint_x = -50; |
58 |
else if (damage_disjoint_count == 10) |
59 |
damage_disjoint_x = 50; |
60 |
else if (damage_disjoint_count == 8) |
61 |
damage_disjoint_x = -20; |
62 |
else if (damage_disjoint_count == 6) |
63 |
damage_disjoint_x = 20; |
64 |
else if (damage_disjoint_count == 4) |
65 |
damage_disjoint_x = -10; |
66 |
else if (damage_disjoint_count == 2) |
67 |
damage_disjoint_x = 10; |
68 |
else if (damage_disjoint_count == 0) |
69 |
damage_disjoint_x = 0; |
70 |
if (damage_disjoint_count > 0) |
71 |
image_alpha = 0; |
72 |
} |
73 |
else |
74 |
{ |
75 |
head_sprite = 1759; |
76 |
} |