1 |
if (transformed == false) |
2 |
{ |
3 |
var enemy_count = global.enemy_count |
4 |
var enemy_dead = global.enemy_dead |
5 |
var enemy_spared = global.enemy_spared |
6 |
if (enemy_dead == false && enemy_spared == false) |
7 |
image_alpha = global.image_alpha_enemy_attacking |
8 |
if (enemy_dead == true) |
9 |
{ |
10 |
x = starting_point_x |
11 |
y = starting_point_y - max_rise |
12 |
image_angle = 0 |
13 |
instance_create(starting_point_x, (starting_point_y - max_rise), obj_crispy_scroll_dead) |
14 |
instance_destroy() |
15 |
return; |
16 |
} |
17 |
else if (enemy_spared == true) |
18 |
{ |
19 |
sprite_index = spr_crispy_scroll_spared |
20 |
x = starting_point_x |
21 |
y = starting_point_y - max_rise |
22 |
image_angle = 0 |
23 |
image_alpha = 0.5 |
24 |
if (no_loop_create_clouds == false) |
25 |
{ |
26 |
for (i = 0; i <= 11; i += 1) |
27 |
instance_create(x, y, obj_spare_cloud) |
28 |
} |
29 |
no_loop_create_clouds = true |
30 |
} |
31 |
if (damage_disjoint_count > 0) |
32 |
damage_disjoint_count -= 1 |
33 |
else if (enemy_dead == false && enemy_spared == false) |
34 |
{ |
35 |
if (global.enemy_low_hp == true && global.current_hp_enemy < global.max_hp_enemy) |
36 |
sprite_index = spr_crispy_scroll_head_critical |
37 |
else |
38 |
sprite_index = spr_masterswordremix_body |
39 |
} |
40 |
if (instance_exists(obj_text_damage_count) && global.fight_number == 1 && no_loop_damage_disjoint_count == false) |
41 |
{ |
42 |
image_angle = 0 |
43 |
time_elapsed = 10 |
44 |
sign_modifier = -1 |
45 |
time_elapsed_angle = 0 |
46 |
sign_modifier_angle = 1 |
47 |
damage_disjoint_count = 12 |
48 |
no_loop_damage_disjoint_count = true |
49 |
} |
50 |
else if (!instance_exists(obj_text_damage_count)) |
51 |
no_loop_damage_disjoint_count = false |
52 |
if (damage_disjoint_count == 12) |
53 |
damage_disjoint_x = -50 |
54 |
else if (damage_disjoint_count == 10) |
55 |
damage_disjoint_x = 50 |
56 |
else if (damage_disjoint_count == 8) |
57 |
damage_disjoint_x = -20 |
58 |
else if (damage_disjoint_count == 6) |
59 |
damage_disjoint_x = 20 |
60 |
else if (damage_disjoint_count == 4) |
61 |
damage_disjoint_x = -10 |
62 |
else if (damage_disjoint_count == 2) |
63 |
damage_disjoint_x = 10 |
64 |
else if (damage_disjoint_count == 0) |
65 |
damage_disjoint_x = 0 |
66 |
if (damage_disjoint_count > 0 || global.current_hp_enemy <= 0) |
67 |
sprite_index = spr_crispy_scroll_dead |
68 |
x = draw_position_x + damage_disjoint_x |
69 |
y = draw_position_y + damage_disjoint_y |
70 |
image_angle = 0 |
71 |
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 1))) && enemy_dead == false && enemy_spared == false) |
72 |
{ |
73 |
if (instance_exists(obj_quote_battle_crispy_scroll_a) && (global.last_action_selected == "Action 1 Message 0" || global.last_action_selected == "Action 2 Message 1")) |
74 |
{ |
75 |
if (enemy_count == 3) |
76 |
{ |
77 |
if ((global.enemy_dead_2 + global.enemy_spared_2 + global.enemy_dead_3 + global.enemy_spared_3) >= 2) |
78 |
{ |
79 |
time_increase = 2 |
80 |
time_increase_angle = time_increase |
81 |
} |
82 |
else |
83 |
{ |
84 |
time_increase = 1 |
85 |
time_increase_angle = time_increase |
86 |
} |
87 |
} |
88 |
else if (enemy_count == 2) |
89 |
{ |
90 |
if ((global.enemy_dead_2 + global.enemy_spared_2) >= 1) |
91 |
{ |
92 |
time_increase = 2 |
93 |
time_increase_angle = time_increase |
94 |
} |
95 |
else |
96 |
{ |
97 |
time_increase = 1 |
98 |
time_increase_angle = time_increase |
99 |
} |
100 |
} |
101 |
else |
102 |
{ |
103 |
time_increase = 2 |
104 |
time_increase_angle = time_increase |
105 |
} |
106 |
} |
107 |
else |
108 |
{ |
109 |
time_increase = 1 |
110 |
time_increase_angle = time_increase |
111 |
} |
112 |
sign_modifier_advance_back = sign_modifier |
113 |
time_elapsed_advance_back = time_elapsed + time_elapsed_advance_increase_back |
114 |
if (time_elapsed_advance_back >= time_max) |
115 |
{ |
116 |
time_elapsed_advance_back -= time_max |
117 |
sign_modifier_advance_back = (-sign_modifier_advance_back) |
118 |
} |
119 |
game_maker_cannot_do_math = power((time_elapsed_advance_back / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
120 |
animation_disjoint_advance = sign_modifier_advance_back * (max_rise - round(game_maker_cannot_do_math)) |
121 |
advance_y_back = draw_position_y + animation_disjoint_advance |
122 |
sign_modifier_advance_hand = sign_modifier |
123 |
time_elapsed_advance_hand = time_elapsed + time_elapsed_advance_increase_hand |
124 |
if (time_elapsed_advance_hand >= time_max) |
125 |
{ |
126 |
time_elapsed_advance_hand -= time_max |
127 |
sign_modifier_advance_hand = (-sign_modifier_advance_hand) |
128 |
} |
129 |
game_maker_cannot_do_math = power((time_elapsed_advance_hand / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
130 |
animation_disjoint_advance = sign_modifier_advance_hand * (max_rise - round(game_maker_cannot_do_math)) |
131 |
advance_y_hand = draw_position_y + animation_disjoint_advance |
132 |
game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
133 |
animation_disjoint_y = sign_modifier * (max_rise - round(game_maker_cannot_do_math)) |
134 |
time_elapsed += time_increase |
135 |
if (time_elapsed >= time_max) |
136 |
{ |
137 |
time_elapsed = 0 |
138 |
sign_modifier = (-sign_modifier) |
139 |
} |
140 |
y = draw_position_y + animation_disjoint_y |
141 |
if (sprite_index == spr_masterswordremix_body) |
142 |
{ |
143 |
game_maker_cannot_do_math = power((time_elapsed_angle / (time_max_angle / 2 * (1 / sqrt(max_rise_angle))) - sqrt(max_rise_angle)), 2) |
144 |
animation_disjoint_angle = sign_modifier_angle * (max_rise_angle - round(game_maker_cannot_do_math)) |
145 |
time_elapsed_angle += time_increase_angle |
146 |
if (time_elapsed_angle >= time_max_angle) |
147 |
{ |
148 |
time_elapsed_angle = 0 |
149 |
sign_modifier_angle = (-sign_modifier_angle) |
150 |
} |
151 |
image_angle = animation_disjoint_angle |
152 |
} |
153 |
else |
154 |
image_angle = 0 |
155 |
} |
156 |
else |
157 |
y = starting_point_y - max_rise |
158 |
} |