if (!instance_exists(obj_plat_player)) scr_flower_despwn(1); if (con < 0) exit; if (!global.pause_plat) { if (hit > 0) hit--; if (shake > 0) shake--; } if (!_hp_init) { _hp_init = true; __max_hp = hp; } if (!init) { talkcon = 0; init = 1; } scr_plat_depthcast(); ral_hook_left.depth = depth - 1; ral_hook_right.depth = depth - 1; plat.x = (x + 12) - (0.5 * sprite_width); plat.y = y - (0.5 * sprite_height); su_act.active = con != 99; if (auraalph > 0) su_act.blocked = 2; else su_act.blocked = bullet_pattern_endstate != 0; if (!global.pause_plat) { if (is_stunned) { stun_timer++; su_act.blocked = true; shake = 5; if ((stun_timer % 2) == 1) scr_plat_create_stunspark(); if (stun_timer >= stun_duration) { is_stunned = false; stun_timer = 0; shake = 0; su_act.blocked = su_act_blocked_pre_stun; on_stun_recover(); } } if (bullet_pattern_can_expire) { bullet_pattern_expire_timer++; if (con > 1) bullet_pattern_expire_timer = min(bullet_pattern_expire_timer, 5910); if (rude_buster_use_cooldown > 0) { rude_buster_use_cooldown--; if (rude_buster_use_cooldown == 0) { talkcon = 13; event_user(10); } } if (bullet_pattern_dialogue_state == 0) { if (bullet_pattern_expire_timer == 300) { talkcon = 1; event_user(10); } if (bullet_pattern_expire_timer == 600) { talkcon = 2; event_user(10); } if (bullet_pattern_expire_timer == 900) { talkcon = 3; event_user(10); } if (bullet_pattern_expire_timer == 1200) { talkcon = 4; event_user(10); } if (bullet_pattern_expire_timer == 1500) { talkcon = 5; event_user(10); } if (bullet_pattern_expire_timer == 2400) { talkcon = 6; event_user(10); } if (bullet_pattern_expire_timer == 3300) { talkcon = 7; event_user(10); } if (bullet_pattern_expire_timer == 4200) { talkcon = 8; event_user(10); } } if (bullet_pattern_expire_timer == 6000) { with (obj_dw_cliff_seth_miniboss) bullet_pattern_die_expire(other); snd_play(snd_spearappear_choppy); animate(anim_expire); } } bullet_pattern_multipurpose_timer++; if (bullet_pattern_dialogue_state == 2 && bullet_pattern_multipurpose_timer == 300) { if (talkcon == 15) { talkcon = 16; event_user(10); } } hit--; lefthit--; righthit--; left_lens_opacity = max(left_lens_opacity - 0.05, 0.1); right_lens_opacity = max(right_lens_opacity - 0.05, 0.1); if (bullet_pattern_can_expire && con == 0) { if (lefthp > 20 || (lefthp < 20 && lefthp > 11)) { if ((bullet_pattern_expire_timer % 450) == 0) lefthp--; } if (righthp > 20 || (righthp < 20 && righthp > 11)) { if ((bullet_pattern_expire_timer % 450) == 0) righthp--; } } if (con == 1 || con == 4) plat.mask_index = -1; else plat.mask_index = spr_plat_blankmask; recovertimer++; timer += 1; var tt = 22; if (hp < 40) tt = 19; if (con >= 2) tt += 12; if (simple) tt = floor(lerp(7, 14, clamp01(hp / __max_hp))); if (con == 10 || con == 11 || con == 12) tt = 999999; else lerptimer += 0.1; if ((timer % tt) == 0 && con < 20 && bullet_pattern_endstate == 0) create_bullet(); if (current_animation != -4 && anim_phase >= 0) { do_anim_step(current_animation); } else { movetimer++; if (con < 2) { eligible_for_standing_ending = false; if (con != 1) x = lerp(x, xstart + (sin(movetimer / 30) * 80), 0.05); conreturntimer = 0; if (con == 1 && !is_stunned) { con = 1.1; animate(anim_recover_end); if (bullet_pattern_dialogue_state == 1 && talkcon == 10) { talkcon = 11; event_user(10); } else if (bullet_pattern_dialogue_state == 1 && (talkcon == 11 || talkcon == 13)) { talkcon = 12; event_user(10); } } } if (con == 2) { if (conreturntimer < 50) { conreturntimer += 1; if (scr_plat_standing_on("kr", obj_dw_cliff_seth_miniboss.plat_ralsei.platform)) { stood_on_ralsei = true; recovertimer = 0; } if (conreturntimer == 30) { if (bullet_pattern_dialogue_state == 1) { bullet_pattern_dialogue_state = 2; bullet_pattern_multipurpose_timer = 0; talkcon = 15; event_user(10); } } } if (conreturntimer >= 90 && bullet_pattern_endstate == 0) { animate(anim_recover); con = 2.1; } } if (con == 4) { x = lerp(x, xstart + (sin(movetimer / 30) * 80), 0.05); conreturntimer = 0; if (scr_plat_standing_on("kr", plat)) { stood_on_ralsei = true; recovertimer = 0; } if (recovertimer >= 20) { con = 5; animate(anim_recover_end); } } if (con == 10) { if (timer == 1) { if (abs(x - xstart) < 2) timer = 25; } x = lerp(x, xstart, min(timer / 30, 1)); lerptimer = 0; if (timer >= 31) { if (lensorder == 0) lensorder = choose(-1, 1); else lensorder = -lensorder; timer = 0; con = 12; if (!announced_big_attack) { talkcon = 20; con = 11; announced_big_attack = true; event_user(10); } } } else if (con == 11) { x = lerp(x, xstart, min(timer / 30, 1)); if (timer == 35) { snd_play(snd_petaldrain); var of = scr_oflash(); of.flashcolor = c_aqua; } if (timer == 42) { con = 12; timer = 0; } } else if (con == 12) { x = lerp(x, xstart, min(timer / 30, 1)); if (timer >= 3 && (timer % 3) == 0 && timer <= 16) { var xx = x - (92 * lensorder); var yy = y; create_bullet(270 + (lensorder * (-55 + lerp(0, 110, (timer - 4) / 15))), xx, yy); snd_play(motor_upper_quick, 1, 0.8 + (((timer - 3) / 3) * 0.1)); left_lens_opacity = 0.4; right_lens_opacity = 0.4; } if (timer == 23) { if (lensorder == 1) animate(anim_super_left); else animate(anim_super_right); } if (timer == 150) { var of = scr_oflash(); of.flashcolor = c_aqua; snd_play(snd_petaldrain); } if (timer >= 160 && (timer % 3) == 0 && timer <= 175) { var xx = x + (92 * lensorder); var yy = y; create_bullet(270 + (lensorder * (55 - lerp(0, 110, (timer - 160) / 15))), xx, yy); snd_play(motor_upper_quick, 1, 0.8 + (((timer - 160) / 3) * 0.1)); left_lens_opacity = 0.4; right_lens_opacity = 0.4; } if (timer == 180) { if (lensorder == 1) animate(anim_super_right); else animate(anim_super_left); } if (timer >= 320) { con = 0; su_act.blocked = false; scr_lerpvar("auraalph", auraalph, 0, 15); } } if (con == 20) { con = 21; with (obj_plat_bullet) { damage = 0; scr_doom(self, 10); scr_lerpvar("image_alpha", image_alpha, 0, 10); } timer = 0; with (obj_plat_follower) { if (name == "ralsei" && is_platform_mode > 0) drop_off_platform_mode(true); } } if (con == 21) { timer++; if (jerky_anim != -4) { animate(jerky_anim); jerky_anim = -4; } } if (con == 22) { animate(anim_die); con = 23; } if (con == 99) { if (timer == 1) { hspeed = 0; vspeed = 0; animate(anim_die); with (obj_plat_follower) { if (name == "ralsei") drop_off_platform_mode(); } } } } } if (simple) su_act.blocked = 2; if (con >= 99) exit; if (lefthit <= 0) { with (left_lens_hitbox) { var col = instance_place(x, y, obj_plat_hbx); if (col != -4) { with (other) get_hit_local(-1, col); } if (other.lefthp > 0) { col = instance_place(x, y, obj_plat_enm_smallglove); if (col != -4 && col.con == 2) { with (other) get_hit_local(-1, col); } } } } if (righthit <= 0) { with (right_lens_hitbox) { var col = instance_place(x, y, obj_plat_hbx); if (col != -4) { with (other) get_hit_local(1, col); } if (other.righthp > 0) { col = instance_place(x, y, obj_plat_enm_smallglove); if (col != -4 && col.con == 2) { with (other) get_hit_local(1, col); } } } }