Skip to content

Commit

Permalink
Organizes lists in surgery files, nerfs ghetto surgery a bit (#2080)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request
I'm not a big fan of people just whipping out a toolbox or whatever, and
being able to fully revive people. What's the point of medical tools
and/or ships if it's effectively fully available, to everyone?
* Removes pen from tend wounds
* Rebalances ghetto surgery success/fail
* Brain / Heart will now decay in around 45 minutes.
* Every other organ will decay in around 30 minutes.

The gist of it is this, in order of effectiveness:
* Scalpel analogue is Kitchen Knife / Sharp Things
* Retractor is Screwdriver
* Hemostat is Wirecutters
* Saw is Fireaxe, Hatchet, Sharpthings
* Cautery is Welder / Hot Things

Other than tool changes, expect the following:
* 40% surgery success chance with the above tools is baseline for most
operations.
* Failing a step will do brute damage, break a bone, or other side
effects I can come up with
* The chances can still be increased with ethanol, sterilizine, gloves,
beds, etc. (I think this is how it works)

## Why It's Good For The Game
A greater importance should be placed on having medical equipment versus
just a toolbelt. I would prefer to see all of it go but that would
require a lot more work on the medical system.
<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

## Changelog

:cl:
del: You can no longer tend wounds with a pen
balance: Ghetto surgery is less reliable across the board.
balance: Organs will now decay in ~30 minutes, heart and brain in ~45
minutes.
balance: Inducers now work for revival surgery.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
thgvr authored Jul 21, 2023
1 parent d045f93 commit 9a9d196
Show file tree
Hide file tree
Showing 38 changed files with 214 additions and 86 deletions.
6 changes: 4 additions & 2 deletions code/__DEFINES/DNA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,10 @@
//organ defines
#define STANDARD_ORGAN_THRESHOLD 100
#define STANDARD_ORGAN_HEALING 0.001
/// designed to fail organs when left to decay for ~15 minutes
#define STANDARD_ORGAN_DECAY 0.00222
//Organs fail in around ~30 minutes
#define STANDARD_ORGAN_DECAY 0.00111
//Vital organs (brain, heart) fail in around ~45 minutes
#define STANDARD_VITAL_ORGAN_DECAY 0.00074

//used for the can_chromosome var on mutations
#define CHROMOSOME_NEVER 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@

/datum/surgery_step/gland_insert
name = "insert gland"
implements = list(/obj/item/organ/heart/gland = 100)
implements = list(
/obj/item/organ/heart/gland = 100)
time = 32

/datum/surgery_step/gland_insert/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/brain/brain_item.dm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
attack_verb = list("attacked", "slapped", "whacked")

///The brain's organ variables are significantly more different than the other organs, with half the decay rate for balance reasons, and twice the maxHealth
decay_factor = STANDARD_ORGAN_DECAY / 2 //30 minutes of decaying to result in a fully damaged brain, since a fast decay rate would be unfun gameplay-wise
decay_factor = STANDARD_VITAL_ORGAN_DECAY

maxHealth = BRAIN_DAMAGE_DEATH
low_threshold = 45
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/damage_procs.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, spread_damage = FALSE, break_modifier = 1) //WS change, adds bone break mod
/mob/living/carbon/apply_damage(damage, damagetype = BRUTE, def_zone = null, blocked = FALSE, forced = FALSE, spread_damage = FALSE, break_modifier = 1)
SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMGE, damage, damagetype, def_zone)
var/hit_percent = (100-blocked)/100
if(!damage || (!forced && hit_percent <= 0))
Expand Down
7 changes: 6 additions & 1 deletion code/modules/surgery/advanced/brainwashing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@

/datum/surgery_step/brainwash
name = "brainwash"
implements = list(TOOL_HEMOSTAT = 85, TOOL_WIRECUTTER = 50, /obj/item/stack/packageWrap = 35, /obj/item/stack/cable_coil = 15)
implements = list(
TOOL_HEMOSTAT = 85,
/obj/item/soap = 60, //haha. brainwashing. get it?
TOOL_WIRECUTTER = 30,
/obj/item/stack/packageWrap = 20,
/obj/item/stack/cable_coil = 10)
time = 20 SECONDS
preop_sound = 'sound/surgery/hemostat1.ogg'
success_sound = 'sound/surgery/hemostat1.ogg'
Expand Down
8 changes: 6 additions & 2 deletions code/modules/surgery/advanced/lobotomy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@

