Skip to content

Commit

Permalink
Merge pull request #5518 from Superlagg/i-think-i-made-dying-too-deadly
Browse files Browse the repository at this point in the history
Makes crit less ultra CBT
  • Loading branch information
Superlagg authored Oct 21, 2024
2 parents 4c56902 + d2cb535 commit aaafd24
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 44 deletions.
2 changes: 1 addition & 1 deletion code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#define BLOOD_REFILL_NUTRITION_STARVING 0

/// Lowest amount normal bleeding can take you
#define BLOOD_VOLUME_LOSS_FLOOR (BLOOD_VOLUME_NORMAL * 0.05)
#define BLOOD_VOLUME_LOSS_FLOOR (BLOOD_VOLUME_NORMAL * 0.15)

/// Cap for oxyloss in minor blood loss
#define BLOOD_LOSS_OXYLOSS_CAP_MINOR 10
Expand Down
2 changes: 2 additions & 0 deletions code/controllers/subsystem/second_wind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ SUBSYSTEM_DEF(secondwind)

var/last_life_tick = 0

var/crit_bleed_threshold = BLOOD_VOLUME_SYMPTOMS_ANNOYING

var/list/mapspawn_bonfires = list()
var/list/player_bonfires = list()
var/datum/second_wind_pick_a_point/swpap
Expand Down
10 changes: 7 additions & 3 deletions code/modules/mob/living/blood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,13 @@ GLOBAL_LIST_INIT(blood_loss_messages, list(
knockdown_time,
slowdown,
)
var/stammoxy_dam = round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1)
if(oxy_loss_cap && (getBruteLoss() + getFireLoss() + getToxLoss()) < oxy_loss_cap)
adjustBruteLoss(stammoxy_dam, TRUE, FALSE, TRUE, FALSE)
var/stammoxy_dam = rand(1,3) // round((BLOOD_VOLUME_NORMAL - blood_volume) * 0.02, 1)
var/area/A = get_area(src)
if(!A.safe_town)
// oxy_loss_cap = max(oxy_loss_cap, crit_threshold)
if(oxy_loss_cap && (getBruteLoss() + getFireLoss() + getToxLoss()) < oxy_loss_cap)
if(!InCritical())
adjustBruteLoss(stammoxy_dam, TRUE, FALSE, TRUE, FALSE)
// if(oxy_loss_cap && getOxyLoss() < oxy_loss_cap)
// adjustOxyLoss(stammoxy_dam)
if(stam_cap && getStaminaLoss() < stam_cap)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/carbon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
injured_parts++
else if(BP.brute_dam || BP.burn_dam)
injured_parts++
if(BP.current_gauze && BP.current_suture)
if(BP.current_gauze || BP.current_suture)
bandaged_parts++
return injured_parts ? bandaged_parts / injured_parts : 1

Expand Down
95 changes: 60 additions & 35 deletions code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,31 +49,34 @@
last_crit = world.time
return FALSE
if(health > crit_threshold) // if we're above crit, we're not in crit
last_crit = world.time
// handle_agony(src)
return FALSE
// welcome to crit! We're gonna make your life suck until you unsuck it
var/time_in_crit = world.time - last_crit
var/is_bandaged_enuf = injury_bandage_proportion() >= 0.9
var/magnitude = 1
switch(time_in_crit)
if(0 to 10 SECONDS)
magnitude = 1
if(10 SECONDS to 30 SECONDS)
magnitude = 2
if(30 SECONDS to 60 SECONDS)
magnitude = 3
if(60 SECONDS to 2 MINUTES)
magnitude = 4 // die
if(2 MINUTES to 5 MINUTES)
magnitude = 5 // die !
else
magnitude = 10 // die ! !
var/area/A = get_area(src)
if(!A.safe_town) // so people dont instadie in town
switch(time_in_crit)
if(0 to 60 SECONDS)
magnitude = 1
if(60 SECONDS to 2 MINUTES)
magnitude = 2
if(3 MINUTES to 4 MINUTES)
magnitude = 3
if(4 MINUTES to 5 MINUTES)
magnitude = 5 // die
if(2 MINUTES to INFINITY)
magnitude = 7 // die !
// else
// magnitude = 10 // die ! !
if(is_bandaged_enuf)
magnitude = min(magnitude, 0.5)
magnitude = min(magnitude, 0.25)
if(stat != UNCONSCIOUS && crit_moan_cd < world.time && prob(10*magnitude))
switch(magnitude)
if(0 to 2)
switch(rand(1,100))
if(-INFINITY to 2)
switch(rand(1,60))
if(1 to 5)
emote("scrungy")
if(6 to 10)
Expand All @@ -90,33 +93,52 @@
emote("pale")
if(51 to 60)
emote("cough")
if(3 to 4)
switch(rand(1,60))
if(1 to 20)
emote("scream")
if(21 to 30)
emote("pale")
if(31 to 40)
emote("cough")
if(41 to 50)
emote("scream")
if(51 to 60)
emote("scrungy")
if(5 to INFINITY)
switch(rand(1,60))
if(1 to 15)
say("*me screams in agony!")
if(16 to 30)
say("*me shudders in pain!")
else
bleed(magnitude * 5)
emote("scream")
COOLDOWN_START(src, crit_moan_cd, 5 SECONDS)
var/pain = rand(1, 100)
var/list/doem = list()
switch(pain)
if(1 to 30) // take damage
doem["take damage"] = TRUE
if(30 to 50) // bleed
if(30 to 60) // bleed
if(!can_bleed() || !is_bleeding())
doem["take damage"] = TRUE
else
doem["bleed"] = TRUE
if(50 to 75) // drop your stuff!
if(get_active_held_item() || get_inactive_held_item())
doem["drop your stuff"] = TRUE
else
doem["take damage"] = TRUE
if(75 to 90) // all the above
// if(50 to 75) // drop your stuff!
// if(get_active_held_item() || get_inactive_held_item())
// doem["drop your stuff"] = TRUE
// else
// doem["take damage"] = TRUE
if(60 to 100) // all the above
doem["take damage"] = TRUE
doem["bleed"] = TRUE
if(get_active_held_item() || get_inactive_held_item())
doem["drop your stuff"] = TRUE
if(90 to 100) // faint
if(!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE))
doem["faint"] = TRUE
else
doem["take damage"] = TRUE
// if(get_active_held_item() || get_inactive_held_item())
// doem["drop your stuff"] = TRUE
// if(90 to 100) // faint
// if(!HAS_TRAIT(src, TRAIT_SLEEPIMMUNE))
// doem["faint"] = TRUE
// else
// doem["take damage"] = TRUE
if(doem["take damage"])
adjustBruteLoss((1 * magnitude), TRUE, FALSE, TRUE, FALSE)
if(doem["bleed"])
Expand All @@ -131,7 +153,7 @@
// say("*me collapses into a heap!")
// AdjustSleeping(sleeptime)
if(prob(5) && dna?.species && isrobotic(dna.species)) // yall robots thought you were better than pain, huh?
emp_act(magnitude / 3) // get EMP'd
emp_act(magnitude) // get EMP'd
return TRUE

