image_index = 0; var automiss = false; var alone = false; var perfectmercy = 100; var maxmercy = 70; var minmercy = 50; if (i_ex(obj_flowery_enemy)) { if (obj_flowery_enemy.pose_alone == true) { alone = true; perfectmercy = 10; maxmercy = 8; minmercy = 5; } else { perfectmercy = 10; maxmercy = 8; minmercy = 5; } if ((perfectmercy + global.mercymod[obj_flowery_enemy.myself]) > 10) perfectmercy = 10 - global.mercymod[obj_flowery_enemy.myself]; if ((maxmercy + global.mercymod[obj_flowery_enemy.myself]) > 10) maxmercy = 10 - global.mercymod[obj_flowery_enemy.myself]; if ((minmercy + global.mercymod[obj_flowery_enemy.myself]) > 10) minmercy = 10 - global.mercymod[obj_flowery_enemy.myself]; } if (con != 1) { if (image_alpha < 1) image_alpha += 0.1; if (bar_x > 324) { image_alpha3 -= 0.1; if (image_alpha3 <= 0) automiss = true; bar_x += 7; } else if (image_alpha2 >= 1) { if (image_alpha3 < 1) image_alpha3 += 0.1; bar_x += 7; } } if ((button1_p() || button2_p() || button3_p() || automiss == true) && bar_x >= 70 && con == 0 && image_alpha >= 0.6) { with (obj_writer) instance_destroy(); image_index = 1; if (bar_x < 86) maxmercy = 0; if (bar_x > 334) maxmercy = 0; if (bar_x >= 86 && bar_x < 196) mercy = ceil(lerp(minmercy, maxmercy, (bar_x - 86) / 90)); if (bar_x >= 224 && bar_x < 334) mercy = ceil(lerp(maxmercy, minmercy, (bar_x - 244) / 90)); if (bar_x >= 196 && bar_x <= 224) { with (parentid) { create_afterimage = true; scr_mercyadd(myself, perfectmercy); if (alone == false) { scr_battle_sprite_set("ralsei", spr_ralsei_tpose, 1, 1); with (obj_heroralsei) { a = scr_afterimage(); a.hspeed = 2.5; a.depth = depth + 1; b = scr_afterimage(); b.image_alpha = 0.6; b.hspeed = 5; b.depth = depth + 2; } } scr_battle_sprite_set("kris", spr_kris_t_pose, 1, 1); with (obj_herokris) { a = scr_afterimage(); a.hspeed = 2.5; a.depth = depth + 1; b = scr_afterimage(); b.image_alpha = 0.6; b.hspeed = 5; b.depth = depth + 2; } if (alone == false) { scr_battle_sprite_set("susie", spr_susie_t_pose2, 1, 1); with (obj_herosusie) { a = scr_afterimage(); a.hspeed = 2.5; a.depth = depth + 1; b = scr_afterimage(); b.image_alpha = 0.6; b.hspeed = 5; b.depth = depth + 2; } } } msgsetloc(0, "* You engaged in a perfect pose^1! It was highly effective!/%", "obj_scarecrow_intimidate2_slash_Step_0_gml_105_0"); scr_battletext_default(); with (obj_flowery_enemy) { mercyaddcon = 1; if (shi_recruited) { with (shi_marker) { sprite_index = spr_scarecrow_taunt; x -= 10; } } if (shinobeetle_recruited) { with (shinobeetle_marker) sprite_index = spr_shinobeetle_pose; } if (kawkaw_recruited) { with (kawkaw_marker) { sprite_index = spr_kawakaw_happy; image_index = 1; image_xscale = -2; x += 82; } } } bar_x = 196; mercy = maxmercy; with (obj_scarecrow_intimidate) { scr_shakeobj(); snd_stop(snd_boost); snd_play(snd_boost); image_speed = 1; } for (var i = 0; i < instance_number(obj_monsterparent); i++) { enemy[i] = instance_find(obj_monsterparent, i); if (parentid != enemy[i]) scr_mercyadd(enemy[i].myself, 10); } } else if (bar_x < 86 || bar_x > 334) { snd_play(snd_error); with (obj_flowery_enemy) mercyaddcon = 1; with (parentid) { scr_mercyadd(myself, minmercy); if (alone == false) { scr_battle_sprite_set("ralsei", spr_ralsei_c_pose, 1, 1); with (obj_heroralsei) { a = scr_afterimage(); a.hspeed = 2.5; a.depth = depth + 1; b = scr_afterimage(); b.image_alpha = 0.6; b.hspeed = 5; b.depth = depth + 2; } } scr_battle_sprite_set("kris", spr_kris_y_pose, 1, 1); with (obj_herokris) { a = scr_afterimage(); a.hspeed = 2.5; a.depth = depth + 1; b = scr_afterimage(); b.image_alpha = 0.6; b.hspeed = 5; b.depth = depth + 2; } if (alone == false) { scr_battle_sprite_set("susie", spr_susie_m_pose, 1, 1); with (obj_herosusie) { a = scr_afterimage(); a.hspeed = 2.5; a.depth = depth + 1; b = scr_afterimage(); b.image_alpha = 0.6; b.hspeed = 5; b.depth = depth + 2; } } } msgsetloc(0, "* The pose was mistaken^1! It wasn't very effective!/%", "obj_scarecrow_intimidate2_slash_Step_0_gml_185_0"); scr_battletext_default(); with (obj_flowery_enemy) { mercyaddcon = 1; if (shi_recruited) { with (shi_marker) { sprite_index = spr_scarecrow_spare; x -= 10; } } if (shinobeetle_recruited) { with (shinobeetle_marker) sprite_index = spr_shinobeetle_spare_alone; } if (kawkaw_recruited) { with (kawkaw_marker) { sprite_index = spr_kakaw_tongue; image_xscale = -2; x += 82; } } } } else { msgsetloc(0, "* You engaged in a superior pose^1! It was very effective!/%", "obj_scarecrow_intimidate2_slash_Step_0_gml_200_0"); scr_battletext_default(); with (obj_flowery_enemy) mercyaddcon = 1; with (obj_scarecrow_intimidate) { scr_shakeobj(); snd_stop(snd_boost); snd_play(snd_boost); image_speed = 1; } with (parentid) { if (alone == false) { scr_battle_sprite_set("ralsei", spr_ralsei_tpose, 1, 1); with (obj_heroralsei) { a = scr_afterimage(); a.hspeed = 2.5; a.depth = depth + 1; b = scr_afterimage(); b.image_alpha = 0.6; b.hspeed = 5; b.depth = depth + 2; } } scr_battle_sprite_set("kris", spr_kris_t_pose, 1, 1); with (obj_herokris) { a = scr_afterimage(); a.hspeed = 2.5; a.depth = depth + 1; b = scr_afterimage(); b.image_alpha = 0.6; b.hspeed = 5; b.depth = depth + 2; } if (alone == false) { scr_battle_sprite_set("susie", spr_susie_t_pose2, 1, 1); with (obj_herosusie) { a = scr_afterimage(); a.hspeed = 2.5; a.depth = depth + 1; b = scr_afterimage(); b.image_alpha = 0.6; b.hspeed = 5; b.depth = depth + 2; } } scr_mercyadd(myself, other.mercy); } for (var i = 0; i < instance_number(obj_monsterparent); i++) { enemy[i] = instance_find(obj_monsterparent, i); if (parentid != enemy[i]) scr_mercyadd(enemy[i].myself, 10); } with (obj_flowery_enemy) { mercyaddcon = 1; if (shi_recruited) { with (shi_marker) { sprite_index = spr_scarecrow_taunt; x -= 10; } } if (shinobeetle_recruited) { with (shinobeetle_marker) sprite_index = spr_shinobeetle_pose; } if (kawkaw_recruited) { with (kawkaw_marker) { sprite_index = spr_kawakaw_happy; image_index = 1; image_xscale = -2; x += 82; } } } } with (parentid) actcon = 1; afterimage = scr_afterimage_grow(); afterimage.sprite_index = spr_undertale_combat_thing2_centered; afterimage.x = ((x + bar_x) - 137 - 7 - 60) + 8; afterimage.y = (y - 17) + 18; afterimage.image_xscale = 1; afterimage.image_yscale = 1; afterimage.depth = depth - 1; con = 1; } if (con == 0) siner++; if (con == 1) { timer++; if (timer > 12) { image_alpha -= 0.1; image_alpha2 -= 0.1; image_alpha3 -= 0.1; if (image_alpha < 0 && image_alpha2 < 0 && image_alpha3 < 0) { if (!i_ex(obj_writer)) { scr_battle_sprite_reset("kris"); scr_battle_sprite_reset("susie"); scr_battle_sprite_reset("ralsei"); instance_destroy(); } } } }