/datum/surgery_step/lobotomize
name = "perform lobotomy"
implements = list(TOOL_SCALPEL = 85, /obj/item/melee/transforming/energy/sword = 55, /obj/item/kitchen/knife = 35,
/obj/item/shard = 25, /obj/item = 20)
implements = list(
TOOL_SCALPEL = 85, // there is no way this should be reasonable to do basically at all without a real surgery. ghetto lobotomy, for real?
/obj/item/melee/transforming/energy/sword = 25,
/obj/item/kitchen/knife = 15,
/obj/item/shard = 10,
/obj/item = 5)
time = 10 SECONDS
preop_sound = 'sound/surgery/scalpel1.ogg'
success_sound = 'sound/surgery/scalpel2.ogg'
Expand Down
4 changes: 3 additions & 1 deletion code/modules/surgery/advanced/necrotic_revival.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@

/datum/surgery_step/bionecrosis
name = "start bionecrosis"
implements = list(/obj/item/reagent_containers/syringe = 100, /obj/item/pen = 30)
implements = list(
/obj/item/reagent_containers/syringe = 100,
/obj/item/pen = 30)
time = 50
chems_needed = list(/datum/reagent/toxin/zombiepowder, /datum/reagent/medicine/rezadone)
require_all_chems = FALSE
Expand Down
5 changes: 4 additions & 1 deletion code/modules/surgery/advanced/pacification.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@

/datum/surgery_step/pacify
name = "rewire brain"
implements = list(TOOL_HEMOSTAT = 100, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15)
implements = list(
TOOL_HEMOSTAT = 100,
TOOL_SCREWDRIVER = 15, //brain surgery with a screwdriver. Ouch!
/obj/item/pen = 5)
time = 4 SECONDS
preop_sound = 'sound/surgery/hemostat1.ogg'
success_sound = 'sound/surgery/hemostat1.ogg'
Expand Down
5 changes: 4 additions & 1 deletion code/modules/surgery/advanced/viral_bonding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@

/datum/surgery_step/viral_bond
name = "viral bond"
implements = list(TOOL_CAUTERY = 100, TOOL_WELDER = 50, /obj/item = 30) // 30% success with any hot item.
implements = list(
TOOL_CAUTERY = 100,
TOOL_WELDER = 40,
/obj/item = 20) // 30% success with any hot item.
time = 100
chems_needed = list(/datum/reagent/medicine/spaceacillin,/datum/reagent/consumable/virus_food,/datum/reagent/toxin/formaldehyde)
experience_given = MEDICAL_SKILL_ADVANCED
Expand Down
9 changes: 8 additions & 1 deletion code/modules/surgery/amputation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@

/datum/surgery_step/sever_limb
name = "sever limb"
implements = list(/obj/item/shears = 300, TOOL_SCALPEL = 100, TOOL_SAW = 100, /obj/item/melee/arm_blade = 80, /obj/item/fireaxe = 50, /obj/item/hatchet = 40, /obj/item/kitchen/knife/butcher = 25)
implements = list(//this is fine, detaching limbs doesn't require precision - this is only more precise because zone targeting is randomized
/obj/item/shears = 300,
TOOL_SCALPEL = 100,
TOOL_SAW = 100,
/obj/item/melee/arm_blade = 80,
/obj/item/fireaxe = 50,
/obj/item/hatchet = 40,
/obj/item/kitchen/knife/butcher = 25)
time = 6.4 SECONDS
preop_sound = 'sound/surgery/scalpel1.ogg'
success_sound = 'sound/surgery/organ2.ogg'
Expand Down
4 changes: 3 additions & 1 deletion code/modules/surgery/bone_repair.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
/datum/surgery_step/set_bone
name = "set bone"
time = 6.4 SECONDS
implements = list(TOOL_HEMOSTAT = 100, TOOL_CROWBAR = 25, TOOL_WRENCH = 35)
implements = list(
TOOL_HEMOSTAT = 100,
TOOL_WRENCH = 40)
preop_sound = 'sound/surgery/bone1.ogg'
success_sound = 'sound/surgery/bone3.ogg'

Expand Down
5 changes: 4 additions & 1 deletion code/modules/surgery/brain_surgery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@

