1 |
if (global.current_hp_enemy_draw <= 0 && damage_disjoint_x == 0) |
2 |
{ |
3 |
if (!global.enemy_dead) |
4 |
{ |
5 |
global.enemy_dead = true |
6 |
instance_create(402, 68, obj_quote_bubble_battle_yellow_2) |
7 |
instance_create_depth(0, 0, -1000, obj_quote_battle_guardener_death) |
8 |
} |
9 |
} |
10 |
if (global.enemy_dead == true && (!instance_exists(obj_quote_battle_guardener_death))) |
11 |
{ |
12 |
sprite_index = -4 |
13 |
if (death_noloop == true) |
14 |
layer_sequence_destroy(idle_sequence) |
15 |
if (!death_noloop) |
16 |
{ |
17 |
layer_sequence_create("sequence_layer", x, y, 4) |
18 |
alarm[0] = 60alarm[0]instance_create(0, 0, obj_dialogue_battle_win_genocide)
audio_play_sound(snd_monster_damage_death, 20, false) |
19 |
death_noloop = true |
20 |
} |
21 |
return; |
22 |
} |
23 |
var enemy_dead = global.enemy_dead |
24 |
var enemy_spared = global.enemy_spared |
25 |
var enemy_sparing = global.enemy_sparing |
26 |
if (enemy_dead == false && enemy_spared == false) |
27 |
image_alpha = global.image_alpha_enemy_attacking |
28 |
if (enemy_spared == true) |
29 |
{ |
30 |
sprite_index = spr_guardener_hurt |
31 |
x = xstart |
32 |
y = ystart |
33 |
image_speed = 0 |
34 |
image_index = 0 |
35 |
image_alpha = 0.5 |
36 |
if (no_loop_create_clouds == false) |
37 |
{ |
38 |
for (i = 0; i <= 11; i += 1) |
39 |
instance_create(x, (y - 22), obj_spare_cloud) |
40 |
} |
41 |
no_loop_create_clouds = true |
42 |
} |
43 |
if (damage_disjoint_count > 0 && damage_disjoint_timer <= 0) |
44 |
damage_disjoint_count -= 1 |
45 |
else if (enemy_dead == false && enemy_spared == false && damage_disjoint_count <= 0) |
46 |
{ |
47 |
if (global.enemy_low_hp == true && global.current_hp_enemy < global.max_hp_enemy) |
48 |
{ |
49 |
if (low_hp_noloop == false) |
50 |
low_hp_noloop = true |
51 |
sprite_index = -4 |
52 |
} |
53 |
else |
54 |
sprite_index = -4 |
55 |
} |
56 |
else if (enemy_spared == true) |
57 |
sprite_index = spr_guardener_hurt |
58 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
59 |
{ |
60 |
sprite_index = spr_guardener_hurt |
61 |
time_elapsed = 0 |
62 |
sign_modifier = 1 |
63 |
damage_disjoint_count = 12 |
64 |
no_loop_damage_disjoint_count = true |
65 |
} |
66 |
else if (!instance_exists(obj_text_damage_count)) |
67 |
no_loop_damage_disjoint_count = false |
68 |
if (damage_disjoint_timer <= 0) |
69 |
{ |
70 |
damage_disjoint_timer = damage_disjoint_timer_max |
71 |
if (damage_disjoint_count == 12) |
72 |
damage_disjoint_x = -50 |
73 |
else if (damage_disjoint_count == 10) |
74 |
damage_disjoint_x = 50 |
75 |
else if (damage_disjoint_count == 8) |
76 |
damage_disjoint_x = -20 |
77 |
else if (damage_disjoint_count == 6) |
78 |
damage_disjoint_x = 20 |
79 |
else if (damage_disjoint_count == 4) |
80 |
damage_disjoint_x = -10 |
81 |
else if (damage_disjoint_count == 2) |
82 |
damage_disjoint_x = 10 |
83 |
else if (damage_disjoint_count == 0) |
84 |
damage_disjoint_x = 0 |
85 |
} |
86 |
else |
87 |
damage_disjoint_timer -= 1 |
88 |
x = xstart + damage_disjoint_x |
89 |
if (guardener_stop_animating == true) |
90 |
{ |
91 |
if (layer_sequence_get_headpos(2) >= (layer_sequence_get_length(2) - 1)) |
92 |
layer_sequence_pause(2) |
93 |
} |