mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 10:03:50 +01:00
Internal damage from yanking out things, damage from moving with shrapnel and things inside your body.
This commit is contained in:
@@ -1123,21 +1123,40 @@
|
||||
usr.next_move = world.time + 20
|
||||
|
||||
var/list/valid_objects = get_visible_implants(1)
|
||||
var/datum/organ/external/affected = null
|
||||
|
||||
if(!valid_objects.len)
|
||||
src << "You have nothing stuck in your wounds that is large enough to remove without surgery."
|
||||
return
|
||||
|
||||
var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects
|
||||
visible_message("<span class='warning'><b>You rip [selection] out of your body in a welter of blood.</b></span>")
|
||||
bloody_hands(src)
|
||||
selection.loc = get_turf(src)
|
||||
if(src.stat == 1)
|
||||
src << "You are unconcious and cannot do that!"
|
||||
return
|
||||
|
||||
for(var/datum/organ/external/organ in src.organs)
|
||||
if(src.restrained())
|
||||
src << "You are restrained and cannot do that!"
|
||||
return
|
||||
|
||||
var/obj/item/weapon/selection = input("What do you want to yank out?", "Embedded objects") in valid_objects
|
||||
|
||||
for(var/datum/organ/external/organ in src.organs) //Grab the organ holding the implant. Messy as Hell, TBD: fix.
|
||||
for(var/obj/item/weapon/O in organ.implants)
|
||||
if(O == selection)
|
||||
organ.implants -= selection
|
||||
affected = organ
|
||||
|
||||
src << "<span class='warning'>You attempt to get a good grip on the [selection] in your [affected] with bloody fingers.</span>"
|
||||
bloody_hands(src)
|
||||
|
||||
spawn(80)
|
||||
visible_message("<span class='warning'><b>[src] rips [selection] out of their [affected] in a welter of blood.</b></span>","<span class='warning'><b>You rip [selection] out of your [affected] in a welter of blood.</b></span>")
|
||||
selection.loc = get_turf(src)
|
||||
affected.implants -= selection
|
||||
shock_stage+=10
|
||||
|
||||
if(prob(10)) //I'M SO ANEMIC I COULD JUST -DIE-.
|
||||
var/datum/wound/internal_bleeding/I = new (15)
|
||||
affected.wounds += I
|
||||
src.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/proc/get_visible_implants(var/class = 0)
|
||||
@@ -1148,4 +1167,24 @@
|
||||
if(!istype(O,/obj/item/weapon/implant) && O.w_class > class)
|
||||
visible_implants += O
|
||||
|
||||
return(visible_implants)
|
||||
return(visible_implants)
|
||||
|
||||
/mob/living/carbon/human/proc/handle_embedded_objects()
|
||||
|
||||
for(var/datum/organ/external/organ in src.organs)
|
||||
for(var/obj/item/weapon/O in organ.implants)
|
||||
if(!istype(O,/obj/item/weapon/implant) && prob(5)) //Moving with things stuck in you could be bad.
|
||||
// All kinds of embedded objects cause bleeding.
|
||||
var/msg = null
|
||||
switch(rand(1,3))
|
||||
if(1)
|
||||
msg ="<span class='warning'>A spike of pain jolts your [organ] as you bump [O] inside.</span>"
|
||||
if(2)
|
||||
msg ="<span class='warning'>Your movement jostles [O] in your [organ] painfully.</span>"
|
||||
if(3)
|
||||
msg ="<span class='warning'>[O] in your [organ] twists painfully as you move.</span>"
|
||||
src << msg
|
||||
|
||||
organ.status |= ORGAN_BLEEDING
|
||||
organ.take_damage(rand(1,3), 0, 0)
|
||||
organ.adjustToxLoss(rand(1,3))
|
||||
@@ -227,8 +227,8 @@
|
||||
if(!organ) return
|
||||
if(istype(used_weapon,/obj/item/weapon))
|
||||
var/obj/item/weapon/W = used_weapon
|
||||
if(damage > 20 && (prob(damage/W.w_class) || sharp)) //The larger it is, the harder it needs to hit to stick.
|
||||
W.loc = organ
|
||||
if(damage > (5*W.w_class) && (prob(damage/W.w_class) || sharp)) //The larger it is, the harder it needs to hit to stick.
|
||||
W.loc = organ //Sharp objects will always embed if they do enough damage.
|
||||
organ.implants += W
|
||||
visible_message("<span class='danger'>\The [W] sticks in the wound!</span>")
|
||||
W.add_blood(src)
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
if (istype(loc, /turf/space)) return -1 // It's hard to be slowed down in space by... anything
|
||||
|
||||
handle_embedded_objects() //Moving with objects stuck in you can cause bad times.
|
||||
|
||||
var/health_deficiency = (100 - health - halloss)
|
||||
if(health_deficiency >= 40) tally += (health_deficiency / 25)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user