diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index fd5f90460b4..b3c2c0c22b1 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -89,7 +89,12 @@ LAssailant = M playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - visible_message("[M] has grabbed [src] passively!") + if(M.dir == src.dir) + G.state = GRAB_AGGRESSIVE + G.adjust_position() + visible_message("[M] has grabbed [src] from behind!") + else + visible_message("[M] has grabbed [src] passively!") return 1 if(I_HURT) @@ -222,7 +227,7 @@ //See if they have any guns that might go off for(var/obj/item/weapon/gun/W in holding) - if(W && prob(holding[W])) + if(W && prob(holding[W])) var/list/turfs = list() for(var/turf/T in view()) turfs += T @@ -255,11 +260,6 @@ visible_message("[M] has disarmed [src]!") playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) return - - //if M (and only M) has a grab on src, start dislocating limbs - if(grab_joint(M)) - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - return playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) visible_message("\red [M] attempted to disarm [src]!") @@ -308,10 +308,10 @@ if(G.affecting == src && G.state == GRAB_NECK) has_grab = 1 break - + if(!has_grab) return 0 - + if(!def_zone) def_zone = user.zone_sel.selecting var/target_zone = check_zone(def_zone) if(!target_zone) @@ -319,7 +319,7 @@ var/obj/item/organ/external/organ = get_organ(check_zone(target_zone)) if(!organ || organ.is_dislocated() || organ.dislocated == -1) return 0 - + user.visible_message("[user] begins to dislocate [src]'s [organ.joint]!") if(do_after(user, 100)) organ.dislocate() diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index 3e020bde232..962171029c4 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -5,14 +5,15 @@ name = "grab" icon = 'icons/mob/screen1.dmi' icon_state = "reinforce" - flags = NOBLUDGEON + flags = 0 var/obj/screen/grab/hud = null - var/mob/affecting = null - var/mob/assailant = null + var/mob/living/carbon/affecting = null + var/mob/living/carbon/human/assailant = null var/state = GRAB_PASSIVE var/allow_upgrade = 1 var/last_upgrade = 0 + var/last_hit_zone = 0 layer = 21 abstract = 1 @@ -83,9 +84,27 @@ var/obj/item/weapon/grab/G = assailant.r_hand if(G.affecting != affecting) allow_upgrade = 0 - if(state == GRAB_AGGRESSIVE) + if(state >= GRAB_AGGRESSIVE) affecting.drop_l_hand() affecting.drop_r_hand() + + var/hit_zone = assailant.zone_sel.selecting + var/announce = 0 + 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 + //disallow upgrading past aggressive if we're being grabbed aggressively for(var/obj/item/weapon/grab/G in affecting.grabbed_by) if(G == src) continue @@ -263,3 +282,15 @@ affecting.layer = 4 del(hud) ..() + +/obj/item/weapon/grab/attack(mob/living/carbon/human/victim, mob/living/attacker) + if(victim != affecting) return + if(istype(victim)) + switch(assailant.a_intent) + if(I_HURT) + if(state < GRAB_NECK) + assailant << "You require a better grab to do this." + return + if(victim.grab_joint(assailant)) + playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) + return \ No newline at end of file