mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
CQC chokehold is less effective against you if you don't breathe, plus special flavor text for IPCs (#18689)
* Update cqc.dm * less effective instead of impossible
This commit is contained in:
@@ -263,10 +263,12 @@
|
|||||||
if(chokehold_active)
|
if(chokehold_active)
|
||||||
return TRUE
|
return TRUE
|
||||||
log_combat(A, D, "began to chokehold(CQC)")
|
log_combat(A, D, "began to chokehold(CQC)")
|
||||||
D.visible_message(span_danger("[A] puts [D] into a chokehold!"), \
|
D.visible_message(
|
||||||
span_userdanger("[A] puts you into a chokehold!"))
|
span_danger(isipc(D) ? "[A] attempts to deactivate [D]!" : "[A] puts [D] into a chokehold!"),
|
||||||
|
span_userdanger(isipc(D) ? "[A] attempts to deactivate you!" : "[A] puts you into a chokehold!")
|
||||||
|
)
|
||||||
if(handle_chokehold(A, D))
|
if(handle_chokehold(A, D))
|
||||||
D.Unconscious(400)
|
D.Unconscious(40 SECONDS)
|
||||||
if(A.grab_state < GRAB_NECK)
|
if(A.grab_state < GRAB_NECK)
|
||||||
A.grab_state = GRAB_NECK
|
A.grab_state = GRAB_NECK
|
||||||
A.visible_message(span_danger("[A] relaxes their grip on [D]."), \
|
A.visible_message(span_danger("[A] relaxes their grip on [D]."), \
|
||||||
@@ -295,13 +297,17 @@
|
|||||||
/datum/martial_art/cqc/proc/handle_chokehold(mob/living/carbon/human/A, mob/living/carbon/human/D) //handles the chokehold attack, dealing oxygen damage until the target is unconscious or would have less than 20 health before knocking out
|
/datum/martial_art/cqc/proc/handle_chokehold(mob/living/carbon/human/A, mob/living/carbon/human/D) //handles the chokehold attack, dealing oxygen damage until the target is unconscious or would have less than 20 health before knocking out
|
||||||
chokehold_active = TRUE
|
chokehold_active = TRUE
|
||||||
var/damage2deal = 15
|
var/damage2deal = 15
|
||||||
while(do_mob(A, D, 10))
|
while(do_mob(A, D, isipc(D) ? 5 SECONDS : 1 SECONDS)) // doesn't make sense to deal oxygen damage to IPCs so instead do a longer channel that automatically succeeds
|
||||||
if(!A.grab_state)
|
if(!A.grab_state)
|
||||||
return FALSE
|
return FALSE
|
||||||
|
if(isipc(D)) // have you tried turning it off and on again
|
||||||
|
return TRUE
|
||||||
damage2deal = 15 * (1+D.getStaminaLoss()/100) //stamina damage boosts the effectiveness of an attack, making using other attacks to prepare important
|
damage2deal = 15 * (1+D.getStaminaLoss()/100) //stamina damage boosts the effectiveness of an attack, making using other attacks to prepare important
|
||||||
|
if(HAS_TRAIT(D, TRAIT_NOBREATH))
|
||||||
|
damage2deal *= 0.5 // if they don't breathe they can't be choked, but you can still cut off blood flow to the head
|
||||||
if(D.health - damage2deal < 20 || D.stat)
|
if(D.health - damage2deal < 20 || D.stat)
|
||||||
return TRUE
|
return TRUE
|
||||||
D.adjustOxyLoss(damage2deal)
|
D.apply_damage(damage2deal, OXY) // respect oxygen damage mods
|
||||||
if(D.getOxyLoss() >= 50)
|
if(D.getOxyLoss() >= 50)
|
||||||
return TRUE
|
return TRUE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user