diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index f834fc2df6e..c78723f34f4 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -33,21 +33,23 @@ if (can_operate(M)) //Checks if mob is lying down on table for surgery if (do_surgery(M,user,src)) return 0 + // Knifing - if(edge) //this is fucking absolutely horrible - for(var/obj/item/weapon/grab/G in user) - if(G.assailant == user && G.state >= GRAB_NECK && G.affecting == M) + if(edge) //this is still absolutely fucking horrible + for(var/obj/item/weapon/grab/G in M.grabbed_by) + if(G.assailant == user && G.state >= GRAB_NECK) //TODO: better alternative for applying damage multiple times? Nice knifing sound? M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge) M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge) M.apply_damage(20, BRUTE, "head", 0, sharp=sharp, edge=edge) M.adjustOxyLoss(60) // Brain lacks oxygen immediately, pass out - user.visible_message("[user] slit [M]'s throat open!") + user.visible_message("[user] slit [M]'s throat open with \the [name]!") user.attack_log += "\[[time_stamp()]\] Knifed [M.name] ([M.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" M.attack_log += "\[[time_stamp()]\] Got knifed by [user.name] ([user.ckey]) with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" msg_admin_attack("[key_name(user)] knifed [key_name(M)] with [name] (INTENT: [uppertext(user.a_intent)]) (DAMTYE: [uppertext(damtype)])" ) return + if (istype(M,/mob/living/carbon/brain)) messagesource = M:container if (hitsound && force > 0) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index 0e0be89229b..2b2eba49305 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -283,7 +283,6 @@ playsound(src.loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) if(user.dir == src.dir) G.state = GRAB_AGGRESSIVE - G.adjust_position() G.last_upgrade = world.time if(!supress_message) visible_message("[user] has grabbed [src] from behind!") diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index d78c501303d..99c52c2ecf9 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -20,6 +20,7 @@ var/last_upgrade = 0 var/last_hit_zone = 0 var/force_down //determines if the affecting mob will be pinned to the ground + var/dancing //determines if assailant and affecting keep looking at each other. Basically a wrestling position layer = 21 item_state = "nothing" @@ -44,6 +45,15 @@ hud.name = "reinforce grab" hud.master = src + //check if assailant is grabbed by victim as well + if(assailant.grabbed_by) + for (var/obj/item/weapon/grab/G in assailant.grabbed_by) + if(G.assailant == affecting && G.affecting == assailant) + G.dancing = 1 + G.adjust_position() + dancing = 1 + adjust_position() + //Used by throw code to hand over the mob, instead of throwing the grab. The grab is then deleted by the throw code. /obj/item/weapon/grab/proc/throw() if(affecting) @@ -112,22 +122,24 @@ if(hit_zone != last_hit_zone) announce = 1 last_hit_zone = hit_zone - switch(hit_zone) - if("mouth") - if(announce) - assailant.visible_message("[assailant] covers [affecting]'s mouth!") - if(affecting.silent < 3) - affecting.silent = 3 - if("eyes") - if(announce) - assailant.visible_message("[assailant] covers [affecting]'s eyes!") - if(affecting.eye_blind < 3) - affecting.eye_blind = 3 + if(ishuman(affecting)) + switch(hit_zone) + if("mouth") + if(announce) + assailant.visible_message("[assailant] covers [affecting]'s mouth!") + if(affecting.silent < 3) + affecting.silent = 3 + if("eyes") + if(announce) + assailant.visible_message("[assailant] covers [affecting]'s eyes!") + if(affecting.eye_blind < 3) + affecting.eye_blind = 3 + if(force_down) if(affecting.loc != assailant.loc) force_down = 0 else - affecting.Weaken(3) //1 wears off too quick + affecting.Weaken(3) if(state >= GRAB_NECK) affecting.Stun(5) //It will hamper your voice, being choked and all. @@ -162,7 +174,10 @@ affecting.layer = 4 switch(state) if(GRAB_PASSIVE) - shift = 6 + shift = 8 + if(dancing) //look at partner + shift = 10 + assailant.set_dir(get_dir(assailant, affecting)) if(GRAB_AGGRESSIVE) shift = 12 if(GRAB_NECK, GRAB_UPGRADING) @@ -176,7 +191,6 @@ affecting.set_dir(SOUTH)//face up affecting.loc = assailant.loc - switch(adir) if(NORTH) animate(affecting, pixel_x = 0, pixel_y =-shift, 5, 1, LINEAR_EASING) @@ -236,6 +250,7 @@ affecting.LAssailant = assailant hud.icon_state = "kill" hud.name = "kill" + affecting.Stun(10) //10 ticks of ensured grab else if(state < GRAB_UPGRADING) assailant.visible_message("[assailant] starts to tighten \his grip on [affecting]'s neck!") hud.icon_state = "kill1" @@ -285,7 +300,7 @@ var/obj/item/organ/external/organ = affected.get_organ(check_zone(last_hit_zone)) if(!organ || organ.is_broken() || organ.limb_name == "chest" || organ.limb_name == "groin") //necessary to prevent chest and groin return - assailant.visible_message("[user] is jointlocking [affecting]'s [organ.name]!") + assailant.visible_message("[assailant] begins [pick("bending", "twisting")] [affecting]'s [organ.name] into a jointlock!") var/armor = affected.run_armor_check(affecting, "melee") if(armor < 2) affecting << "You feel extreme pain!" @@ -315,9 +330,9 @@ if (eyes.damage >= eyes.min_broken_damage) if(M.stat != 2) M << "\red You go blind!" - else if(last_hit_zone != "chest" && last_hit_zone != "groin") - if(state < GRAB_NECK) - assailant << "You require a better grab to do this." + else if(last_hit_zone != "chest" && last_hit_zone != "groin") //headbutting should probably use head hitzone, + if(state < GRAB_NECK)// but, chest and groin being fractured doesn't paticulary make sense in this context + assailant << "You require a better grab to do this."//and head does return if(affected.grab_joint(assailant)) playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 16bf52e6178..5afda13a9be 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -340,6 +340,8 @@ if (G.state == GRAB_NECK) mob.set_dir(reverse_dir[direct]) G.adjust_position() + for (var/obj/item/weapon/grab/G in mob.grabbed_by) + G.adjust_position() moving = 0