Skip to content

Commit

Permalink
Update limbs.dm
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveloopers committed Jan 16, 2024
1 parent 1c2be37 commit 6d9d36b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions code/modules/organs/limbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,8 @@

//If limb was damaged before and took enough damage, try to cut or tear it off
var/no_perma_damage = owner.status_flags & NO_PERMANENT_DAMAGE
if(previous_brute > 0 && !is_ff && body_part != BODY_FLAG_CHEST && body_part != BODY_FLAG_GROIN && !no_limb_loss && !no_perma_damage)
var/no_bone_break = owner.chem_effect_flags & CHEM_EFFECT_RESIST_FRACTURE
if(previous_brute > 0 && !is_ff && body_part != BODY_FLAG_CHEST && body_part != BODY_FLAG_GROIN && !no_limb_loss && !no_perma_damage && !no_bone_break)
if(CONFIG_GET(flag/limbs_can_break) && brute_dam >= max_damage * CONFIG_GET(number/organ_health_multiplier))
var/cut_prob = brute/max_damage * 5
if(prob(cut_prob))
Expand Down Expand Up @@ -1091,7 +1092,7 @@ treat_grafted var tells it to apply to grafted but unsalved wounds, for burn kit

//if the chance was not set by what called fracture(), the endurance check is done instead
if(bonebreak_probability == null) //bone break chance is based on endurance, 25% for survivors, erts, 100% for most everyone else.
bonebreak_probability = 100 / clamp(owner.skills?.get_skill_level(SKILL_ENDURANCE)-1,1,100) //can't be zero
bonebreak_probability = 100 / Clamp(owner.skills?.get_skill_level(SKILL_ENDURANCE)-1,1,100) //can't be zero

var/list/bonebreak_data = list("bonebreak_probability" = bonebreak_probability)
SEND_SIGNAL(owner, COMSIG_HUMAN_BONEBREAK_PROBABILITY, bonebreak_data)
Expand Down

0 comments on commit 6d9d36b

Please sign in to comment.