| 1 |
var enemy_dead = global.enemy_dead; |
| 2 |
var enemy_spared = global.enemy_spared; |
| 3 |
if (mooch_fly_away == true && mooch_fly_away_no_loop == false) |
| 4 |
{ |
| 5 |
sprite_index = spr_feisty_four_mooch_hurt; |
| 6 |
alarm[0] = 150; |
| 7 |
scr_screenshake_battlescr_screenshake_battlefunction scr_screenshake_battle()
{
instance_destroy(obj_screenshake_battle);
var screenshake = instance_create(0, 0, obj_screenshake_battle);
battle_screenshake_duration = argument[0];
battle_screenshake_intensity = argument[1];
battle_screenshake_dec = battle_screenshake_intensity / battle_screenshake_duration;
} (15, 3); |
| 8 |
hspeed = -30; |
| 9 |
vspeed = -20; |
| 10 |
mooch_fly_away_no_loop = true; |
| 11 |
audio_play_sound(snd_attackhitcrit, 1, 0); |
| 12 |
obj_enemy_controller_feisty_four.current_hp_mooch -= 1; |
| 13 |
exit; |
| 14 |
} |
| 15 |
if (mooch_fly_away_no_loop == true) |
| 16 |
{ |
| 17 |
image_angle -= 40; |
| 18 |
exit; |
| 19 |
} |
| 20 |
if (enemy_dead == false && enemy_spared == false) |
| 21 |
image_alpha = global.image_alpha_enemy_attacking; |
| 22 |
if (enemy_dead == true) |
| 23 |
{ |
| 24 |
x = starting_point_x; |
| 25 |
y = starting_point_y; |
| 26 |
instance_create(starting_point_x, starting_point_y, obj_dalv_dead); |
| 27 |
instance_destroy(); |
| 28 |
exit; |
| 29 |
image_alpha = 0.5; |
| 30 |
} |
| 31 |
else if (enemy_spared == true) |
| 32 |
{ |
| 33 |
sprite_index = spr_dalv_spared; |
| 34 |
x = starting_point_x; |
| 35 |
y = starting_point_y; |
| 36 |
image_xscale = starting_point_xscale; |
| 37 |
image_yscale = starting_point_yscale; |
| 38 |
image_alpha = 0.5; |
| 39 |
if (no_loop_create_clouds == false) |
| 40 |
{ |
| 41 |
for (i = 0; i <= 11; i += 1) |
| 42 |
instance_create(x, y - 100, obj_spare_cloud); |
| 43 |
} |
| 44 |
no_loop_create_clouds = true; |
| 45 |
} |
| 46 |
if (damage_disjoint_count > 0) |
| 47 |
{ |
| 48 |
damage_disjoint_count -= 1; |
| 49 |
} |
| 50 |
else if (enemy_dead == false && enemy_spared == false) |
| 51 |
{ |
| 52 |
if (global.current_hp_enemy <= 0) |
| 53 |
sprite_index = spr_feisty_four_mooch_body_full; |
| 54 |
else |
| 55 |
sprite_index = spr_feisty_four_mooch_body_full; |
| 56 |
} |
| 57 |
if (instance_exists(obj_text_damage_count) && ((global.fight_number == 1 && global.enemy_count == 1) || (global.fight_number == 2 && global.enemy_count == 2)) && no_loop_damage_disjoint_count == false) |
| 58 |
{ |
| 59 |
time_elapsed = 0; |
| 60 |
sign_modifier = 1; |
| 61 |
damage_disjoint_count = 12; |
| 62 |
no_loop_damage_disjoint_count = true; |
| 63 |
} |
| 64 |
else if (!instance_exists(obj_text_damage_count)) |
| 65 |
{ |
| 66 |
no_loop_damage_disjoint_count = false; |
| 67 |
} |
| 68 |
if (damage_disjoint_count == 12) |
| 69 |
damage_disjoint_x = -50; |
| 70 |
else if (damage_disjoint_count == 10) |
| 71 |
damage_disjoint_x = 50; |
| 72 |
else if (damage_disjoint_count == 8) |
| 73 |
damage_disjoint_x = -20; |
| 74 |
else if (damage_disjoint_count == 6) |
| 75 |
damage_disjoint_x = 20; |
| 76 |
else if (damage_disjoint_count == 4) |
| 77 |
damage_disjoint_x = -10; |
| 78 |
else if (damage_disjoint_count == 2) |
| 79 |
damage_disjoint_x = 10; |
| 80 |
else if (damage_disjoint_count == 0) |
| 81 |
damage_disjoint_x = 0; |
| 82 |
if (damage_disjoint_count > 0) |
| 83 |
{ |
| 84 |
if (global.current_hp_enemy <= 0) |
| 85 |
sprite_index = spr_feisty_four_ace_body_legs; |
| 86 |
else |
| 87 |
sprite_index = hurt_sprite; |
| 88 |
image_xscale = starting_point_xscale; |
| 89 |
image_yscale = starting_point_yscale; |
| 90 |
} |
| 91 |
else if (sprite_index == hurt_sprite) |
| 92 |
{ |
| 93 |
sprite_index = spr_feisty_four_mooch_body_full; |
| 94 |
} |
| 95 |
if (global.current_hp_enemy <= 0) |
| 96 |
{ |
| 97 |
time_elapsed = 0; |
| 98 |
sign_modifier = 1; |
| 99 |
} |
| 100 |
x = draw_position_x + damage_disjoint_x; |
| 101 |
y = draw_position_y + damage_disjoint_y; |
| 102 |
if (!(instance_exists(obj_text_damage_count) && global.fight_number == 1) && enemy_dead == false && enemy_spared == false) |
| 103 |
{ |
| 104 |
game_maker_cannot_do_math = power((time_elapsed / ((time_max / 2) * (1 / sqrt(max_rise)))) - sqrt(max_rise), 2); |
| 105 |
animation_disjoint_yscale = sign_modifier * (max_rise - game_maker_cannot_do_math); |
| 106 |
image_yscale = draw_position_yscale + animation_disjoint_yscale; |
| 107 |
image_xscale = draw_position_xscale - (animation_disjoint_yscale * (max_rise_ext / max_rise)); |
| 108 |
var image_yscale_store = image_yscale; |
| 109 |
time_elapsed += time_increase; |
| 110 |
if (time_elapsed >= time_max) |
| 111 |
{ |
| 112 |
time_elapsed = 0; |
| 113 |
sign_modifier = -sign_modifier; |
| 114 |
} |
| 115 |
animating = true; |
| 116 |
} |
| 117 |
else |
| 118 |
{ |
| 119 |
animating = false; |
| 120 |
} |
| 121 |
if (vanish == true) |
| 122 |
{ |
| 123 |
if (vanish_state == 1) |
| 124 |
{ |
| 125 |
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); |
| 126 |
animation_disjoint_x_move = -sign_modifier_move * ((max_rise_move * 0.15) - game_maker_cannot_do_math); |
| 127 |
x = draw_position_x + animation_disjoint_x_move; |
| 128 |
time_elapsed_move += time_increase_move; |
| 129 |
if (time_elapsed_move > ((time_max_move * 0.5) / 2)) |
| 130 |
{ |
| 131 |
time_elapsed_move = 0; |
| 132 |
vanish_state = 2; |
| 133 |
} |
| 134 |
} |
| 135 |
if (vanish_state == 2) |
| 136 |
{ |
| 137 |
game_maker_cannot_do_math = power((time_elapsed_move / ((time_max_move / 2) * (1 / sqrt(max_rise_move)))) - sqrt(max_rise_move), 2); |
| 138 |
animation_disjoint_x_move = sign_modifier_move * (max_rise_move - game_maker_cannot_do_math); |
| 139 |
x = draw_position_x + animation_disjoint_x_move; |
| 140 |
time_elapsed_move += time_increase_move; |
| 141 |
if (time_elapsed_move > (time_max_move / 2)) |
| 142 |
instance_destroy(); |
| 143 |
} |
| 144 |
} |