mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-21 19:19:12 +01:00
Adds blinding/muzzling and changes trigger for jointbreaking
This commit is contained in:
@@ -89,7 +89,12 @@
|
||||
LAssailant = M
|
||||
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
|
||||
if(M.dir == src.dir)
|
||||
G.state = GRAB_AGGRESSIVE
|
||||
G.adjust_position()
|
||||
visible_message("<span class ='warning'>[M] has grabbed [src] from behind!</span>")
|
||||
else
|
||||
visible_message("<span class='warning'>[M] has grabbed [src] passively!</span>")
|
||||
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("<span class='danger'>[M] has disarmed [src]!</span>")
|
||||
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 <B>[M] attempted to disarm [src]!</B>")
|
||||
@@ -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("<span class='warning'>[user] begins to dislocate [src]'s [organ.joint]!</span>")
|
||||
if(do_after(user, 100))
|
||||
organ.dislocate()
|
||||
|
||||
@@ -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("<span class='warning'>[assailant] covers [affecting]'s mouth!</span>")
|
||||
if(affecting.silent < 3)
|
||||
affecting.silent = 3
|
||||
if("eyes")
|
||||
if(announce)
|
||||
assailant.visible_message("<span class='warning'>[assailant] covers [affecting]'s eyes!</span>")
|
||||
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 << "<span class='warning'>You require a better grab to do this.</span>"
|
||||
return
|
||||
if(victim.grab_joint(assailant))
|
||||
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
return
|
||||
Reference in New Issue
Block a user