if (is_culled) exit; if (damagecon == 1) { if (!invincible) { damagecon = 2; active = 0; } else { damagecon = 0; } } if (damagecon == 2) { timer = 0; image_blend = c_white; var animation = instance_create(x + 20, y + 20, obj_animation); animation.sprite_index = spr_attack_cut1; animation.depth = depth - 10; animation.image_xscale = 2; animation.image_yscale = 2; if (i_ex(obj_rotating_tower_controller_new)) { animation.x = obj_rotating_tower_controller_new.tower_x; animation.y = obj_rotating_tower_controller_new.krisy; } snd_play_x(snd_swing, 0.4, 1.2); snd_play_x(snd_laz_c, 0.3, 1.2); if (i_ex(obj_rotating_tower_controller_new)) scr_shakeobj_tower(); else scr_shakeobj(); hp--; if (hp > 0) { damagecon = 0; with (obj_climb_kris) { fallingcon = 1; fallingtimer = 20; } } else { damagecon = 3; } } if (damagecon == 3) { timer++; if (timer == 8) { var animation = instance_create(x + 20, y + 20, obj_animation); animation.sprite_index = spr_attack_slap2; animation.image_blend = c_white; animation.image_speed = 0.5; animation.depth = depth - 1; animation.image_xscale = 2; animation.image_yscale = 2; if (i_ex(obj_rotating_tower_controller_new)) { animation.x = obj_rotating_tower_controller_new.tower_x; animation.y = obj_rotating_tower_controller_new.krisy; } animation = instance_create(x + 20, y + 20, obj_animation); animation.sprite_index = spr_attack_slap2; animation.image_blend = c_black; animation.image_speed = 0.5; animation.depth = depth - 1; animation.image_xscale = 3; animation.image_yscale = 3; if (i_ex(obj_rotating_tower_controller_new)) { animation.x = obj_rotating_tower_controller_new.tower_x; animation.y = obj_rotating_tower_controller_new.krisy; } with (animation) scr_afterimage(); snd_play_x(snd_swing, 1, 0.5); snd_play_x(snd_damage, 0.5, 0.5); snd_play_x(snd_punchmed, 0.4, 1); } if (timer == 10) { var xx = x; if (i_ex(obj_rotating_tower_controller_new)) xx = obj_rotating_tower_controller_new.tower_x; for (var i = -5; i <= 5; i++) { with (instance_create(xx + (30 * i), y, obj_marker_fancy)) { sprite_index = spr_climb_booster_shard_single; timer = random_range(-20, 0); gravity = 0.5; depth = other.depth - 1; scr_darksize(); image_xscale = 2 - (abs(i) * 0.2); rotation_mult = (-i + random_range(-0.4, 0.4)) * random_range(0.8, 1.2) * 4; vspeed = (-20 + abs(i)) - random_range(4, 12); friction = 0.3; hspeed = i * random_range(1.8, 2.2); step_func = function() { image_angle += rotation_mult; timer++; if (timer >= 6) { image_alpha -= 0.1; if (image_alpha <= 0) instance_destroy(); } }; } } instance_destroy(); } }