Skip to content

Commit

Permalink
Surgery speed rebalance and changes (#4563)
Browse files Browse the repository at this point in the history
* Update surgery_step.dm

* :3

* Update code/modules/surgery/surgery_step.dm

---------

Co-authored-by: Bloop <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Nov 6, 2024
1 parent 813524c commit 19c9a80
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions code/modules/surgery/surgery_step.dm
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@

return FALSE

#define SURGERY_SPEEDUP_AREA 0.5 // NOVA EDIT Addition - reward for doing surgery in surgery
#define SURGERY_SLOWDOWN_CAP_MULTIPLIER 2.5 //increase to make surgery slower but fail less, and decrease to make surgery faster but fail more
///Modifier given to surgery speed for dissected bodies.
#define SURGERY_SPEED_DISSECTION_MODIFIER 0.8
///Modifier given to users with TRAIT_MORBID on certain surgeries
#define SURGERY_SPEED_MORBID_CURIOSITY 0.7
///Modifier given to patients with TRAIT_ANALGESIA
#define SURGERY_SPEED_TRAIT_ANALGESIA 0.8
#define SURGERY_SPEED_CALM_ENVIRONMENT 0.8 // NOVA EDIT ADDITION - Modifier given to surgery when done in calm areas (no other humans around)

/datum/surgery_step/proc/initiate(mob/living/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE)
// Only followers of Asclepius have the ability to use Healing Touch and perform miracle feats of surgery.
Expand Down Expand Up @@ -122,6 +122,7 @@

if(HAS_TRAIT(target, TRAIT_ANALGESIA))
speed_mod *= SURGERY_SPEED_TRAIT_ANALGESIA
to_chat(user, span_notice("You are able to work faster due to the patient's calm attitude!")) // NOVA EDIT ADDITION - Better feedback for the use of analgesia

// FLUFFY FRONTIER EDIT START. ADDITION - Stasis surgery nerf
if(HAS_TRAIT (target, TRAIT_STASIS))
Expand All @@ -146,17 +147,14 @@

var/was_sleeping = (target.stat != DEAD && target.IsSleeping())

// NOVA EDIT ADDITION START - reward for doing surgery on calm patients, and for using surgery rooms(ie. surgerying alone)
if(was_sleeping || HAS_TRAIT(target, TRAIT_ANALGESIA) || target.stat == DEAD)
modded_time *= SURGERY_SPEEDUP_AREA
to_chat(user, span_notice("You are able to work faster due to the patient's calm attitude!"))
var/quiet_enviromnent = TRUE
// NOVA EDIT ADDITION START - reward for doing surgery on a calm environment (no other humans around)
var/quiet_environment = TRUE
for(var/mob/living/carbon/human/loud_people in view(3, target))
if(loud_people != user && loud_people != target)
quiet_enviromnent = FALSE
quiet_environment = FALSE
break
if(quiet_enviromnent)
modded_time *= SURGERY_SPEEDUP_AREA
if(quiet_environment)
modded_time *= SURGERY_SPEED_CALM_ENVIRONMENT
to_chat(user, span_notice("You are able to work faster due to the quiet environment!"))
// NOVA EDIT ADDITION END
if(do_after(user, modded_time, target = target, interaction_key = user.has_status_effect(/datum/status_effect/hippocratic_oath) ? target : DOAFTER_SOURCE_SURGERY)) //If we have the hippocratic oath, we can perform one surgery on each target, otherwise we can only do one surgery in total.
Expand Down Expand Up @@ -184,7 +182,7 @@

surgery.step_in_progress = FALSE
return advance
#undef SURGERY_SPEEDUP_AREA // NOVA EDIT ADDITION
#undef SURGERY_SPEED_CALM_ENVIRONMENT // NOVA EDIT ADDITION

/**
* Handles updating the mob's mood depending on the surgery states.
Expand Down

0 comments on commit 19c9a80

Please sign in to comment.