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 |
instance_create(starting_point_x, starting_point_y, obj_dalv_dead); |
10 |
instance_destroy(); |
11 |
exit; |
12 |
image_alpha = 0.5; |
13 |
} |
14 |
else if (enemy_spared == true) |
15 |
{ |
16 |
sprite_index = spr_dalv_spared; |
17 |
x = starting_point_x; |
18 |
y = starting_point_y; |
19 |
image_xscale = starting_point_xscale; |
20 |
image_yscale = starting_point_yscale; |
21 |
image_alpha = 0.5; |
22 |
if (no_loop_create_clouds == false) |
23 |
{ |
24 |
for (i = 0; i <= 11; i += 1) |
25 |
instance_create(x, y - 100, obj_spare_cloud); |
26 |
} |
27 |
no_loop_create_clouds = true; |
28 |
} |
29 |
obj_feisty_four_ace_head.image_alpha = image_alpha; |
30 |
obj_feisty_four_ace_arm.image_alpha = image_alpha; |
31 |
if (damage_disjoint_count > 0) |
32 |
{ |
33 |
damage_disjoint_count -= 1; |
34 |
} |
35 |
else if (enemy_dead == false && enemy_spared == false) |
36 |
{ |
37 |
if (global.current_hp_enemy <= 0) |
38 |
sprite_index = spr_feisty_four_ace_body_legs; |
39 |
else |
40 |
sprite_index = spr_feisty_four_ace_body_legs; |
41 |
} |
42 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
43 |
{ |
44 |
time_elapsed = 0; |
45 |
sign_modifier = 1; |
46 |
damage_disjoint_count = 12; |
47 |
no_loop_damage_disjoint_count = true; |
48 |
} |
49 |
else if (!instance_exists(obj_text_damage_count)) |
50 |
{ |
51 |
no_loop_damage_disjoint_count = false; |
52 |
} |
53 |
if (damage_disjoint_count == 12) |
54 |
damage_disjoint_x = -50; |
55 |
else if (damage_disjoint_count == 10) |
56 |
damage_disjoint_x = 50; |
57 |
else if (damage_disjoint_count == 8) |
58 |
damage_disjoint_x = -20; |
59 |
else if (damage_disjoint_count == 6) |
60 |
damage_disjoint_x = 20; |
61 |
else if (damage_disjoint_count == 4) |
62 |
damage_disjoint_x = -10; |
63 |
else if (damage_disjoint_count == 2) |
64 |
damage_disjoint_x = 10; |
65 |
else if (damage_disjoint_count == 0) |
66 |
damage_disjoint_x = 0; |
67 |
if (damage_disjoint_count > 0) |
68 |
{ |
69 |
if (global.current_hp_enemy <= 0) |
70 |
sprite_index = spr_feisty_four_ace_body_legs; |
71 |
else |
72 |
sprite_index = hurt_sprite; |
73 |
image_xscale = starting_point_xscale; |
74 |
image_yscale = starting_point_yscale; |
75 |
} |
76 |
else if (sprite_index == hurt_sprite) |
77 |
{ |
78 |
sprite_index = spr_feisty_four_ace_body_legs; |
79 |
} |
80 |
if (global.current_hp_enemy <= 0) |
81 |
{ |
82 |
time_elapsed = 0; |
83 |
sign_modifier = 1; |
84 |
} |
85 |
x = draw_position_x + damage_disjoint_x; |
86 |
y = draw_position_y + damage_disjoint_y; |
87 |
if (!(instance_exists(obj_text_damage_count) && global.fight_number == 1) && enemy_dead == false && enemy_spared == false) |
88 |
{ |
89 |
game_maker_cannot_do_math = power((time_elapsed / ((time_max / 2) * (1 / sqrt(max_rise)))) - sqrt(max_rise), 2); |
90 |
animation_disjoint_yscale = sign_modifier * (max_rise - game_maker_cannot_do_math); |
91 |
image_yscale = draw_position_yscale + animation_disjoint_yscale; |
92 |
image_xscale = draw_position_xscale - (animation_disjoint_yscale * (max_rise_ext / max_rise)); |
93 |
var image_yscale_store = image_yscale; |
94 |
var time_elapsed_head = time_elapsed - time_elapsed_decrease_head; |
95 |
if (time_elapsed_head < 0) |
96 |
{ |
97 |
time_elapsed_head += time_max; |
98 |
sign_modifier_head = -sign_modifier; |
99 |
} |
100 |
else |
101 |
{ |
102 |
sign_modifier_head = sign_modifier; |
103 |
} |
104 |
game_maker_cannot_do_math = power((time_elapsed_head / ((time_max / 2) * (1 / sqrt(max_rise)))) - sqrt(max_rise), 2); |
105 |
animation_disjoint_yscale = sign_modifier_head * (max_rise - game_maker_cannot_do_math); |
106 |
image_yscale = draw_position_yscale + animation_disjoint_yscale; |
107 |
head_displacement_y = bbox_top + (sprite_height * head_displacement_y_multiplier); |
108 |
image_yscale = image_yscale_store; |
109 |
var time_elapsed_hand = time_elapsed - time_elapsed_decrease_hand; |
110 |
if (time_elapsed_hand < 0) |
111 |
{ |
112 |
time_elapsed_hand += time_max; |
113 |
sign_modifier_hand = -sign_modifier; |
114 |
} |
115 |
else |
116 |
{ |
117 |
sign_modifier_hand = sign_modifier; |
118 |
} |
119 |
game_maker_cannot_do_math = power((time_elapsed_hand / ((time_max / 2) * (1 / sqrt(max_rise)))) - sqrt(max_rise), 2); |
120 |
animation_disjoint_yscale = sign_modifier_hand * (max_rise - game_maker_cannot_do_math); |
121 |
image_yscale = draw_position_yscale + animation_disjoint_yscale; |
122 |
hand_displacement_y = bbox_top + (sprite_height * hand_displacement_y_multiplier); |
123 |
image_yscale = image_yscale_store; |
124 |
time_elapsed += time_increase; |
125 |
if (time_elapsed >= time_max) |
126 |
{ |
127 |
time_elapsed = 0; |
128 |
sign_modifier = -sign_modifier; |
129 |
} |
130 |
animating = true; |
131 |
} |
132 |
else |
133 |
{ |
134 |
animating = false; |
135 |
} |
136 |
if (vanish == true) |
137 |
{ |
138 |
if (vanish_state == 1) |
139 |
{ |
140 |
game_maker_cannot_do_math = power((time_elapsed_move / (((time_max_move * 0.5) / 2) * (1 / sqrt(max_rise_move * 0.15)))) - sqrt(max_rise_move * 0.15), 2); |
141 |
animation_disjoint_x_move = -sign_modifier_move * ((max_rise_move * 0.15) - game_maker_cannot_do_math); |
142 |
x = draw_position_x + animation_disjoint_x_move; |
143 |
time_elapsed_move += time_increase_move; |
144 |
if (time_elapsed_move > ((time_max_move * 0.5) / 2)) |
145 |
{ |
146 |
time_elapsed_move = 0; |
147 |
vanish_state = 2; |
148 |
} |
149 |
} |
150 |
if (vanish_state == 2) |
151 |
{ |
152 |
game_maker_cannot_do_math = power((time_elapsed_move / ((time_max_move / 2) * (1 / sqrt(max_rise_move)))) - sqrt(max_rise_move), 2); |
153 |
animation_disjoint_x_move = sign_modifier_move * (max_rise_move - game_maker_cannot_do_math); |
154 |
x = draw_position_x + animation_disjoint_x_move; |
155 |
time_elapsed_move += time_increase_move; |
156 |
if (time_elapsed_move > (time_max_move / 2)) |
157 |
instance_destroy(); |
158 |
} |
159 |
} |
160 |
if (instance_exists(obj_feisty_four_ace_head)) |
161 |
{ |
162 |
with (obj_feisty_four_ace_head) |
163 |
event_user(0); |
164 |
} |
165 |
if (instance_exists(obj_feisty_four_ace_arm)) |
166 |
{ |
167 |
with (obj_feisty_four_ace_arm) |
168 |
event_user(0); |
169 |
} |