diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 1d57e629d0..06783d6d51 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -51,11 +51,6 @@ emp_act return -1 // complete projectile permutation - if(check_shields(P.damage, "the [P.name]")) - P.on_hit(src, 2, def_zone) - handle_suit_punctures(P.damage_type, P.damage) - return 2 - //BEGIN BOOK'S TASER NERF. if(istype(P, /obj/item/projectile/beam/stun)) var/datum/organ/external/select_area = get_organ(def_zone) // We're checking the outside, buddy! @@ -89,6 +84,10 @@ emp_act return //END TASER NERF + if(check_shields(P.damage, "the [P.name]")) + P.on_hit(src, 2, def_zone) + return 2 + var/datum/organ/external/organ = get_organ(check_zone(def_zone)) var/armor = getarmor_organ(organ, "bullet") @@ -190,7 +189,8 @@ emp_act /mob/living/carbon/human/proc/attacked_by(var/obj/item/I, var/mob/living/user, var/def_zone) if(!I || !user) return 0 - var/target_zone = get_zone_with_miss_chance(user.zone_sel.selecting, src) + var/target_zone = def_zone? def_zone : get_zone_with_miss_chance(user.zone_sel.selecting, src) + if(user == src) // Attacking yourself can't miss target_zone = user.zone_sel.selecting if(!target_zone) @@ -229,7 +229,7 @@ emp_act var/armor = run_armor_check(affecting, "melee", "Your armor has protected your [hit_area].", "Your armor has softened hit to your [hit_area].") var/weapon_sharp = is_sharp(I) var/weapon_edge = has_edge(I) - if ((weapon_sharp || weapon_edge) && prob(getarmor(def_zone, "melee"))) + if ((weapon_sharp || weapon_edge) && prob(getarmor(target_zone, "melee"))) weapon_sharp = 0 weapon_edge = 0 diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index b885d7610e..fcf458871a 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -90,13 +90,6 @@ brute *= brmod //~2/3 damage for ROBOLIMBS burn *= bumod //~2/3 damage for ROBOLIMBS - //If limb took enough damage, try to cut or tear it off - if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you. - if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) - if( (edge && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) ) - droplimb(1) - return - // High brute damage or sharp objects may damage internal organs if(internal_organs && ( (sharp && brute >= 5) || brute >= 10) && prob(5)) // Damage an internal organ @@ -161,6 +154,14 @@ // sync the organ's damage with its wounds src.update_damages() + + //If limb took enough damage, try to cut or tear it off + if(body_part != UPPER_TORSO && body_part != LOWER_TORSO) //as hilarious as it is, getting hit on the chest too much shouldn't effectively gib you. + if(config.limbs_can_break && brute_dam >= max_damage * config.organ_health_multiplier) + if( (edge && prob(5 * brute)) || (brute > 20 && prob(2 * brute)) ) + droplimb(1) + return + owner.updatehealth() var/result = update_icon()