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_crispy_scroll_head |
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 |
audio_play_sound(enemy_hurt_noise, 1, 0, 1, 0, enemy_hurt_pitch) |
50 |
} |
51 |
else if (!instance_exists(obj_text_damage_count)) |
52 |
no_loop_damage_disjoint_count = false |
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 || global.current_hp_enemy <= 0) |
68 |
{ |
69 |
sprite_index = spr_crispy_scroll_dead |
70 |
image_angle = 0 |
71 |
} |
72 |
x = draw_position_x + damage_disjoint_x |
73 |
y = draw_position_y + damage_disjoint_y |
74 |
image_angle = 0 |
75 |
if ((!((instance_exists(obj_text_damage_count) && global.fight_number == 1))) && enemy_dead == false && enemy_spared == false) |
76 |
{ |
77 |
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")) |
78 |
{ |
79 |
if (enemy_count == 3) |
80 |
{ |
81 |
if ((global.enemy_dead_2 + global.enemy_spared_2 + global.enemy_dead_3 + global.enemy_spared_3) >= 2) |
82 |
mode = 2 |
83 |
else |
84 |
mode = 1 |
85 |
} |
86 |
else if (enemy_count == 2) |
87 |
{ |
88 |
if ((global.enemy_dead_2 + global.enemy_spared_2) >= 1) |
89 |
mode = 2 |
90 |
else |
91 |
mode = 1 |
92 |
} |
93 |
else |
94 |
mode = 2 |
95 |
} |
96 |
else |
97 |
mode = 1 |
98 |
for (i = 1; i <= mode; i += 1) |
99 |
{ |
100 |
sign_modifier_advance_back = sign_modifier |
101 |
time_elapsed_advance_back = time_elapsed + time_elapsed_advance_increase_back |
102 |
if (time_elapsed_advance_back >= time_max) |
103 |
{ |
104 |
time_elapsed_advance_back -= time_max |
105 |
sign_modifier_advance_back = (-sign_modifier_advance_back) |
106 |
} |
107 |
game_maker_cannot_do_math = power((time_elapsed_advance_back / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
108 |
animation_disjoint_advance = sign_modifier_advance_back * (max_rise - round(game_maker_cannot_do_math)) |
109 |
advance_y_back = draw_position_y + animation_disjoint_advance |
110 |
sign_modifier_advance_hand = sign_modifier |
111 |
time_elapsed_advance_hand = time_elapsed + time_elapsed_advance_increase_hand |
112 |
if (time_elapsed_advance_hand >= time_max) |
113 |
{ |
114 |
time_elapsed_advance_hand -= time_max |
115 |
sign_modifier_advance_hand = (-sign_modifier_advance_hand) |
116 |
} |
117 |
game_maker_cannot_do_math = power((time_elapsed_advance_hand / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
118 |
animation_disjoint_advance = sign_modifier_advance_hand * (max_rise - round(game_maker_cannot_do_math)) |
119 |
advance_y_hand = draw_position_y + animation_disjoint_advance |
120 |
game_maker_cannot_do_math = power((time_elapsed / (time_max / 2 * (1 / sqrt(max_rise))) - sqrt(max_rise)), 2) |
121 |
animation_disjoint_y = sign_modifier * (max_rise - round(game_maker_cannot_do_math)) |
122 |
time_elapsed += time_increase |
123 |
if (time_elapsed >= time_max) |
124 |
{ |
125 |
time_elapsed = 0 |
126 |
sign_modifier = (-sign_modifier) |
127 |
} |
128 |
y = draw_position_y + animation_disjoint_y |
129 |
if (sprite_index == spr_crispy_scroll_head) |
130 |
{ |
131 |
game_maker_cannot_do_math = power((time_elapsed_angle / (time_max_angle / 2 * (1 / sqrt(max_rise_angle))) - sqrt(max_rise_angle)), 2) |
132 |
animation_disjoint_angle = sign_modifier_angle * (max_rise_angle - round(game_maker_cannot_do_math)) |
133 |
time_elapsed_angle += time_increase_angle |
134 |
if (time_elapsed_angle >= time_max_angle) |
135 |
{ |
136 |
time_elapsed_angle = 0 |
137 |
sign_modifier_angle = (-sign_modifier_angle) |
138 |
} |
139 |
image_angle = animation_disjoint_angle |
140 |
} |
141 |
else |
142 |
image_angle = 0 |
143 |
} |
144 |
} |
145 |
else |
146 |
y = starting_point_y - max_rise |
147 |
} |