Skip to content

Commit

Permalink
[MIRROR] Replace natural beheading with cranial fissures (splitting y…
Browse files Browse the repository at this point in the history
…our skull) (#1556)

* [MIRROR] Replace natural beheading with cranial fissures (splitting your skull) (#80703) (#382)

* Replace natural beheading with cranial fissures (splitting your skull) (#80703)

Replaces natural beheading (doing a lot of damage to the head) with
cranial fissures, which split your skull in half.

![dreamseeker_2023-12-31T19-38-16](https://github.com/tgstation/tgstation/assets/35135081/f84dc479-6156-45b7-bb23-4e4ec7378f6b)

While you have this wound, your eyes can be pulled out of your head with
bare hands, and slipping will spill your brain out of your head.

Removes beheading objective from traitor.

Zombies can be beheaded all the same.

Any other way of beheading, such as surgery or amputation shears, is
still possible.

Closes #80439

I've enjoyed seeing the results of the test merge to remove natural
beheading. At 947 beheadings in a week, 1 in every 7 deaths resulted in
a beheading. This makes it significantly easier to remove people from
rounds as the brain is generally critical to actually reviving someone.
While round removal is fine, it should be something that is
intentionally performed with enough effort. Mass round removals ought to
require a significant amount of effort. There are plenty of ways to
round remove someone, but it ought not be an incidental choice.

The effects of beheading removal have shown some interesting anecdotal
highlights (nothing here is backed up with stats, so take it with a
grain of salt):
1. As a whole, people did not really replace it with anything. The
biggest alternative has been lighting people on fire, but this has not
been done at a significant enough scale at all to be a noteworthy
problem, and is still fixable with enough effort.
2. Cult and rev rounds have played out far more interestingly. In one
round I was adminning a head of staff who intended to behead every
revolutionary they saw, but because they didn't, the back and forth
continues. I've also had opportunities to revive head revs that I am
skeptical would've been available to me otherwise.

Complete removal of beheading was not chosen as it does not feel right
for a repeated fire axe to the head to do basically nothing. The current
implementation is intended to be something that is just not useful
enough to do on everyone you see, but is still appreciably an effect.

:cl:
balance: Instead of too much damage to the head beheading someone, it
will now split their skull in half. While their skull is open, you can
rip out their eyes with your hands. and they will spill their brain out
of their head if they slip.
balance: The Path of Blades ascension will accept either a beheaded
person, or someone with their skull split open.
del: Removed the beheading objectives from traitor.
/:cl:

* Update _traits.dm

---------

Co-authored-by: Mothblocks <[email protected]>

* removed fissure and enabled beheading back

---------

Co-authored-by: Bloop <[email protected]>
Co-authored-by: Mothblocks <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
4 people authored Feb 20, 2024
1 parent dd57037 commit a81ab62
Show file tree
Hide file tree
Showing 14 changed files with 298 additions and 121 deletions.
5 changes: 5 additions & 0 deletions code/__DEFINES/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -940,6 +940,11 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// This atom is currently spinning.
#define TRAIT_SPINNING "spinning"

/// This limb can't be torn open anymore
#define TRAIT_IMMUNE_TO_CRANIAL_FISSURE "immune_to_cranial_fissure"
/// Trait given if the mob has a cranial fissure.
#define TRAIT_HAS_CRANIAL_FISSURE "has_cranial_fissure"

/// Denotes that this id card was given via the job outfit, aka the first ID this player got.
#define TRAIT_JOB_FIRST_ID_CARD "job_first_id_card"
/// ID cards with this trait will attempt to forcibly occupy the front-facing ID card slot in wallets.
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/wounds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ GLOBAL_LIST_INIT(bio_state_anatomy, list(
#define WOUND_SERIES_FLESH_PUNCTURE_BLEED "wound_series_flesh_puncture_bleed"
/// Generic loss wounds. See loss.dm
#define WOUND_SERIES_LOSS_BASIC "wound_series_loss_basic"
/// Cranial fissure wound.
#define WOUND_SERIES_CRANIAL_FISSURE "wound_series_cranial_fissure"

// NOVA EDIT ADDITION BEGIN - MUSCLE AND SYNTH WOUNDS
// Have to put it here so I can use it in the global list of wound series
Expand Down
62 changes: 23 additions & 39 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,55 +112,55 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_ADVANCEDTOOLUSER" = TRAIT_ADVANCEDTOOLUSER,
"TRAIT_AGENDER" = TRAIT_AGENDER,
"TRAIT_AGEUSIA" = TRAIT_AGEUSIA,
"TRAIT_AI_BAGATTACK" = TRAIT_AI_BAGATTACK,
"TRAIT_AIRLOCK_SHOCKIMMUNE" = TRAIT_AIRLOCK_SHOCKIMMUNE,
"TRAIT_AI_BAGATTACK" = TRAIT_AI_BAGATTACK,
"TRAIT_ALCOHOL_TOLERANCE" = TRAIT_ALCOHOL_TOLERANCE,
"TRAIT_ALLOW_HERETIC_CASTING" = TRAIT_ALLOW_HERETIC_CASTING,
"TRAIT_ALLOWED_HONORBOUND_ATTACK" = TRAIT_ALLOWED_HONORBOUND_ATTACK,
"TRAIT_ALLOW_HERETIC_CASTING" = TRAIT_ALLOW_HERETIC_CASTING,
"TRAIT_ALWAYS_NO_ACCESS" = TRAIT_ALWAYS_NO_ACCESS,
"TRAIT_ALWAYS_WANTED" = TRAIT_ALWAYS_WANTED,
"TRAIT_ANGELIC" = TRAIT_ANGELIC,
"TRAIT_ANTENNAE" = TRAIT_ANTENNAE,
"TRAIT_ANTICONVULSANT" = TRAIT_ANTICONVULSANT,
"TRAIT_ANTIMAGIC_NO_SELFBLOCK" = TRAIT_ANTIMAGIC_NO_SELFBLOCK,
"TRAIT_ANTIMAGIC" = TRAIT_ANTIMAGIC,
"TRAIT_ANTIMAGIC_NO_SELFBLOCK" = TRAIT_ANTIMAGIC_NO_SELFBLOCK,
"TRAIT_ANXIOUS" = TRAIT_ANXIOUS,
"TRAIT_BADDNA" = TRAIT_BADDNA,
"TRAIT_BADTOUCH" = TRAIT_BADTOUCH,
"TRAIT_BALD" = TRAIT_BALD,
"TRAIT_BATON_RESISTANCE" = TRAIT_BATON_RESISTANCE,
"TRAIT_BEING_BLADE_SHIELDED" = TRAIT_BEING_BLADE_SHIELDED,
"TRAIT_BLOB_ALLY" = TRAIT_BLOB_ALLY,
"TRAIT_BLOOD_CLANS" = TRAIT_BLOOD_CLANS,
"TRAIT_BLOOD_DEFICIENCY" = TRAIT_BLOOD_DEFICIENCY,
"TRAIT_BLOODSHOT_EYES" = TRAIT_BLOODSHOT_EYES,
"TRAIT_BLOODY_MESS" = TRAIT_BLOODY_MESS,
"TRAIT_BLOOD_CLANS" = TRAIT_BLOOD_CLANS,
"TRAIT_BLOOD_DEFICIENCY" = TRAIT_BLOOD_DEFICIENCY,
"TRAIT_BOMBIMMUNE" = TRAIT_BOMBIMMUNE,
"TRAIT_BONSAI" = TRAIT_BONSAI,
"TRAIT_BOOZE_SLIDER" = TRAIT_BOOZE_SLIDER,
"TRAIT_BRAINWASHING" = TRAIT_BRAINWASHING,
"TRAIT_BYPASS_EARLY_IRRADIATED_CHECK" = TRAIT_BYPASS_EARLY_IRRADIATED_CHECK,
"TRAIT_BYPASS_MEASURES" = TRAIT_BYPASS_MEASURES,
"TRAIT_CAN_HOLD_ITEMS" = TRAIT_CAN_HOLD_ITEMS,
"TRAIT_CAN_SIGN_ON_COMMS" = TRAIT_CAN_SIGN_ON_COMMS,
"TRAIT_CAN_STRIP" = TRAIT_CAN_STRIP,
"TRAIT_CAN_USE_NUKE" = TRAIT_CAN_USE_NUKE,
"TRAIT_CANNOT_BE_UNBUCKLED" = TRAIT_CANNOT_BE_UNBUCKLED,
"TRAIT_CANNOT_CRYSTALIZE" = TRAIT_CANNOT_CRYSTALIZE,
"TRAIT_CANNOT_OPEN_PRESENTS" = TRAIT_CANNOT_OPEN_PRESENTS,
"TRAIT_CANT_RIDE" = TRAIT_CANT_RIDE,
"TRAIT_CAN_HOLD_ITEMS" = TRAIT_CAN_HOLD_ITEMS,
"TRAIT_CAN_SIGN_ON_COMMS" = TRAIT_CAN_SIGN_ON_COMMS,
"TRAIT_CAN_STRIP" = TRAIT_CAN_STRIP,
"TRAIT_CAN_USE_NUKE" = TRAIT_CAN_USE_NUKE,
"TRAIT_CATLIKE_GRACE" = TRAIT_CATLIKE_GRACE,
"TRAIT_CHANGELING_HIVEMIND_MUTE" = TRAIT_CHANGELING_HIVEMIND_MUTE,
"TRAIT_CHASM_DESTROYED" = TRAIT_CHASM_DESTROYED,
"TRAIT_CHEF_KISS" = TRAIT_CHEF_KISS,
"TRAIT_CHUNKYFINGERS_IGNORE_BATON" = TRAIT_CHUNKYFINGERS_IGNORE_BATON,
"TRAIT_CHUNKYFINGERS" = TRAIT_CHUNKYFINGERS,
"TRAIT_CHUNKYFINGERS_IGNORE_BATON" = TRAIT_CHUNKYFINGERS_IGNORE_BATON,
"TRAIT_CLEANBOT_WHISPERER" = TRAIT_CLEANBOT_WHISPERER,
"TRAIT_CLIFF_WALKER" = TRAIT_CLIFF_WALKER,
"TRAIT_CLOWN_ENJOYER" = TRAIT_CLOWN_ENJOYER,
"TRAIT_CLUMSY" = TRAIT_CLUMSY,
"TRAIT_COAGULATING" = TRAIT_COAGULATING,
"TRAIT_CORPSELOCKED" = TRAIT_CORPSELOCKED,
"TRAIT_ALWAYS_WANTED" = TRAIT_ALWAYS_WANTED,
"TRAIT_CRITICAL_CONDITION" = TRAIT_CRITICAL_CONDITION,
"TRAIT_CULT_HALO" = TRAIT_CULT_HALO,
"TRAIT_CURSED" = TRAIT_CURSED,
Expand All @@ -183,8 +183,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_DUMB" = TRAIT_DUMB,
"TRAIT_DWARF" = TRAIT_DWARF,
"TRAIT_EASILY_WOUNDED" = TRAIT_EASILY_WOUNDED,
"TRAIT_EASYDISMEMBER" = TRAIT_EASYDISMEMBER,
"TRAIT_EASYBLEED" = TRAIT_EASYBLEED,
"TRAIT_EASYDISMEMBER" = TRAIT_EASYDISMEMBER,
"TRAIT_ECHOLOCATION_EXTRA_RANGE" = TRAIT_ECHOLOCATION_EXTRA_RANGE,
"TRAIT_ECHOLOCATION_RECEIVER" = TRAIT_ECHOLOCATION_RECEIVER,
"TRAIT_ELDRITCH_PAINTING_EXAMINE" = TRAIT_ELDRITCH_PAINTING_EXAMINE,
Expand Down Expand Up @@ -213,10 +213,10 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_FORCED_GRAVITY" = TRAIT_FORCED_GRAVITY,
"TRAIT_FORCED_STANDING" = TRAIT_FORCED_STANDING,
"TRAIT_FOV_APPLIED" = TRAIT_FOV_APPLIED,
"TRAIT_FREERUNNING" = TRAIT_FREERUNNING,
"TRAIT_FREE_FLOAT_MOVEMENT" = TRAIT_FREE_FLOAT_MOVEMENT,
"TRAIT_FREE_HYPERSPACE_MOVEMENT" = TRAIT_FREE_HYPERSPACE_MOVEMENT,
"TRAIT_FREE_HYPERSPACE_SOFTCORDON_MOVEMENT" = TRAIT_FREE_HYPERSPACE_SOFTCORDON_MOVEMENT,
"TRAIT_FREERUNNING" = TRAIT_FREERUNNING,
"TRAIT_FRIENDLY" = TRAIT_FRIENDLY,
"TRAIT_FUGU_GLANDED" = TRAIT_FUGU_GLANDED,
"TRAIT_GAMER" = TRAIT_GAMER,
Expand All @@ -228,12 +228,13 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_GOOD_HEARING" = TRAIT_GOOD_HEARING,
"TRAIT_GRABWEAKNESS" = TRAIT_GRABWEAKNESS,
"TRAIT_GREENTEXT_CURSED" = TRAIT_GREENTEXT_CURSED,
"TRAIT_GUN_NATURAL" = TRAIT_GUN_NATURAL,
"TRAIT_GUNFLIP" = TRAIT_GUNFLIP,
"TRAIT_GUN_NATURAL" = TRAIT_GUN_NATURAL,
"TRAIT_HALT_RADIATION_EFFECTS" = TRAIT_HALT_RADIATION_EFFECTS,
"TRAIT_HANDS_BLOCKED" = TRAIT_HANDS_BLOCKED,
"TRAIT_HARDLY_WOUNDED" = TRAIT_HARDLY_WOUNDED,
"TRAIT_HAS_BEEN_KIDNAPPED" = TRAIT_HAS_BEEN_KIDNAPPED,
"TRAIT_HAS_CRANIAL_FISSURE" = TRAIT_HAS_CRANIAL_FISSURE,
"TRAIT_HAS_MARKINGS" = TRAIT_HAS_MARKINGS,
"TRAIT_HATED_BY_DOGS" = TRAIT_HATED_BY_DOGS,
"TRAIT_HEALS_FROM_CARP_RIFTS" = TRAIT_HEALS_FROM_CARP_RIFTS,
Expand All @@ -254,20 +255,20 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_IGNORING_GRAVITY" = TRAIT_IGNORING_GRAVITY,
"TRAIT_ILLITERATE" = TRAIT_ILLITERATE,
"TRAIT_IMMOBILIZED" = TRAIT_IMMOBILIZED,
"TRAIT_IN_CALL" = TRAIT_IN_CALL,
"TRAIT_INCAPACITATED" = TRAIT_INCAPACITATED,
"TRAIT_INTROVERT" = TRAIT_INTROVERT,
"TRAIT_INVISIBLE_MAN" = TRAIT_INVISIBLE_MAN,
"TRAIT_INVISIMIN" = TRAIT_INVISIMIN,
"TRAIT_IN_CALL" = TRAIT_IN_CALL,
"TRAIT_IWASBATONED" = TRAIT_IWASBATONED,
"TRAIT_JOLLY" = TRAIT_JOLLY,
"TRAIT_KISS_OF_DEATH" = TRAIT_KISS_OF_DEATH,
"TRAIT_KNOCKEDOUT" = TRAIT_KNOCKEDOUT,
"TRAIT_KNOW_ENGI_WIRES" = TRAIT_KNOW_ENGI_WIRES,
"TRAIT_KNOW_ROBO_WIRES" = TRAIT_KNOW_ROBO_WIRES,
"TRAIT_LIGHTBULB_REMOVER" = TRAIT_LIGHTBULB_REMOVER,
"TRAIT_LIGHT_DRINKER" = TRAIT_LIGHT_DRINKER,
"TRAIT_LIGHT_STEP" = TRAIT_LIGHT_STEP,
"TRAIT_LIGHTBULB_REMOVER" = TRAIT_LIGHTBULB_REMOVER,
"TRAIT_LIMBATTACHMENT" = TRAIT_LIMBATTACHMENT,
"TRAIT_LITERATE" = TRAIT_LITERATE,
"TRAIT_LIVERLESS_METABOLISM" = TRAIT_LIVERLESS_METABOLISM,
Expand All @@ -280,8 +281,8 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_MESON_VISION" = TRAIT_MESON_VISION,
"TRAIT_MIME_FAN" = TRAIT_MIME_FAN,
"TRAIT_MIMING" = TRAIT_MIMING,
"TRAIT_MIND_TEMPORARILY_GONE" = TRAIT_MIND_TEMPORARILY_GONE,
"TRAIT_MINDSHIELD" = TRAIT_MINDSHIELD,
"TRAIT_MIND_TEMPORARILY_GONE" = TRAIT_MIND_TEMPORARILY_GONE,
"TRAIT_MOB_BREEDER" = TRAIT_MOB_BREEDER,
"TRAIT_MOB_TIPPED" = TRAIT_MOB_TIPPED,
"TRAIT_MORBID" = TRAIT_MORBID,
Expand Down Expand Up @@ -341,31 +342,13 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_NOCRITDAMAGE" = TRAIT_NOCRITDAMAGE,
"TRAIT_NO_UNDERWEAR" = TRAIT_NO_UNDERWEAR,
"TRAIT_NO_ZOMBIFY" = TRAIT_NO_ZOMBIFY,
"TRAIT_NOBLOOD" = TRAIT_NOBLOOD,
"TRAIT_NOBREATH" = TRAIT_NOBREATH,
"TRAIT_NOCRITDAMAGE" = TRAIT_NOCRITDAMAGE,
"TRAIT_NOCRITOVERLAY" = TRAIT_NOCRITOVERLAY,
"TRAIT_NODEATH" = TRAIT_NODEATH,
"TRAIT_NODISMEMBER" = TRAIT_NODISMEMBER,
"TRAIT_NOFAT" = TRAIT_NOFAT,
"TRAIT_NOFEAR_HOLDUPS" = TRAIT_NOFEAR_HOLDUPS,
"TRAIT_NOFIRE_SPREAD" = TRAIT_NOFIRE_SPREAD,
"TRAIT_NOFIRE" = TRAIT_NOFIRE,
"TRAIT_NOFLASH" = TRAIT_NOFLASH,
"TRAIT_NOGUNS" = TRAIT_NOGUNS,
"TRAIT_NOHARDCRIT" = TRAIT_NOHARDCRIT,
"TRAIT_NOHUNGER" = TRAIT_NOHUNGER,
"TRAIT_NOLIMBDISABLE" = TRAIT_NOLIMBDISABLE,
"TRAIT_NOMOBSWAP" = TRAIT_NOMOBSWAP,
"TRAIT_NOSELFIGNITION_HEAD_ONLY" = TRAIT_NOSELFIGNITION_HEAD_ONLY,
"TRAIT_NOSOFTCRIT" = TRAIT_NOSOFTCRIT,
"TRAIT_NUKEIMMUNE" = TRAIT_NUKEIMMUNE,
"TRAIT_OIL_FRIED" = TRAIT_OIL_FRIED,
"TRAIT_ON_ELEVATED_SURFACE" = TRAIT_ON_ELEVATED_SURFACE,
"TRAIT_ORBITING_FORBIDDEN" = TRAIT_ORBITING_FORBIDDEN,
"TRAIT_OVERDOSEIMMUNE" = TRAIT_OVERDOSEIMMUNE,
"TRAIT_OVERWATCH_IMMUNE" = TRAIT_OVERWATCH_IMMUNE,
"TRAIT_OVERWATCHED" = TRAIT_OVERWATCHED,
"TRAIT_OVERWATCH_IMMUNE" = TRAIT_OVERWATCH_IMMUNE,
"TRAIT_PACIFISM" = TRAIT_PACIFISM,
"TRAIT_PARALYSIS_L_ARM" = TRAIT_PARALYSIS_L_ARM,
"TRAIT_PARALYSIS_L_LEG" = TRAIT_PARALYSIS_L_LEG,
Expand All @@ -388,9 +371,9 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_PROSOPAGNOSIA" = TRAIT_PROSOPAGNOSIA,
"TRAIT_PULL_BLOCKED" = TRAIT_PULL_BLOCKED,
"TRAIT_PUSHIMMUNE" = TRAIT_PUSHIMMUNE,
"TRAIT_QUICKER_CARRY" = TRAIT_QUICKER_CARRY,
"TRAIT_QUICK_BUILD" = TRAIT_QUICK_BUILD,
"TRAIT_QUICK_CARRY" = TRAIT_QUICK_CARRY,
"TRAIT_QUICKER_CARRY" = TRAIT_QUICKER_CARRY,
"TRAIT_RADIMMUNE" = TRAIT_RADIMMUNE,
"TRAIT_RDS_SUPPRESSED" = TRAIT_RDS_SUPPRESSED,
"TRAIT_REAGENT_SCANNER" = TRAIT_REAGENT_SCANNER,
Expand Down Expand Up @@ -484,16 +467,16 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_VATGROWN" = TRAIT_VATGROWN,
"TRAIT_VENTCRAWLER_ALWAYS" = TRAIT_VENTCRAWLER_ALWAYS,
"TRAIT_VENTCRAWLER_NUDE" = TRAIT_VENTCRAWLER_NUDE,
"TRAIT_VIRUS_RESISTANCE" = TRAIT_VIRUS_RESISTANCE,
"TRAIT_VIRUSIMMUNE" = TRAIT_VIRUSIMMUNE,
"TRAIT_VIRUS_RESISTANCE" = TRAIT_VIRUS_RESISTANCE,
"TRAIT_VORACIOUS" = TRAIT_VORACIOUS,
"TRAIT_WAS_EVOLVED" = TRAIT_WAS_EVOLVED,
"TRAIT_WEAK_SOUL" = TRAIT_WEAK_SOUL,
"TRAIT_WEB_SURFER" = TRAIT_WEB_SURFER,
"TRAIT_WEB_WEAVER" = TRAIT_WEB_WEAVER,
"TRAIT_WINE_TASTER" = TRAIT_WINE_TASTER,
"TRAIT_WING_BUFFET_TIRED" = TRAIT_WING_BUFFET_TIRED,
"TRAIT_WING_BUFFET" = TRAIT_WING_BUFFET,
"TRAIT_WING_BUFFET_TIRED" = TRAIT_WING_BUFFET_TIRED,
"TRAIT_XENO_HOST" = TRAIT_XENO_HOST,
"TRAIT_XENO_IMMUNE" = TRAIT_XENO_IMMUNE,
"TRAIT_XRAY_HEARING" = TRAIT_XRAY_HEARING,
Expand Down Expand Up @@ -533,6 +516,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
/obj/item/bodypart = list(
"TRAIT_DISABLED_BY_WOUND" = TRAIT_DISABLED_BY_WOUND,
"TRAIT_IGNORED_BY_LIVING_FLESH" = TRAIT_IGNORED_BY_LIVING_FLESH,
"TRAIT_IMMUNE_TO_CRANIAL_FISSURE" = TRAIT_IMMUNE_TO_CRANIAL_FISSURE,
),
/obj/item/bodypart = list(
"TRAIT_PARALYSIS" = TRAIT_PARALYSIS,
Expand Down
123 changes: 123 additions & 0 deletions code/datums/wounds/cranial_fissure.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
/datum/wound_pregen_data/cranial_fissure
wound_path_to_generate = /datum/wound/cranial_fissure
required_limb_biostate = BIO_BONE

required_wounding_types = list(WOUND_ALL)

wound_series = WOUND_SERIES_CRANIAL_FISSURE

threshold_minimum = 150
weight = 0 //FLUFFY FRONTIER EDIT. ORIGINAL //weight = 10

viable_zones = list(BODY_ZONE_HEAD)

/datum/wound_pregen_data/cranial_fissure/get_weight(obj/item/bodypart/limb, woundtype, damage, attack_direction, damage_source)
if (limb.owner?.stat < HARD_CRIT)
return 0

return ..()

/// A wound applied when receiving significant enough damage to the head.
/// Will allow other players to take your eyes out of your head, and slipping
/// will cause your brain to fall out of your head.
/datum/wound/cranial_fissure
name = "Cranial Fissure"
desc = "Patient's crown is agape, revealing severe damage to the skull."
treat_text = "Immediate surgical reconstruction of the skull."
examine_desc = "is split open"
occur_text = "is split into two separated chunks"

simple_desc = "Patient's skull is split open."
threshold_penalty = 40

severity = WOUND_SEVERITY_CRITICAL
sound_effect = 'sound/effects/dismember.ogg'

#define CRANIAL_FISSURE_FILTER_DISPLACEMENT "cranial_fissure_displacement"

/datum/wound/cranial_fissure/wound_injury(datum/wound/old_wound = null, attack_direction = null)
ADD_TRAIT(limb, TRAIT_IMMUNE_TO_CRANIAL_FISSURE, type)
ADD_TRAIT(victim, TRAIT_HAS_CRANIAL_FISSURE, type)

victim.add_filter(CRANIAL_FISSURE_FILTER_DISPLACEMENT, 2, displacement_map_filter(icon('icons/effects/cranial_fissure.dmi', "displacement"), size = 3))

RegisterSignal(victim, COMSIG_MOB_SLIPPED, PROC_REF(on_owner_slipped))

/datum/wound/cranial_fissure/remove_wound(ignore_limb, replaced)
REMOVE_TRAIT(limb, TRAIT_IMMUNE_TO_CRANIAL_FISSURE, type)
REMOVE_TRAIT(victim, TRAIT_HAS_CRANIAL_FISSURE, type)

victim.remove_filter(CRANIAL_FISSURE_FILTER_DISPLACEMENT)

UnregisterSignal(victim, COMSIG_MOB_SLIPPED)

return ..()

/datum/wound/cranial_fissure/proc/on_owner_slipped(mob/source)
SIGNAL_HANDLER

if (source.stat == DEAD)
return

var/obj/item/organ/internal/brain/brain = source.get_organ_by_type(/obj/item/organ/internal/brain)
if (isnull(brain))
return

brain.Remove(source)

var/turf/source_turf = get_turf(source)
brain.forceMove(source_turf)
brain.throw_at(get_step(source_turf, source.dir), 1, 1)

source.visible_message(
span_boldwarning("[source]'s brain spills right out of [source.p_their()] head!"),
span_userdanger("Your brain spills right out of your head!"),
)

/datum/wound/cranial_fissure/try_handling(mob/living/carbon/human/user)
if (user.zone_selected != BODY_ZONE_HEAD && user.zone_selected != BODY_ZONE_PRECISE_EYES)
return FALSE

if (victim.body_position != LYING_DOWN)
return FALSE

var/obj/item/organ/internal/eyes/eyes = victim.get_organ_by_type(/obj/item/organ/internal/eyes)
if (isnull(eyes))
victim.balloon_alert(user, "no eyes to take!")
return TRUE

victim.balloon_alert(user, "pulling out eyes...")
victim.show_message(
span_userdanger("[victim] starts to pull out your eyes!"),
MSG_VISUAL,
span_userdanger("An arm reaches inside your brain, and starts pulling on your eyes!"),
)

if (!do_after(user, 10 SECONDS, victim, extra_checks = CALLBACK(src, PROC_REF(still_has_eyes), eyes)))
return TRUE

eyes.Remove(victim)
user.put_in_hands(eyes)

log_combat(user, victim, "pulled out the eyes of")

user.visible_message(
span_boldwarning("You rip out [victim]'s eyes!"),
span_boldwarning("[user] rips out [victim]'s eyes!"),
ignored_mobs = victim,
)

victim.show_message(
span_userdanger("[user] rips out your eyes!"),
MSG_VISUAL,
span_userdanger("You feel an arm yank from inside your head, as you feel something very important is missing!"),
)

return TRUE

/datum/wound/cranial_fissure/proc/still_has_eyes(obj/item/organ/internal/eyes/eyes)
PRIVATE_PROC(TRUE)

return victim?.get_organ_by_type(/obj/item/organ/internal/eyes) == eyes

#undef CRANIAL_FISSURE_FILTER_DISPLACEMENT
25 changes: 25 additions & 0 deletions code/game/objects/items/chainsaw.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,38 @@
armour_penetration = 100
force_on = 30

/obj/item/chainsaw/doomslayer/attack(mob/living/target_mob, mob/living/user, params)
if (target_mob.stat != DEAD)
return ..()

if (user.zone_selected != BODY_ZONE_HEAD)
return ..()

var/obj/item/bodypart/head = target_mob.get_bodypart(BODY_ZONE_HEAD)
if (isnull(head))
return ..()

playsound(user, 'sound/weapons/slice.ogg', vol = 80, vary = TRUE)

target_mob.balloon_alert(user, "cutting off head...")
if (!do_after(user, 2 SECONDS, target_mob, extra_checks = CALLBACK(src, PROC_REF(has_same_head), target_mob, head)))
return TRUE

head.dismember(silent = FALSE)
user.put_in_hands(head)

return TRUE

/obj/item/chainsaw/doomslayer/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK, damage_type = BRUTE)
if(attack_type == PROJECTILE_ATTACK)
owner.visible_message(span_danger("Ranged attacks just make [owner] angrier!"))
playsound(src, pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg'), 75, TRUE)
return TRUE
return FALSE

/obj/item/chainsaw/doomslayer/proc/has_same_head(mob/living/target_mob, obj/item/bodypart/head)
return target_mob.get_bodypart(BODY_ZONE_HEAD) == head

/obj/item/chainsaw/mounted_chainsaw
name = "mounted chainsaw"
desc = "A chainsaw that has replaced your arm."
Expand Down
Loading

0 comments on commit a81ab62

Please sign in to comment.