Skip to content

Commit

Permalink
Take extra death rolls when you're being beaten on (#16744)
Browse files Browse the repository at this point in the history
Co-authored-by: ZeWaka <zewakagamer@gmail.com>
  • Loading branch information
TDHooligan and ZeWaka committed Nov 15, 2023
1 parent 850fc0c commit f963e8a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions code/mob/living/carbon/human/procs/damage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,14 @@
make_cleanable(/obj/decal/cleanable/ash, get_turf(src))
qdel(P)

// roll a quick death roll if you're already really beat up
// same as the standard death rolls, but an additional penalty percentage is added, based on damage taken:
// The penalty is 5% at 5 damage, requiring 2x additional damage to raise another 5% (5 = 5%, 15 = 10%, 35 = 15%, 75 = 20%)
if ((src.health - brute) <= -100 && brute >= 5 && !ON_COOLDOWN(src, "Death from Impact", 4 DECI SECONDS ) ) // stupid bullet hoses
var/penalty = (5 * log(2, (brute+5)/5))
var/deathchance = min(99, ((src.get_brain_damage() * -5) + (src.health + (src.get_oxygen_deprivation() / 2))) * -0.01 + penalty)
if (prob(deathchance))
src.death()
src.bruteloss += brute
src.burnloss += burn

Expand Down

0 comments on commit f963e8a

Please sign in to comment.