diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 9a0f2a3c238..222861c5f26 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -447,9 +447,10 @@ START_PROCESSING(SSprocessing, src) var/laser = (damage_flags & DAMAGE_FLAG_LASER) var/sharp = (damage_flags & DAMAGE_FLAG_SHARP) + var/bullet = (damage_flags & DAMAGE_FLAG_BULLET) var/edge = (damage_flags & DAMAGE_FLAG_EDGE) var/psionic = (damage_flags & DAMAGE_FLAG_PSIONIC) - var/blunt = !!(brute && !sharp && !edge) + var/blunt = !!(brute && !sharp && !edge && !bullet) /// Psionics and psionically deaf species take varying amounts of damage from psionic abilities. if(psionic) @@ -477,7 +478,9 @@ handle_limb_gibbing(used_weapon, brute, burn) - if(brute_dam + brute > min_broken_damage && prob(brute_dam + brute * (1 + blunt))) + ///The chance of a bone breaking increases linearly, up to 100% at max_damage * 4 (The most damage an organ can take) + var/fracture_chance_increase = min(100, max(0, (brute_dam * 100) / (max_damage * 4))) + if(brute_dam + brute > min_broken_damage && prob(fracture_chance_increase + ((brute / 2) * (1 + blunt)))) //Blunt hits have 2x chance to break bones. if(blunt || brute > FRACTURE_AND_TENDON_DAM_THRESHOLD) fracture() @@ -494,7 +497,7 @@ if(can_cut) to_create = INJURY_TYPE_CUT //need to check sharp again here so that blunt damage that was strong enough to break skin doesn't give puncture wounds - if(sharp && !edge) + if(sharp && !edge || bullet) to_create = INJURY_TYPE_PIERCE created_wound = createwound(to_create, brute) @@ -530,6 +533,7 @@ var/cur_damage = brute_dam var/sharp = (damage_flags & DAMAGE_FLAG_SHARP) var/laser = (damage_flags & DAMAGE_FLAG_LASER) + var/bullet = (damage_flags & DAMAGE_FLAG_BULLET) if(BP_IS_ROBOTIC(src) || laser) damage_amt += burn @@ -561,8 +565,13 @@ organ_hit_chance += 5 * damage_amt / organ_damage_threshold if(!BP_IS_ROBOTIC(src)) - if(encased && !(status & ORGAN_BROKEN)) //ribs protect - organ_hit_chance *= 0.2 + if(encased && !(status & ORGAN_BROKEN)) //Ribs protect + if (bullet) //Less protection against bullets. + organ_hit_chance *= 0.6 + else if (sharp) + organ_hit_chance *= 0.4 + else + organ_hit_chance *= 0.2 else organ_hit_chance *= 0.8 // robots should not have the same advantage diff --git a/html/changelogs/Fenodyree-BoneBreakTweak.yml b/html/changelogs/Fenodyree-BoneBreakTweak.yml new file mode 100644 index 00000000000..262ce5fb888 --- /dev/null +++ b/html/changelogs/Fenodyree-BoneBreakTweak.yml @@ -0,0 +1,6 @@ +author: Fenodyree +delete-after: True +changes: + - balance: "The percent chance to break bones is now increased linearly up to 4 times max health, instead of by flat damage." + - balance: "Sharp and edged weapons are now more likely to hit organs, if the ribs are not yet broken." + - bugfix: "Bullets are no longer treated as blunt weapons. This increases their chance to hit organs and decreases their chance to break bone."