/datum/surgery_step/fix_brain
name = "fix brain"
implements = list(TOOL_HEMOSTAT = 85, TOOL_SCREWDRIVER = 35, /obj/item/pen = 15) //don't worry, pouring some alcohol on their open brain will get that chance to 100
implements = list(
TOOL_HEMOSTAT = 85,
TOOL_SCREWDRIVER = 40,
/obj/item/pen = 5) //don't worry, pouring some alcohol on their open brain will get that chance to 100 //will it? i don't know.
repeatable = TRUE
time = 10 SECONDS //long and complicated
preop_sound = 'sound/surgery/hemostat1.ogg'
Expand Down
3 changes: 2 additions & 1 deletion code/modules/surgery/cavity_implant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
/datum/surgery_step/handle_cavity
name = "implant item"
accept_hand = TRUE
implements = list(/obj/item = 100)
implements = list(
/obj/item = 100)
repeatable = TRUE
time = 3.2 SECONDS
preop_sound = 'sound/surgery/organ1.ogg'
Expand Down
4 changes: 3 additions & 1 deletion code/modules/surgery/core_removal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
//extract brain
/datum/surgery_step/extract_core
name = "extract core"
implements = list(TOOL_HEMOSTAT = 100, TOOL_CROWBAR = 100)
implements = list(
TOOL_HEMOSTAT = 100,
TOOL_CROWBAR = 100)
time = 16

/datum/surgery_step/extract_core/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
Expand Down
18 changes: 11 additions & 7 deletions code/modules/surgery/coronary_bypass.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@
return TRUE
return FALSE


//an incision but with greater bleed, and a 90% base success chance
/datum/surgery_step/incise_heart
name = "incise heart"
implements = list(TOOL_SCALPEL = 90, /obj/item/melee/transforming/energy/sword = 45, /obj/item/kitchen/knife = 45,
/obj/item/shard = 25)
implements = list(
TOOL_SCALPEL = 90,
/obj/item/kitchen/knife = 40,
/obj/item/shard = 33)
time = 1.6 SECONDS
preop_sound = 'sound/surgery/scalpel1.ogg'
success_sound = 'sound/surgery/scalpel2.ogg'
Expand All @@ -41,7 +42,7 @@
"<span class='notice'>Blood pools around the incision in [H]'s heart.</span>",
"")
H.bleed_rate += 10
H.adjustBruteLoss(10)
target.apply_damage(15, BRUTE, "[target_zone]")
return ..()

/datum/surgery_step/incise_heart/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
Expand All @@ -52,12 +53,15 @@
"<span class='warning'>[user] screws up, causing blood to spurt out of [H]'s chest!</span>")
H.bleed_rate += 20
H.adjustOrganLoss(ORGAN_SLOT_HEART, 10)
H.adjustBruteLoss(10)
target.apply_damage(15, BRUTE, "[target_zone]")

//grafts a coronary bypass onto the individual's heart, success chance is 90% base again
/datum/surgery_step/coronary_bypass
name = "graft coronary bypass"
implements = list(TOOL_HEMOSTAT = 90, TOOL_WIRECUTTER = 35, /obj/item/stack/packageWrap = 15, /obj/item/stack/cable_coil = 5)
implements = list(
TOOL_HEMOSTAT = 90,
TOOL_WIRECUTTER = 40,
/obj/item/stack/cable_coil = 5)
time = 9 SECONDS
preop_sound = 'sound/surgery/hemostat1.ogg'
success_sound = 'sound/surgery/hemostat1.ogg'
Expand Down Expand Up @@ -85,6 +89,6 @@
display_results(user, target, "<span class='warning'>You screw up in attaching the graft, and it tears off, tearing part of the heart!</span>",
"<span class='warning'>[user] screws up, causing blood to spurt out of [H]'s chest profusely!</span>",
"<span class='warning'>[user] screws up, causing blood to spurt out of [H]'s chest profusely!</span>")
H.adjustOrganLoss(ORGAN_SLOT_HEART, 20)
H.adjustOrganLoss(ORGAN_SLOT_HEART, 30)
H.bleed_rate += 30
return FALSE
3 changes: 2 additions & 1 deletion code/modules/surgery/dental_implant.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

