1 |
if (!instance_exists(obj_heart_battle_fighting_parent)) |
2 |
{ |
3 |
instance_destroy() |
4 |
return; |
5 |
} |
6 |
if (state == 0) |
7 |
{ |
8 |
if (image_alpha < 1 && can_move == false) |
9 |
{ |
10 |
image_alpha += 0.1 |
11 |
if (image_alpha > 1) |
12 |
image_alpha = 1 |
13 |
if (image_alpha == 1) |
14 |
{ |
15 |
can_move = true |
16 |
alarm[0] = 30 + (irandom_range(0, 3)) * 10alarm[0]x_destination = obj_heart_battle_fighting_parent.x
y_destination = obj_heart_battle_fighting_parent.y
angle_destination = point_direction(x, y, obj_heart_battle_fighting_parent.x, obj_heart_battle_fighting_parent.y)
if (angle_difference(image_angle, angle_destination) > 0)
spin_direction = 1
else
spin_direction = -1
obj_battle_enemy_attack_martlet_feather_fall_checker.x_store = x_destination
obj_battle_enemy_attack_martlet_feather_fall_checker.y_store = y_destination
obj_battle_enemy_attack_martlet_feather_fall_checker.angle_store = angle_destination
global.id_store = id
with (instance_create(x_destination, y_destination, obj_battle_enemy_attack_martlet_feather_fall_target_1_axis))
geno_target_angle = other.explosion_angle
id_target = global.id_store
state = 1
switch sprite_index
{
case spr_battle_enemy_attack_martlet_feather_1:
audio_play_sound(snd_mart_feather_atk3, 20, 0)
break
case 2274:
case 2275:
audio_play_sound(snd_mart_feather_atk1, 20, 0)
break
case 2276:
case 2278:
audio_play_sound(snd_mart_feather_atk2, 20, 0)
break
default:
audio_play_sound(snd_mart_feather_atk1, 20, 0)
} |
17 |
} |
18 |
} |
19 |
if (can_move == true) |
20 |
{ |
21 |
game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
22 |
animation_disjoint_x = sign_modifier * (max_rise - round(game_maker_cannot_do_math)) |
23 |
time_elapsed += time_increase |
24 |
if (time_elapsed >= time_max) |
25 |
{ |
26 |
time_elapsed = 0 |
27 |
sign_modifier = (-sign_modifier) |
28 |
} |
29 |
var time_elapsed_fall = time_elapsed + time_elapsed_increase_fall |
30 |
if (time_elapsed_fall > time_max) |
31 |
{ |
32 |
time_elapsed_fall -= time_max |
33 |
sign_modifier_fall = (-sign_modifier) |
34 |
} |
35 |
else |
36 |
sign_modifier_fall = sign_modifier |
37 |
game_maker_cannot_do_math = power((time_elapsed_fall / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
38 |
animation_disjoint_fall = sign_modifier_fall * (max_rise - game_maker_cannot_do_math) |
39 |
x_point_fall = starting_position_x + animation_disjoint_fall |
40 |
x_point = starting_position_x + animation_disjoint_x |
41 |
animation_disjoint_y += (fall_speed * (1 - (abs((x_point_fall - starting_position_x) / max_rise)))) |
42 |
y_point = round(starting_position_y + animation_disjoint_y) |
43 |
} |
44 |
position_factor = (x_point - starting_position_x) / max_rise |
45 |
angle_pos = angle_pos_default + angle_pos_max * position_factor |
46 |
x = x_point + angle_radius * (cos(angle_pos * 0.008726646259971648)) |
47 |
y = y_point - angle_radius * (sin(angle_pos * 0.008726646259971648)) |
48 |
image_angle = angle_pos + 90 |
49 |
} |
50 |
else if (state == 1) |
51 |
{ |
52 |
if (image_angle != angle_destination) |
53 |
image_angle += (spin_speed * spin_direction) |
54 |
var angle_diff = angle_difference(image_angle, angle_destination) |
55 |
if ((angle_diff * spin_direction) < 0) |
56 |
image_angle = angle_destination |
57 |
if (image_angle == angle_destination && no_loop_spin == false) |
58 |
{ |
59 |
image_speed = 0.5 |
60 |
alarm[1] = 15alarm[1]image_speed = 0
image_index = 0
state = 2 |
61 |
no_loop_spin = true |
62 |
} |
63 |
} |
64 |
else if (state == 2) |
65 |
{ |
66 |
var can_trail = false |
67 |
trail_cc_current += 1 |
68 |
if (trail_cc_current >= trail_cc_max) |
69 |
{ |
70 |
can_trail = true |
71 |
trail_cc_current = 0 |
72 |
} |
73 |
if (can_trail == true) |
74 |
{ |
75 |
ds_list_add(x_list, x) |
76 |
ds_list_add(y_list, y) |
77 |
ds_list_add(angle_list, image_angle) |
78 |
while (ds_list_size(x_list) > max_points_trail) |
79 |
{ |
80 |
ds_list_delete(x_list, 0) |
81 |
ds_list_delete(y_list, 0) |
82 |
ds_list_delete(angle_list, 0) |
83 |
} |
84 |
} |
85 |
x += lengthdir_x(attack_speed, image_angle) |
86 |
y += lengthdir_y(attack_speed, image_angle) |
87 |
if (place_meeting(x, y, obj_dialogue_box_battle_transformation_any) && in_box == false) |
88 |
in_box = true |
89 |
if ((!(place_meeting(x, y, obj_dialogue_box_battle_transformation_any))) && in_box == true) |
90 |
{ |
91 |
if (image_alpha > 0) |
92 |
{ |
93 |
image_alpha -= 0.1 |
94 |
if (image_alpha < 0) |
95 |
image_alpha = 0 |
96 |
if (image_alpha == 0) |
97 |
instance_destroy() |
98 |
} |
99 |
} |
100 |
if (!instance_exists(obj_martlet_body)) |
101 |
{ |
102 |
if (distance_to_point(id_target.x, id_target.y) <= (attack_speed / 2 + 1)) |
103 |
{ |
104 |
id_feather_explosion = instance_create(id_target.x, id_target.y, obj_battle_enemy_attack_martlet_genocide_feather_ext_checker) |
105 |
id_feather_explosion.fcreate_angle_diff = explosion_angle |
106 |
instance_destroy() |
107 |
} |
108 |
} |
109 |
} |