Broken bones work differently

This commit is contained in:
Anewbe
2017-01-19 15:32:58 -06:00
parent 4de1db89bf
commit 86077f6c1a
2 changed files with 19 additions and 7 deletions

View File

@@ -54,10 +54,10 @@
if (!lying && !buckled && world.time - l_move_time < 15)
//Moving around with fractured ribs won't do you any good
if (E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15))
var/obj/item/organ/I = pick(E.internal_organs)
custom_pain("You feel broken bones moving in your [E.name]!", 1)
I.take_damage(rand(3,5))
if (prob(10) && !stat && can_feel_pain() && analgesic < 50 && E.is_broken() && E.internal_organs.len)
custom_pain("Pain jolts through your broken [E.encased ? E.encased : E.name], staggering you!", 50)
drop_item(loc)
Stun(2)
//Moving makes open wounds get infected much faster
if (E.wounds.len)

View File

@@ -257,8 +257,9 @@
I.take_damage(brute / 2)
brute -= brute / 2
if(status & ORGAN_BROKEN && prob(40) && brute)
if(!((species.flags & NO_PAIN) || (robotic >= ORGAN_ROBOT)))
if(status & ORGAN_BROKEN && brute)
jostle_bone(brute)
if(can_feel_pain() && prob(40))
owner.emote("scream") //getting hit on broken hand hurts
if(used_weapon)
add_autopsy_data("[used_weapon]", brute + burn)
@@ -1002,7 +1003,8 @@ Note that amputating the affected organ does in fact remove the infection from t
"<span class='danger'>You hear a loud cracking sound coming from \the [owner].</span>",\
"<span class='danger'>Something feels like it shattered in your [name]!</span>",\
"<span class='danger'>You hear a sickening crack.</span>")
if(!(species.flags & NO_PAIN))
jostle_bone()
if(can_feel_pain())
owner.emote("scream")
playsound(src.loc, "fracture", 10, 1, -2)
@@ -1207,6 +1209,16 @@ Note that amputating the affected organ does in fact remove the infection from t
"<span class='danger'>You hear a sickening sizzle.</span>")
disfigured = 1
/obj/item/organ/external/proc/jostle_bone(force)
if(!(status & ORGAN_BROKEN)) //intact bones stay still
return
if(brute_dam + force < min_broken_damage/5) //no papercuts moving bones
return
if(internal_organs.len && prob(brute_dam + force))
owner.custom_pain("A piece of bone in your [encased ? encased : name] moves painfully!", 50)
var/obj/item/organ/I = pick(internal_organs)
I.take_damage(rand(3,5))
/obj/item/organ/external/proc/get_wounds_desc()
. = ""
if(status & ORGAN_DESTROYED && !is_stump())