/datum/surgery_step/insert_pill
name = "insert pill"
implements = list(/obj/item/reagent_containers/pill = 100)
implements = list(
/obj/item/reagent_containers/pill = 100)
time = 16
experience_given = (MEDICAL_SKILL_MEDIUM*0.4) //quick to do

Expand Down
7 changes: 6 additions & 1 deletion code/modules/surgery/experimental_dissection.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@

/datum/surgery_step/dissection
name = "dissection"
implements = list(/obj/item/scalpel/augment = 75, /obj/item/scalpel/advanced = 60, TOOL_SCALPEL = 45, /obj/item/kitchen/knife = 20, /obj/item/shard = 10)// special tools not only cut down time but also improve probability
implements = list(
/obj/item/scalpel/augment = 75,
/obj/item/scalpel/advanced = 60,
TOOL_SCALPEL = 45,
/obj/item/kitchen/knife = 30,
/obj/item/shard = 10)// special tools not only cut down time but also improve probability
time = 125
silicons_obey_prob = TRUE
repeatable = TRUE
Expand Down
4 changes: 3 additions & 1 deletion code/modules/surgery/eye_surgery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
//fix eyes
/datum/surgery_step/fix_eyes
name = "fix eyes"
implements = list(TOOL_HEMOSTAT = 100, TOOL_SCREWDRIVER = 45, /obj/item/pen = 25)
implements = list(
TOOL_HEMOSTAT = 100,
TOOL_SCREWDRIVER = 40) //ow! my eyes !
time = 64
experience_given = (MEDICAL_SKILL_ORGAN_FIX*0.6) //repeatable and can be done at any damage

Expand Down
11 changes: 7 additions & 4 deletions code/modules/surgery/gastrectomy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
//95% chance of success to be consistent with most organ-repairing surgeries.
/datum/surgery_step/gastrectomy
name = "remove lower duodenum"
implements = list(TOOL_SCALPEL = 95, /obj/item/melee/transforming/energy/sword = 65, /obj/item/kitchen/knife = 45,
/obj/item/shard = 35)
implements = list(
TOOL_SCALPEL = 95,
/obj/item/melee/transforming/energy/sword = 33,
/obj/item/kitchen/knife = 40,
/obj/item/shard = 10)
time = 52
experience_given = (MEDICAL_SKILL_ORGAN_FIX*0.8) //for consistency across organ surgeries

Expand All @@ -34,15 +37,15 @@

/datum/surgery_step/gastrectomy/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery, default_display_results = FALSE)
var/mob/living/carbon/human/H = target
H.setOrganLoss(ORGAN_SLOT_STOMACH, 20) // Stomachs have a threshold for being able to even digest food, so I might tweak this number
H.setOrganLoss(ORGAN_SLOT_STOMACH, 10) // Stomachs have a threshold for being able to even digest food, so I might tweak this number
display_results(user, target, "<span class='notice'>You successfully remove the damaged part of [target]'s stomach.</span>",
"<span class='notice'>[user] successfully removes the damaged part of [target]'s stomach.</span>",
"<span class='notice'>[user] successfully removes the damaged part of [target]'s stomach.</span>")
return ..()

/datum/surgery_step/gastrectomy/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery)
var/mob/living/carbon/human/H = target
H.adjustOrganLoss(ORGAN_SLOT_STOMACH, 15)
H.adjustOrganLoss(ORGAN_SLOT_STOMACH, 20)
display_results(user, target, "<span class='warning'>You cut the wrong part of [target]'s stomach!</span>",
"<span class='warning'>[user] cuts the wrong part of [target]'s stomach!</span>",
"<span class='warning'>[user] cuts the wrong part of [target]'s stomach!</span>")
8 changes: 3 additions & 5 deletions code/modules/surgery/healing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@

/datum/surgery_step/heal
name = "repair body"
implements = list(TOOL_HEMOSTAT = 100, TOOL_SCREWDRIVER = 65, /obj/item/pen = 55)
implements = list(
TOOL_HEMOSTAT = 100,
TOOL_SCREWDRIVER = 40)//something else could be added here - but I would prefer not. Hemostat is not that hard to come by and SHOULD be standard for ship equipment.
repeatable = TRUE
time = 2.5 SECONDS
success_sound = 'sound/surgery/retractor2.ogg'
Expand Down Expand Up @@ -172,9 +174,6 @@
missinghpbonus = 5

/***************************COMBO***************************/
/datum/surgery/healing/combo


