IB initial damage now depends on damage taken

Also, autohealing IBs no longer stop bleeding, but do stop worsening.
This commit is contained in:
mwerezak
2014-08-16 22:00:08 -04:00
parent add9ec3b65
commit 5b341bd810
4 changed files with 8 additions and 8 deletions

View File

@@ -972,7 +972,7 @@ mob/proc/yank_out_object()
affected.take_damage((selection.w_class * 3), 0, 0, 1, "Embedded object extraction")
if(prob(selection.w_class * 5)) //I'M SO ANEMIC I COULD JUST -DIE-.
var/datum/wound/internal_bleeding/I = new (15)
var/datum/wound/internal_bleeding/I = new (min(selection.w_class * 5, 15))
affected.wounds += I
H.custom_pain("Something tears wetly in your [affected] as [selection] is pulled free!", 1)

View File

@@ -223,11 +223,11 @@ This function completely restores a damaged organ to perfect condition.
/datum/organ/external/proc/createwound(var/type = CUT, var/damage)
if(damage == 0) return
//moved this before the open_wound check so that having many small wounds for example doesn't somehow protect you from taking internal damage
//moved this before the open_wound check so that having many small wounds for example doesn't somehow protect you from taking internal damage (because of the return)
//Possibly trigger an internal wound, too.
var/local_damage = brute_dam + burn_dam + damage
if(damage > 15 && type != BURN && local_damage > 30 && prob(damage) && !(status & ORGAN_ROBOT))
var/datum/wound/internal_bleeding/I = new (15)
var/datum/wound/internal_bleeding/I = new (min(damage - 15, 15))
wounds += I
owner.custom_pain("You feel something rip in your [display_name]!", 1)
@@ -463,15 +463,15 @@ Note that amputating the affected organ does in fact remove the infection from t
// let the GC handle the deletion of the wound
// Internal wounds get worse over time. Low temperatures (cryo) stop them.
if(W.internal && !W.can_autoheal() && owner.bodytemperature >= 170)
if(W.internal && owner.bodytemperature >= 170)
var/bicardose = owner.reagents.get_reagent_amount("bicaridine")
var/inaprovaline = owner.reagents.get_reagent_amount("inaprovaline")
if(!bicardose || !inaprovaline) //bicaridine and inaprovaline stop internal wounds from growing bigger with time, and also stop bleeding
if(!(W.can_autoheal() || (bicardose && inaprovaline))) //bicaridine and inaprovaline stop internal wounds from growing bigger with time, unless it is so small that it is already healing
W.open_wound(0.1 * wound_update_accuracy)
if(bicardose >= 30) //overdose of bicaridine begins healing IB
W.damage = max(0, W.damage - 0.2)
owner.vessel.remove_reagent("blood", wound_update_accuracy * W.damage/40)
owner.vessel.remove_reagent("blood", wound_update_accuracy * W.damage/40) //line should possibly be moved to handle_blood, so all the bleeding stuff is in one place.
if(prob(1 * wound_update_accuracy))
owner.custom_pain("You feel a stabbing pain in your [display_name]!",1)

View File

@@ -270,7 +270,7 @@ datum/wound/cut/massive
/datum/wound/internal_bleeding
internal = 1
stages = list("severed vein" = 30, "cut vein" = 20, "damaged vein" = 10, "bruised vein" = 5)
stages = list("severed artery" = 30, "cut artery" = 20, "damaged artery" = 10, "bruised artery" = 5)
autoheal_cutoff = 5
max_bleeding_stage = 0 //all stages bleed. It's called internal bleeding after all.

View File

@@ -128,7 +128,7 @@
"\blue You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." )
if (tool.w_class > get_max_wclass(affected)/2 && prob(50))
user << "\red You tear some blood vessels trying to fit such a big object in this cavity."
var/datum/wound/internal_bleeding/I = new (15)
var/datum/wound/internal_bleeding/I = new (10)
affected.wounds += I
affected.owner.custom_pain("You feel something rip in your [affected.display_name]!", 1)
user.drop_item()