diff --git a/code/__DEFINES/status_effects.dm b/code/__DEFINES/status_effects.dm index 0f1a36d663..6e5c2c8483 100644 --- a/code/__DEFINES/status_effects.dm +++ b/code/__DEFINES/status_effects.dm @@ -66,6 +66,8 @@ #define STATUS_EFFECT_SAWBLEED /datum/status_effect/saw_bleed //if the bleed builds up enough, takes a ton of damage +#define STATUS_EFFECT_NECKSLICE /datum/status_effect/neck_slice //Creates the flavor messages for the neck-slice + #define STATUS_EFFECT_NECROPOLIS_CURSE /datum/status_effect/necropolis_curse #define CURSE_BLINDING 1 //makes the edges of the target's screen obscured #define CURSE_SPAWNING 2 //spawns creatures that attack the target only diff --git a/code/datums/components/butchering.dm b/code/datums/components/butchering.dm index 1518a84456..c8bcc16788 100644 --- a/code/datums/components/butchering.dm +++ b/code/datums/components/butchering.dm @@ -23,17 +23,51 @@ RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/onItemAttack) /datum/component/butchering/proc/onItemAttack(obj/item/source, mob/living/M, mob/living/user) - if(user.a_intent == INTENT_HARM && M.stat == DEAD && (M.butcher_results || M.guaranteed_butcher_results)) //can we butcher it? + if(user.a_intent != INTENT_HARM) + return + if(M.stat == DEAD && (M.butcher_results || M.guaranteed_butcher_results)) //can we butcher it? if(butchering_enabled && (can_be_blunt || source.get_sharpness())) INVOKE_ASYNC(src, .proc/startButcher, source, M, user) return COMPONENT_ITEM_NO_ATTACK + if(ishuman(M) && source.force && source.get_sharpness()) + var/mob/living/carbon/human/H = M + if((H.health <= H.crit_threshold || (user.pulling == H && user.grab_state >= GRAB_NECK) || H.IsSleeping()) && user.zone_selected == BODY_ZONE_HEAD) // Only sleeping, neck grabbed, or crit, can be sliced. + if(H.has_status_effect(/datum/status_effect/neck_slice)) + user.show_message("[H]'s neck has already been already cut, you can't make the bleeding any worse!", MSG_VISUAL, \ + "Their neck has already been already cut, you can't make the bleeding any worse!") + return COMPONENT_ITEM_NO_ATTACK + INVOKE_ASYNC(src, .proc/startNeckSlice, source, H, user) + return COMPONENT_ITEM_NO_ATTACK + /datum/component/butchering/proc/startButcher(obj/item/source, mob/living/M, mob/living/user) to_chat(user, "You begin to butcher [M]...") playsound(M.loc, butcher_sound, 50, TRUE, -1) if(do_mob(user, M, speed) && M.Adjacent(source)) Butcher(user, M) +/datum/component/butchering/proc/startNeckSlice(obj/item/source, mob/living/carbon/human/H, mob/living/user) + user.visible_message("[user] is slitting [H]'s throat!", \ + "You start slicing [H]'s throat!", \ + "You hear a cutting noise!", ignored_mobs = H) + H.show_message("Your throat is being slit by [user]!", MSG_VISUAL, \ + "Something is cutting into your neck!", NONE) + log_combat(user, H, "starts slicing the throat of") + + playsound(H.loc, butcher_sound, 50, TRUE, -1) + if(do_mob(user, H, CLAMP(500 / source.force, 30, 100)) && H.Adjacent(source)) + if(H.has_status_effect(/datum/status_effect/neck_slice)) + user.show_message("[H]'s neck has already been already cut, you can't make the bleeding any worse!", MSG_VISUAL, \ + "Their neck has already been already cut, you can't make the bleeding any worse!") + return + + H.visible_message("[user] slits [H]'s throat!", \ + "[user] slits your throat...") + log_combat(user, H, "finishes slicing the throat of") + H.apply_damage(source.force, BRUTE, BODY_ZONE_HEAD) + H.bleed_rate = CLAMP(H.bleed_rate + 20, 0, 30) + H.apply_status_effect(/datum/status_effect/neck_slice) + /datum/component/butchering/proc/Butcher(mob/living/butcher, mob/living/meat) var/turf/T = meat.drop_location() var/final_effectiveness = effectiveness - meat.butcher_difficulty diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 84ed012b82..3ff4506f49 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -388,6 +388,19 @@ else new /obj/effect/temp_visual/bleed(get_turf(owner)) +/datum/status_effect/neck_slice + id = "neck_slice" + status_type = STATUS_EFFECT_UNIQUE + alert_type = null + duration = -1 + +/datum/status_effect/neck_slice/tick() + var/mob/living/carbon/human/H = owner + if(H.stat == DEAD || H.bleed_rate <= 8) + H.remove_status_effect(/datum/status_effect/neck_slice) + if(prob(10)) + H.emote(pick("gasp", "gag", "choke")) + /mob/living/proc/apply_necropolis_curse(set_curse, duration = 10 MINUTES) var/datum/status_effect/necropolis_curse/C = has_status_effect(STATUS_EFFECT_NECROPOLIS_CURSE) if(!set_curse)