diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index df60e47c059..4662b97fbfa 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -225,11 +225,19 @@ 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 + //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) + wounds += I + owner.custom_pain("You feel something rip in your [display_name]!", 1) + // first check whether we can widen an existing wound - if(wounds.len > 0 && prob(max(50+owner.number_wounds*10,100))) + if(wounds.len > 0 && prob(max(50+(owner.number_wounds-1)*10,90))) if((type == CUT || type == BRUISE) && damage >= 5) var/datum/wound/W = pick(wounds) - if(W.amount == 1 && W.started_healing()) + if(W.amount == 1) W.open_wound(damage) if(prob(25)) owner.visible_message("\red The wound on [owner.name]'s [display_name] widens with a nasty ripping voice.",\ @@ -241,13 +249,6 @@ This function completely restores a damaged organ to perfect condition. var/wound_type = get_wound_type(type, damage) var/datum/wound/W = new wound_type(damage) - //Possibly trigger an internal wound, too. - var/local_damage = brute_dam + burn_dam + damage - if(damage > 10 && type != BURN && local_damage > 20 && prob(damage) && !(status & ORGAN_ROBOT)) - var/datum/wound/internal_bleeding/I = new (15) - wounds += I - owner.custom_pain("You feel something rip in your [display_name]!", 1) - //Check whether we can add the wound to an existing wound for(var/datum/wound/other in wounds) if(other.desc == W.desc) diff --git a/code/modules/organs/wound.dm b/code/modules/organs/wound.dm index 307c5ff20ca..eabe67b30bb 100644 --- a/code/modules/organs/wound.dm +++ b/code/modules/organs/wound.dm @@ -51,6 +51,7 @@ // helper lists var/tmp/list/desc_list = list() var/tmp/list/damage_list = list() + New(var/damage) created = world.time @@ -80,9 +81,7 @@ src.min_damage = damage_list[current_stage] src.desc = desc_list[current_stage] - // returns 1 if the wound has started healing - proc/started_healing() - return (current_stage > 1) + proc // checks whether the wound has been appropriately treated // always returns 1 for wounds that are too minor to need treatment