/mob/living/carbon/human/enter_soft_crit()
Expand All @@ -151,11 +173,14 @@
var/obj/item/bodypart/Bpart = pick(partz)
if(Bpart)
Bpart.bleed_dam = min(Bpart.bleed_dam + 55, 100)
Bpart.destroy_coverings()
Bpart.receive_damage(1, 0, 0, 0, TRUE, null, 100, 100, pick(SHARP_EDGED, SHARP_POINTY), TRUE, TRUE)
// Bpart.destroy_coverings()
Bpart.apply_bleed_wound()

/mob/living/carbon/human/proc/splurt(howmuch)
bleed(howmuch)
if(blood_volume > SSsecondwind.crit_bleed_threshold)
bleed(howmuch)
else
add_splatter_floor(get_turf(src))
var/list/turfs2blood = orange(1, get_turf(src))
turfs2blood = shuffle(turfs2blood)
for(var/turf/T in turfs2blood)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -667,6 +667,7 @@

/mob/living/proc/revive(full_heal = FALSE, admin_revive = FALSE, force_revive = FALSE)
SEND_SIGNAL(src, COMSIG_LIVING_REVIVE, full_heal, admin_revive)
last_crit = world.time
if(full_heal)
fully_heal(admin_revive)
if(stat == DEAD && can_be_revived()) //in some cases you can't revive (e.g. no brain)
Expand Down
9 changes: 5 additions & 4 deletions code/modules/reagents/reagent_containers/blood_pack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
desc = "Contains blood used for transfusion. Must be attached to an IV drip."
icon = 'icons/obj/bloodpack.dmi'
icon_state = "bloodpack"
volume = 400
volume = 1000
w_class = WEIGHT_CLASS_SMALL
reagent_flags = DRAINABLE
var/blood_type = null
Expand All @@ -14,7 +14,7 @@
/obj/item/reagent_containers/blood/Initialize()
. = ..()
if(blood_type != null)
reagents.add_reagent(/datum/reagent/blood, 200, list("donor"=null,"viruses"=null,"blood_DNA"=null,"bloodcolor"=bloodtype_to_color(blood_type), "blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
reagents.add_reagent(/datum/reagent/blood, volume, list("donor"=null,"viruses"=null,"blood_DNA"=null,"bloodcolor"=bloodtype_to_color(blood_type), "blood_type"=blood_type,"resistances"=null,"trace_chem"=null))
update_icon()

/obj/item/reagent_containers/blood/on_reagent_change(changetype)
Expand Down Expand Up @@ -135,7 +135,7 @@
name = "bluespace blood pack"
desc = "Contains blood used for transfusion, this one has been made with bluespace technology to hold much more blood. Must be attached to an IV drip."
icon_state = "bsbloodpack"
volume = 600 //its a blood bath!
volume = 2000 //its a blood bath!

/obj/item/reagent_containers/blood/bluespace/attack(mob/living/carbon/C, mob/user, def_zone)
if(user.a_intent == INTENT_HELP)
Expand All @@ -154,11 +154,12 @@
desc = "RadAway is an intravenous chemical solution that bonds with radiation and toxin particles and passes them through the body's system. It takes some time to work and is a potent diuretic."
labelled = 1
blood_type = null
volume = 200
list_reagents = list(/datum/reagent/medicine/radaway = 200)


/obj/item/reagent_containers/blood/small
name = "small blood pack"
volume = 150 //same as plasbucket
volume = 400 //same as plasbucket
w_class = WEIGHT_CLASS_SMALL
reagent_flags = INJECTABLE | DRAINABLE | AMOUNT_VISIBLE

0 comments on commit aaafd24

Please sign in to comment.