/datum/surgery/healing/combo
name = "Tend Wounds (Mixture, Basic)"
replaced_by = /datum/surgery/healing/combo/upgraded
Expand All @@ -188,7 +187,6 @@
healing_step_type = /datum/surgery_step/heal/combo/upgraded
desc = "A surgical procedure that provides advanced treatment for a patient's burns and brute traumas. Heals more when the patient is severely injured."


/datum/surgery/healing/combo/upgraded/femto //no real reason to type it like this except consistency, don't worry you're not missing anything
name = "Tend Wounds (Mixture, Exp.)"
replaced_by = null
Expand Down
9 changes: 6 additions & 3 deletions code/modules/surgery/hepatectomy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@
//95% chance of success, not 100 because organs are delicate
/datum/surgery_step/hepatectomy
name = "remove damaged liver section"
implements = list(TOOL_SCALPEL = 95, /obj/item/melee/transforming/energy/sword = 65, /obj/item/kitchen/knife = 45,
/obj/item/shard = 35)
implements = list(
TOOL_SCALPEL = 95,
/obj/item/melee/transforming/energy/sword = 33,
/obj/item/kitchen/knife = 40,
/obj/item/shard = 25)
time = 52
experience_given = (MEDICAL_SKILL_ORGAN_FIX*0.8) //repeatable so not as much xp

Expand All @@ -41,7 +44,7 @@

/datum/surgery_step/hepatectomy/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery)
var/mob/living/carbon/human/H = target
H.adjustOrganLoss(ORGAN_SLOT_LIVER, 15)
H.adjustOrganLoss(ORGAN_SLOT_LIVER, 20)
display_results(user, target, "<span class='warning'>You cut the wrong part of [target]'s liver!</span>",
"<span class='warning'>[user] cuts the wrong part of [target]'s liver!</span>",
"<span class='warning'>[user] cuts the wrong part of [target]'s liver!</span>")
5 changes: 4 additions & 1 deletion code/modules/surgery/implant_removal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
//extract implant
/datum/surgery_step/extract_implant
name = "extract implant"
implements = list(TOOL_HEMOSTAT = 100, TOOL_CROWBAR = 65, /obj/item/kitchen/fork = 35)
implements = list(
TOOL_HEMOSTAT = 100,
TOOL_CROWBAR = 40,
/obj/item/kitchen/fork = 33)
time = 6.4 SECONDS
success_sound = 'sound/surgery/hemostat1.ogg'
experience_given = MEDICAL_SKILL_MEDIUM
Expand Down
8 changes: 6 additions & 2 deletions code/modules/surgery/ipc_revive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@
return FALSE
return isipc(target)

/datum/surgery_step/revive/ipc
/datum/surgery_step/revive/ipc //TODO: make ipcs not auto revive, to make this surgery actually do something.
name = "reboot electronics"
implements = list(/obj/item/inducer = 100, /obj/item/shockpaddles = 80, /obj/item/melee/baton = 50, /obj/item/gun/energy = 30)
implements = list(
/obj/item/inducer = 100,
/obj/item/shockpaddles = 80,
/obj/item/melee/baton = 50,
/obj/item/gun/energy = 30)
time = 60

/datum/surgery_step/revive/ipc/tool_check(mob/user, obj/item/tool)
Expand Down
7 changes: 4 additions & 3 deletions code/modules/surgery/limb_augmentation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@

/datum/surgery_step/replace_limb
name = "replace limb"
implements = list(/obj/item/bodypart = 100, /obj/item/organ_storage = 100)
implements = list(
/obj/item/bodypart = 100,
/obj/item/organ_storage = 100)
time = 32
experience_given = MEDICAL_SKILL_MEDIUM
var/obj/item/bodypart/L = null // L because "limb"
var/obj/item/bodypart/L = null // L because "limb" //i hate you


/datum/surgery_step/replace_limb/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery)
Expand All @@ -30,7 +32,6 @@
else
user.visible_message("<span class='notice'>[user] looks for [target]'s [parse_zone(user.zone_selected)].</span>", "<span class='notice'>You look for [target]'s [parse_zone(user.zone_selected)]...</span>")


//ACTUAL SURGERIES

/datum/surgery/augmentation
Expand Down
Loading

0 comments on commit 9a9d196

Please sign in to comment.