Files
MrMelbert bf22a388ca People become desensitized to death from exposure (#94924)
## About The Pull Request

Desensitized is no longer binary yes/no, now scales from 0.1x to 1x (or
beyond, I guess)

Desensitized jobs start as 0.5x desensitized (which is the threshold for
being considered "truly desensitized")
Some antags are now 0.1x to 0.25x desensitized

Witnessing death of a fellow human gives you slight desensitization
(currently -0.025x).
A normal crewmember, after witnessing 20 deaths, is on par with a
roundstart desensitized crewmember.
Likewise a desensitized crewmember has almost no reaction to death after
witnessing 20 deaths.
Your own deaths count towards this value.

There's an achievement for managing to go from 1x to 0.1x across the
course of an entire round.

## Why It's Good For The Game

This is intended to contribute to the "story" people face across the
length of a round.
Rounds with few overall deaths results in crewmembers regularly getting
shocked, but bloodbaths results in crewmembers "dehumanizing and facing
the bloodshed".

## Changelog

🆑 Melbert
add: Desensitization to death is no longer binary - some antagonists are
now more used to it than others.
add: Witnessing the death of a fellow humanoid (or dying yourself) will
slightly desensitize you to future deaths.
add: Adds an achievement for managing to max out desensitization across
a round.
add: Desensitized crewmembers care less when splattered with blood.
add: Holodeck mobs have a reduced death mood impact.
/🆑
2026-01-28 20:22:07 +00:00

125 lines
4.3 KiB
Plaintext

// Threshold levels for beauty for humans
#define BEAUTY_LEVEL_HORRID -66
#define BEAUTY_LEVEL_BAD -33
#define BEAUTY_LEVEL_DECENT 33
#define BEAUTY_LEVEL_GOOD 66
#define BEAUTY_LEVEL_GREAT 100
// Moods levels for humans
#define MOOD_HAPPY4 15
#define MOOD_HAPPY3 10
#define MOOD_HAPPY2 6
#define MOOD_HAPPY1 2
#define MOOD_NEUTRAL 0
#define MOOD_SAD1 -3
#define MOOD_SAD2 -7
#define MOOD_SAD3 -15
#define MOOD_SAD4 -20
// Moods levels for humans
#define MOOD_LEVEL_HAPPY4 9
#define MOOD_LEVEL_HAPPY3 8
#define MOOD_LEVEL_HAPPY2 7
#define MOOD_LEVEL_HAPPY1 6
#define MOOD_LEVEL_NEUTRAL 5
#define MOOD_LEVEL_SAD1 4
#define MOOD_LEVEL_SAD2 3
#define MOOD_LEVEL_SAD3 2
#define MOOD_LEVEL_SAD4 1
// Sanity values for humans
#define SANITY_MAXIMUM 150
#define SANITY_GREAT 125
#define SANITY_NEUTRAL 100
#define SANITY_DISTURBED 75
#define SANITY_UNSTABLE 50
#define SANITY_CRAZY 25
#define SANITY_INSANE 0
// Sanity levels for humans
#define SANITY_LEVEL_GREAT 1
#define SANITY_LEVEL_NEUTRAL 2
#define SANITY_LEVEL_DISTURBED 3
#define SANITY_LEVEL_UNSTABLE 4
#define SANITY_LEVEL_CRAZY 5
#define SANITY_LEVEL_INSANE 6
/// Equal to the highest sanity level
#define SANITY_LEVEL_MAX SANITY_LEVEL_INSANE
// Group types for terror handlers
#define TERROR_HANDLER_SOURCE "source"
#define TERROR_HANDLER_EFFECT "effect"
// Default cooldown for terror messages, to not get spammy
#define TERROR_MESSAGE_CD 15 SECONDS
// Values for terror buildup effects
/// Initial value for effects that apply the component from spooking you
#define TERROR_BUILDUP_INITIAL 100
/// How much terror is removed per second when we're not afraid
#define TERROR_BUILDUP_PASSIVE_DECREASE 15
/// Level at which minor effects start kicking in
#define TERROR_BUILDUP_FEAR 150
/// Level at which major effects start kicking in
#define TERROR_BUILDUP_TERROR 300
/// Level at which we're having a full on panic attack
#define TERROR_BUILDUP_PANIC 500
/// Maximum amount of terror that passive sources can stack
#define TERROR_BUILDUP_PASSIVE_MAXIMUM 600
/// Your heart gives out at this level, should always be higher than TERROR_BUILDUP_PASSIVE_MAXIMUM
#define TERROR_BUILDUP_HEART_ATTACK 800
/// Maximum amount of terror that can be held at once
#define TERROR_BUILDUP_MAXIMUM 1000
/// How much terror panic attacks grant
#define PANIC_ATTACK_TERROR_AMOUNT 50
/// How much terror being hugged reduces, or increases if its done by a nightmare or someone you're afraid of
#define HUG_TERROR_AMOUNT 90
/// Cooldown for phobia checks, to avoid constantly refreshing views
#define PHOBIA_CHECK_DELAY 5 SECONDS
/// Delay between phobia freakouts, also the time it takes for the buildup effect to fade away
#define PHOBIA_FREAKOUT_DELAY 12 SECONDS
/// Amount of terror granted whenever we hear a word we're afraid of
#define PHOBIA_WORD_TERROR_BUILDUP 40
/// Amount of terror granted by each phobia trigger
#define PHOBIA_FREAKOUT_TERROR_BUILDUP 120
/// Cooldown for fear screams
#define TERROR_STARTLE_COOLDOWN 12 SECONDS
/// Minimum difference in fear per tick for screams to actually trigger, so we don't proc from minor fears
#define TERROR_STARTLE_MINIMUM_DIFFERENCE 40
/// Relates to fear or resisting fear
#define MOOD_EVENT_FEAR (1<<0)
/// Relates to art
#define MOOD_EVENT_ART (1<<1)
/// Relates to being a generally silly guy
#define MOOD_EVENT_WHIMSY (1<<2)
/// Playing games and goofing off
#define MOOD_EVENT_GAMING (1<<3)
/// Relates to food
#define MOOD_EVENT_FOOD (1<<4)
/// Relates to being in pain
#define MOOD_EVENT_PAIN (1<<5)
/// Relates to spirituality
#define MOOD_EVENT_SPIRITUAL (1<<6)
/// Checks if the mob has the given personality typepath
#define HAS_PERSONALITY(mob, personality) (LAZYACCESS(mob.personalities, personality))
/// Return from /be_replaced or /be_refreshed to actually go prevent the new mood event from being added
#define BLOCK_NEW_MOOD FALSE
/// Return from /be_replaced or /be_refreshed to actually go through and allow the new mood event to be added
#define ALLOW_NEW_MOOD TRUE
/// Threshold for desensitization effects to start applying
#define DESENSITIZED_THRESHOLD 0.5
/// Minimum level for desensitization multiplier
#define DESENSITIZED_MINIMUM 0.1
/// Reduction in desensitization level per death witnessed
#define DESENSITIZED_REDUCTION_PER_DEATH 0.025
/// Check if a mob is desensitized (passes the threshold)
#define IS_DESENSITIZED(mob) ((mob.mind?.desensitized_level || 1) <= DESENSITIZED_THRESHOLD)