From fb6d24d040be8d9e195c41737d49942be945fc76 Mon Sep 17 00:00:00 2001 From: quotefox Date: Mon, 28 Mar 2022 09:45:52 +0100 Subject: [PATCH] Pain 0.3 --- code/modules/surgery/organic_steps.dm | 4 ++-- code/modules/surgery/surgery_step.dm | 21 ++++++++++++++----- .../code/modules/mob/living/carbon/carbon.dm | 8 +++---- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/code/modules/surgery/organic_steps.dm b/code/modules/surgery/organic_steps.dm index 392244fb4..e6236b659 100644 --- a/code/modules/surgery/organic_steps.dm +++ b/code/modules/surgery/organic_steps.dm @@ -1,8 +1,8 @@ //make incision /datum/surgery_step/incise name = "make incision" - implements = list(TOOL_SCALPEL = 100, /obj/item/melee/transforming/energy/sword = 75, /obj/item/kitchen/knife = 65, - /obj/item/shard = 45, /obj/item = 30) // 30% success with any sharp item. + implements = list(TOOL_SCALPEL = 100, /obj/item/melee/transforming/energy/sword = 85, /obj/item/kitchen/knife = 75, + /obj/item/shard = 65, /obj/item = 40) // 40% success with any sharp item. (Hyper change, raised chances with basic items, because if user is awake it has a higher chance to fail) time = 16 /datum/surgery_step/incise/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) diff --git a/code/modules/surgery/surgery_step.dm b/code/modules/surgery/surgery_step.dm index 71f813a5b..671ec03b6 100644 --- a/code/modules/surgery/surgery_step.dm +++ b/code/modules/surgery/surgery_step.dm @@ -9,6 +9,7 @@ var/list/chems_needed = list() //list of chems needed to complete the step. Even on success, the step will have no effect if there aren't the chems required in the mob. var/require_all_chems = TRUE //any on the list or all on the list? var/silicons_obey_prob = FALSE + var/pain_failure = 10 //how painful it is if you fail. /datum/surgery_step/proc/try_op(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery, try_to_fail = FALSE) var/success = FALSE @@ -62,14 +63,21 @@ var/prob_chance = 100 if(implement_type) //this means it isn't a require hand or any item step. prob_chance = implements[implement_type] + prob_chance *= surgery.get_propability_multiplier() + //if human and awake + if (ishuman(target)) + var/mob/living/carbon/human/H = target + if(H.stat == 0) //victorian surgery + prob_chance = prob_chance *0.65 //deminish your chances, they are awake! + if((prob(prob_chance) || (iscyborg(user) && !silicons_obey_prob)) && chem_check(target) && !try_to_fail) if(success(user, target, target_zone, tool, surgery)) advance = TRUE else if(failure(user, target, target_zone, tool, surgery)) - advance = TRUE + advance = FALSE if(advance && !repeatable) surgery.status++ if(surgery.status > surgery.steps.len) @@ -83,15 +91,18 @@ "[user] begins to perform surgery on [target].") /datum/surgery_step/proc/success(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery) - display_results(user, target, "You succeed.", - "[user] succeeds!", + display_results(user, target, "You complete the procedure.", + "[user] completes the procedure!", "[user] finishes.") return TRUE /datum/surgery_step/proc/failure(mob/user, mob/living/target, target_zone, obj/item/tool, datum/surgery/surgery) - display_results(user, target, "You screw up!", - "[user] screws up!", + display_results(user, target, "You failed the procedure!", + "[user] failed the procedure!", "[user] finishes.", TRUE) //By default the patient will notice if the wrong thing has been cut + if (ishuman(target)) //pain on humans for messing up. + var/obj/item/bodypart/L = target.get_bodypart(target_zone) + L.pain_dam += pain_failure return FALSE /datum/surgery_step/proc/tool_check(mob/user, obj/item/tool) diff --git a/hyperstation/code/modules/mob/living/carbon/carbon.dm b/hyperstation/code/modules/mob/living/carbon/carbon.dm index 9e18e6ae2..27d4e3283 100644 --- a/hyperstation/code/modules/mob/living/carbon/carbon.dm +++ b/hyperstation/code/modules/mob/living/carbon/carbon.dm @@ -81,7 +81,7 @@ to_chat(src, "You cant handle the pain...") if(prob(20)) emote("scream") - jitteriness += 3 //shake + do_jitter_animation() //basic shake. stuttering += 3 //stutter words, your in pain bro. if (total_pain > 80) //your in trouble. fainting.. @@ -102,9 +102,9 @@ emote("scream")//scream to_chat(src, "You give into the pain...") visible_message("[src] goes into neurogenic shock!") - Unconscious(100) - if (can_heartattack())//check if they can - set_heartattack(1)//heart stopped! + Unconscious(200) + if (can_heartattack()) //check if they can + set_heartattack(1) //heart stopped! //HS Pain heal