diff --git a/code/modules/surgery/surgery_step.dm b/code/modules/surgery/surgery_step.dm index dea1d94aa42f..92714731a597 100644 --- a/code/modules/surgery/surgery_step.dm +++ b/code/modules/surgery/surgery_step.dm @@ -104,6 +104,8 @@ if(IS_MEDICAL(user)) user_speed_mod = 0.8 + var/previous_loc = user.loc + if(do_after(user, time * tool_speed_mod * user_speed_mod, target)) var/prob_chance = 100 @@ -129,7 +131,9 @@ surgery.status++ if(surgery.status > surgery.steps.len) surgery.complete() - + else + if(!(previous_loc == user.loc)) + move_ouchie(user, target, target_zone, tool, advance) surgery.step_in_progress = FALSE return advance @@ -248,12 +252,17 @@ var/final_ouchie_chance = SURGERY_FUCKUP_CHANCE * ouchie_mod if(!prob(final_ouchie_chance)) return - user.visible_message(span_boldwarning("[target] flinches, bumping [user]'s [tool ? tool.name : "hand"] into something important!"), span_boldwarning("[target] flinches, bumping your [tool ? tool.name : "hand"] into something important!")) + user.visible_message(span_boldwarning("[target] flinches, bumping [user]'s [tool ? tool.name : "hand"] into something important!"), span_boldwarning("[target] flinches, bumping your [tool ? tool.name : "hand"] into something important!")) target.apply_damage(fuckup_damage, fuckup_damage_type, target_zone) //if(ishuman(target) &&fuckup_damage_type == BRUTE && prob(final_ouchie_chance/2)) //var/mob/living/carbon/human/H = target //H.bleed_rate += min(fuckup_damage/4, 10) +///Deal damage if the user moved during the op +/datum/surgery_step/proc/move_ouchie(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, success) + user.visible_message(span_boldwarning("[user] bumps [p_their(FALSE, user)] [tool ? tool.name : "hand"] into something important!"), span_boldwarning("You move, bumping your [tool ? tool.name : "hand"] into something important!")) + target.apply_damage(fuckup_damage, fuckup_damage_type, target_zone) + /** * Sends a pain message to the target, including a chance of screaming. *