mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Fixes disarm-attacking being very likely to break the limb before dislocating it.
Also makes it possible to 'strike to cripple' with stunbatons
This commit is contained in:
@@ -122,7 +122,7 @@
|
|||||||
var/mob/living/carbon/human/H = target
|
var/mob/living/carbon/human/H = target
|
||||||
affecting = H.get_organ(hit_zone)
|
affecting = H.get_organ(hit_zone)
|
||||||
|
|
||||||
if(user.a_intent == I_HURT)
|
if(user.a_intent == I_HURT || user.a_intent == I_DISARM)
|
||||||
. = ..()
|
. = ..()
|
||||||
//whacking someone causes a much poorer electrical contact than deliberately prodding them.
|
//whacking someone causes a much poorer electrical contact than deliberately prodding them.
|
||||||
agony *= 0.5
|
agony *= 0.5
|
||||||
|
|||||||
@@ -245,7 +245,13 @@ emp_act
|
|||||||
/mob/living/carbon/human/proc/attack_joint(var/obj/item/organ/external/organ, var/obj/item/W, var/blocked)
|
/mob/living/carbon/human/proc/attack_joint(var/obj/item/organ/external/organ, var/obj/item/W, var/blocked)
|
||||||
if(!organ || (organ.dislocated == 2) || (organ.dislocated == -1) || blocked >= 100)
|
if(!organ || (organ.dislocated == 2) || (organ.dislocated == -1) || blocked >= 100)
|
||||||
return 0
|
return 0
|
||||||
if(prob(W.force * (100 - blocked)/100))
|
|
||||||
|
if(W.damtype != BRUTE)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
//want the dislocation chance to be such that the limb is expected to dislocate after dealing a fraction of the damage needed to break the limb
|
||||||
|
var/dislocate_chance = (W.force/2)/(0.5 * organ.min_broken_damage * config.organ_health_multiplier)*100
|
||||||
|
if(prob(dislocate_chance * (W.force * (100 - blocked)/100)))
|
||||||
visible_message("<span class='danger'>[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!</span>")
|
visible_message("<span class='danger'>[src]'s [organ.joint] [pick("gives way","caves in","crumbles","collapses")]!</span>")
|
||||||
organ.dislocate(1)
|
organ.dislocate(1)
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user