More fixes to wounds.

- Added more wound descriptions
- Wounds now have "bleeding" and "bandaged" in their examine description
This commit is contained in:
cib
2012-10-12 11:50:28 -07:00
parent 0aa3bde885
commit 99313f5a94
3 changed files with 25 additions and 16 deletions

View File

@@ -162,7 +162,7 @@
else if(W.damage_type == BURN) else if(W.damage_type == BURN)
burn_dam += W.damage burn_dam += W.damage
if(!W.bandaged && W.damage > 4) if(W.bleeding())
status |= ORGAN_BLEEDING status |= ORGAN_BLEEDING
number_wounds += W.amount number_wounds += W.amount
@@ -185,6 +185,11 @@
// sync the organ's damage with its wounds // sync the organ's damage with its wounds
src.update_damages() src.update_damages()
proc/bandage()
status |= ORGAN_BANDAGED
for(var/datum/wound/W in wounds)
W.bandaged = 1
proc/get_damage() //returns total damage proc/get_damage() //returns total damage
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health? return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health?
@@ -366,7 +371,7 @@
var/size = min( max( 1, damage/10 ) , 6) var/size = min( max( 1, damage/10 ) , 6)
// first check whether we can widen an existing wound // first check whether we can widen an existing wound
if(wounds.len > 0 && prob(max(50+wounds.len*10,100))) if(wounds.len > 0 && prob(max(50+owner.number_wounds*10,100)))
if((type == CUT || type == BRUISE) && damage >= 5) if((type == CUT || type == BRUISE) && damage >= 5)
var/datum/wound/W = pick(wounds) var/datum/wound/W = pick(wounds)
if(W.amount == 1 && W.started_healing()) if(W.amount == 1 && W.started_healing())

View File

@@ -105,30 +105,31 @@
src.desc = desc_list[current_stage] src.desc = desc_list[current_stage]
src.min_damage = damage_list[current_stage] src.min_damage = damage_list[current_stage]
proc/bleeding()
return (!bandaged && damage > 4)
/** CUTS **/ /** CUTS **/
/datum/wound/cut /datum/wound/cut
// link wound descriptions to amounts of damage // link wound descriptions to amounts of damage
stages = list("cut" = 5, "healing cut" = 2, "small scab" = 0) stages = list("ugly ripped cut" = 20, "ripped cut" = 10, "cut" = 5, "healing cut" = 2, "small scab" = 0)
/datum/wound/deep_cut /datum/wound/deep_cut
stages = list("deep cut" = 15, "clotted cut" = 8, "scab" = 2, "fresh skin" = 0) stages = list("ugly deep ripped cut" = 25, "deep ripped cut" = 20, "deep cut" = 15, "clotted cut" = 8, "scab" = 2, "fresh skin" = 0)
/datum/wound/flesh_wound /datum/wound/flesh_wound
stages = list("flesh wound" = 25, "blood soaked clot" = 15, "large scab" = 5, "fresh skin" = 0) stages = list("ugly ripped flesh wound" = 35, "ugly flesh wound" = 30, "flesh wound" = 25, "blood soaked clot" = 15, "large scab" = 5, "fresh skin" = 0)
/datum/wound/gaping_wound /datum/wound/gaping_wound
stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "large clot" = 15, "small angry scar" = 5, \ stages = list("gaping wound" = 50, "large blood soaked clot" = 25, "large clot" = 15, "small angry scar" = 5, \
"small straight scar" = 0) "small straight scar" = 0)
/datum/wound/big_gaping_wound /datum/wound/big_gaping_wound
stages = list("big gaping wound" = 60, "gauze wrapped wound" = 50, "blood soaked bandage" = 25,\ stages = list("big gaping wound" = 60, "healing gaping wound" = 40, "large angry scar" = 10, "large straight scar" = 0)
"large angry scar" = 10, "large straight scar" = 0)
needs_treatment = 1 // this only heals when bandaged needs_treatment = 1 // this only heals when bandaged
/datum/wound/massive_wound /datum/wound/massive_wound
stages = list("massive wound" = 70, "massive blood soaked bandage" = 40, "huge bloody mess" = 20,\ stages = list("massive wound" = 70, "massive healing wound" = 50, "massive angry scar" = 10, "massive jagged scar" = 0)
"massive angry scar" = 10, "massive jagged scar" = 0)
needs_treatment = 1 // this only heals when bandaged needs_treatment = 1 // this only heals when bandaged
@@ -163,28 +164,28 @@
/** BURNS **/ /** BURNS **/
/datum/wound/moderate_burn /datum/wound/moderate_burn
stages = list("moderate burn" = 5, "moderate salved burn" = 2, "fresh skin" = 0) stages = list("ripped burn" = 10, "moderate burn" = 5, "moderate salved burn" = 2, "fresh skin" = 0)
needs_treatment = 1 // this only heals when bandaged needs_treatment = 1 // this only heals when bandaged
damage_type = BURN damage_type = BURN
/datum/wound/large_burn /datum/wound/large_burn
stages = list("large burn" = 15, "large salved burn" = 5, "fresh skin" = 0) stages = list("ripped large burn" = 20, "large burn" = 15, "large salved burn" = 5, "fresh skin" = 0)
needs_treatment = 1 // this only heals when bandaged needs_treatment = 1 // this only heals when bandaged
damage_type = BURN damage_type = BURN
/datum/wound/severe_burn /datum/wound/severe_burn
stages = list("severe burn" = 30, "severe salved burn" = 10, "burn scar" = 0) stages = list("ripped severe burn" = 35, "severe burn" = 30, "severe salved burn" = 10, "burn scar" = 0)
needs_treatment = 1 // this only heals when bandaged needs_treatment = 1 // this only heals when bandaged
damage_type = BURN damage_type = BURN
/datum/wound/deep_burn /datum/wound/deep_burn
stages = list("deep burn" = 40, "deep salved burn" = 15, "large burn scar" = 0) stages = list("ripped deep burn" = 45, "deep burn" = 40, "deep salved burn" = 15, "large burn scar" = 0)
needs_treatment = 1 // this only heals when bandaged needs_treatment = 1 // this only heals when bandaged

View File

@@ -298,10 +298,13 @@
else if(temp.wounds.len > 0) else if(temp.wounds.len > 0)
var/list/wound_descriptors = list() var/list/wound_descriptors = list()
for(var/datum/wound/W in temp.wounds) for(var/datum/wound/W in temp.wounds)
if(W.desc in wound_descriptors) var/this_wound_desc = W.desc
wound_descriptors[W.desc] += W.amount if(W.bleeding()) this_wound_desc = "bleeding [this_wound_desc]"
else if(W.bandaged) this_wound_desc = "bandaged [this_wound_desc]"
if(this_wound_desc in wound_descriptors)
wound_descriptors[this_wound_desc] += W.amount
continue continue
wound_descriptors[W.desc] = W.amount wound_descriptors[this_wound_desc] = W.amount
var/list/flavor_text = list() var/list/flavor_text = list()
var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\ var/list/no_exclude = list("gaping wound", "big gaping wound", "massive wound", "large bruise",\
"huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area") "huge bruise", "massive bruise", "severe burn", "large burn", "deep burn", "carbonised area")