1 |
if live_call() |
2 |
return global.live_result; |
3 |
if (cloak_direction == 0) |
4 |
{ |
5 |
var enemy_dead = global.enemy_dead |
6 |
var enemy_spared = global.enemy_spared |
7 |
if (enemy_dead == false && enemy_spared == false) |
8 |
image_alpha = global.image_alpha_enemy_attacking |
9 |
if (enemy_dead == true) |
10 |
{ |
11 |
x = starting_point_x |
12 |
y = starting_point_y |
13 |
instance_create(starting_point_x, starting_point_y, obj_dalv_dead) |
14 |
instance_destroy() |
15 |
return; |
16 |
} |
17 |
else if (enemy_spared == true) |
18 |
{ |
19 |
sprite_index = spr_dalv_spared |
20 |
x = starting_point_x |
21 |
y = starting_point_y |
22 |
image_xscale = starting_point_xscale |
23 |
image_yscale = starting_point_yscale |
24 |
image_alpha = 0.5 |
25 |
if (no_loop_create_clouds == false) |
26 |
{ |
27 |
for (i = 0; i <= 11; i += 1) |
28 |
instance_create(x, (y - 100), obj_spare_cloud) |
29 |
} |
30 |
no_loop_create_clouds = true |
31 |
} |
32 |
if (damage_disjoint_count > 0) |
33 |
damage_disjoint_count -= 1 |
34 |
else if (enemy_dead == false && enemy_spared == false) |
35 |
{ |
36 |
if (global.current_hp_enemy <= 0) |
37 |
sprite_index = spr_dalv_body_critical |
38 |
else |
39 |
sprite_index = spr_dalv_body |
40 |
} |
41 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
42 |
{ |
43 |
time_elapsed = 0 |
44 |
sign_modifier = 1 |
45 |
damage_disjoint_count = 12 |
46 |
no_loop_damage_disjoint_count = true |
47 |
} |
48 |
else if (!instance_exists(obj_text_damage_count)) |
49 |
no_loop_damage_disjoint_count = false |
50 |
if (damage_disjoint_count == 12) |
51 |
damage_disjoint_x = -50 |
52 |
else if (damage_disjoint_count == 10) |
53 |
damage_disjoint_x = 50 |
54 |
else if (damage_disjoint_count == 8) |
55 |
damage_disjoint_x = -20 |
56 |
else if (damage_disjoint_count == 6) |
57 |
damage_disjoint_x = 20 |
58 |
else if (damage_disjoint_count == 4) |
59 |
damage_disjoint_x = -10 |
60 |
else if (damage_disjoint_count == 2) |
61 |
damage_disjoint_x = 10 |
62 |
else if (damage_disjoint_count == 0) |
63 |
damage_disjoint_x = 0 |
64 |
if (damage_disjoint_count > 0) |
65 |
{ |
66 |
if (global.current_hp_enemy <= 0) |
67 |
sprite_index = spr_dalv_hit_2 |
68 |
else |
69 |
sprite_index = spr_dalv_hit |
70 |
image_xscale = starting_point_xscale |
71 |
image_yscale = starting_point_yscale |
72 |
} |
73 |
if (global.current_hp_enemy <= 0) |
74 |
{ |
75 |
time_elapsed = 0 |
76 |
sign_modifier = 1 |
77 |
} |
78 |
x = draw_position_x + damage_disjoint_x |
79 |
y = draw_position_y + damage_disjoint_y |
80 |
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 1))) && enemy_dead == false && enemy_spared == false) |
81 |
{ |
82 |
game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
83 |
animation_disjoint_yscale = sign_modifier * (max_rise - game_maker_cannot_do_math) |
84 |
image_yscale = draw_position_yscale + animation_disjoint_yscale |
85 |
image_xscale = draw_position_xscale - animation_disjoint_yscale * (max_rise_ext / max_rise) |
86 |
var image_yscale_store = image_yscale |
87 |
var time_elapsed_head = time_elapsed - time_elapsed_decrease_head |
88 |
if (time_elapsed_head < 0) |
89 |
{ |
90 |
time_elapsed_head += time_max |
91 |
sign_modifier_head = (-sign_modifier) |
92 |
} |
93 |
else |
94 |
sign_modifier_head = sign_modifier |
95 |
game_maker_cannot_do_math = power((time_elapsed_head / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
96 |
animation_disjoint_yscale = sign_modifier_head * (max_rise - game_maker_cannot_do_math) |
97 |
image_yscale = draw_position_yscale + animation_disjoint_yscale |
98 |
head_displacement_y = bbox_top + sprite_height * head_displacement_y_multiplier |
99 |
image_yscale = image_yscale_store |
100 |
time_elapsed += time_increase |
101 |
if (time_elapsed >= time_max) |
102 |
{ |
103 |
time_elapsed = 0 |
104 |
sign_modifier = (-sign_modifier) |
105 |
} |
106 |
animating = true |
107 |
} |
108 |
else |
109 |
animating = false |
110 |
} |
111 |
else if (cloak_direction == 1 && sprite_index != spr_dalv_body_open) |
112 |
{ |
113 |
sprite_index = spr_dalv_body_open |
114 |
image_speed = 1 |
115 |
image_index = 0 |
116 |
image_xscale = 1 |
117 |
image_yscale = 1 |
118 |
time_elapsed = 0 |
119 |
sign_modifier = 1 |
120 |
head_displacement_y = bbox_top + sprite_height * head_displacement_y_multiplier |
121 |
with (obj_background_battle_parent) |
122 |
{ |
123 |
custom_fade_direction = "out" |
124 |
custom_fade_alpha = 0 |
125 |
custom_fade_rate = 0.05 |
126 |
} |
127 |
animating = true |
128 |
} |
129 |
else if (cloak_direction == 2 && sprite_index != spr_dalv_body_close) |
130 |
{ |
131 |
sprite_index = spr_dalv_body_close |
132 |
image_speed = 1 |
133 |
image_index = 0 |
134 |
cloak_out = false |
135 |
animating = true |
136 |
} |
137 |
else |
138 |
animating = false |