[MIRROR] The Bigger They Are, The Harder They Fall (#11856)

Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com>
Co-authored-by: Guti <32563288+TheCaramelion@users.noreply.github.com>
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-10-21 23:01:38 -07:00
committed by GitHub
parent 273cc20cd9
commit c963d7d54b
6 changed files with 52 additions and 6 deletions

View File

@@ -35,3 +35,5 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_NO_SLIP_WATER "noslip_water"
/// Owner will ignore any fire protection when calculating fire damage
#define TRAIT_IGNORE_FIRE_PROTECTION "ignore_fire_protection"
/// Owner will slam down heavily into the ground upon falling from a height!
#define TRAIT_HEAVY_LANDING "trait_heavy_landing"

View File

@@ -737,6 +737,21 @@
playsound(H, "rustle", 25, 1)
return TRUE
if(HAS_TRAIT(src, TRAIT_HEAVY_LANDING))
if(!silent)
to_chat(H, span_danger("You land with a heavy crash!"))
landing.visible_message(span_danger(span_bold("\The [H]") + " crashes down from above!"))
playsound(H, 'sound/effects/meteorimpact.ogg', 75, TRUE, 3)
for(var/i = 1 to 10)
H.adjustBruteLoss(rand((0), (10)))
H.Weaken(20)
H.updatehealth()
if(istype(landing, /turf/simulated/floor) && prob(50))
var/turf/simulated/floor/our_crash = landing
our_crash.break_tile()
return TRUE
return FALSE
/datum/species/proc/post_spawn_special(mob/living/carbon/human/H)

View File

@@ -623,6 +623,17 @@
activation_message= span_cult(span_bold("What a terrible night to have a curse!"))
primitive_expression_messages=list("unluckily stubs their toe!")
/datum/trait/negative/heavy_landing
name = "Heavy Landing"
desc = "Your heavy frame causes you to crash heavily when falling from heights. The bigger they are, the harder they fall!"
cost = -1
var_changes = list("soft_landing" = FALSE) //override soft landing if the species would otherwise start with it
custom_only = FALSE
excludes = list(/datum/trait/positive/soft_landing)
/datum/trait/negative/heavy_landing/apply(datum/species/S, mob/living/carbon/human/H, trait_prefs)
..()
ADD_TRAIT(H, TRAIT_HEAVY_LANDING, ROUNDSTART_TRAIT)
/*
* So, I know what you're thinking.

View File

@@ -214,6 +214,7 @@
cost = 1
var_changes = list("soft_landing" = TRUE)
custom_only = FALSE
excludes = list(/datum/trait/negative/heavy_landing)
/*
/datum/trait/positive/hardfeet

View File

@@ -574,14 +574,26 @@
visible_message(span_warning("\The [src] falls from above and slams into \the [landing]!"), \
span_danger("You fall off and hit \the [landing]!"), \
"You hear something slam into \the [landing].")
playsound(src, "punch", 25, 1, -1)
if(HAS_TRAIT(src, TRAIT_HEAVY_LANDING))
playsound(src, 'sound/effects/meteorimpact.ogg', 75, TRUE, 3)
else
playsound(src, "punch", 25, TRUE, -1)
// Because wounds heal rather quickly, 10 (the default for this proc) should be enough to discourage jumping off but not be enough to ruin you, at least for the first time.
// Hits 10 times, because apparently targeting individual limbs lets certain species survive the fall from atmosphere
for(var/i = 1 to 10)
adjustBruteLoss(rand(damage_min, damage_max))
Weaken(4)
updatehealth()
if(HAS_TRAIT(src, TRAIT_HEAVY_LANDING))
for(var/i = 1 to 10)
adjustBruteLoss(rand((damage_min * 2), (damage_max * 2)))
Weaken(20)
updatehealth()
if(istype(landing, /turf/simulated/floor) && prob(50))
var/turf/simulated/floor/our_crash = landing
our_crash.break_tile()
else
for(var/i = 1 to 10)
adjustBruteLoss(rand(damage_min, damage_max))
Weaken(4)
updatehealth()
// There is really no situation where smacking into a floor and possibly dying horribly would NOT result in you dropping your remote view... It's also safer then assuming they should persist.
reset_perspective()

View File

@@ -39,11 +39,16 @@
var/tdamage
for(var/i = 1 to 5) //Twice as less damage because cushioned fall, but both get damaged.
tdamage = rand(0, 5)
if(HAS_TRAIT(drop_mob, TRAIT_HEAVY_LANDING))
tdamage = tdamage * 1.5
drop_mob.adjustBruteLoss(tdamage)
adjustBruteLoss(tdamage)
drop_mob.updatehealth()
updatehealth()
drop_mob.visible_message(span_danger("\The [drop_mob] falls onto \the [src]!"))
if(HAS_TRAIT(drop_mob, TRAIT_HEAVY_LANDING))
drop_mob.visible_message(span_danger("\The [drop_mob] crashes down onto \the [src]!"))
else
drop_mob.visible_message(span_danger("\The [drop_mob] falls onto \the [src]!"))
else
drop_mob.visible_message(span_notice("\The [drop_mob] safely brushes past \the [src] as they land."))