From 7bb99cb7bd2c938a7fada318536358a4c3ef0f36 Mon Sep 17 00:00:00 2001 From: matttheficus <57759731+matttheficus@users.noreply.github.com> Date: Fri, 14 Oct 2022 07:34:29 -0400 Subject: [PATCH] Contractor Post-Prison Injuries (#19116) * it begins * Test Number One * it works, i can now break you * fix vars * pickproc * pickproc 2 electric boogaloo * indentation is hard * slime/IPC check * spacing Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * spacing 2 electric boogaloo Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> * slime/IPC returns * oops 2 * null checks * more changes * farie review * spellcheck via lewcc * farie review * early return * today matt forgets how to do logic problems Co-authored-by: Farie82 Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: Farie82 --- .../contractor/datums/syndicate_contract.dm | 69 ++++++++++++++++--- 1 file changed, 60 insertions(+), 9 deletions(-) diff --git a/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm b/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm index 4f275719bbc..83319ed681f 100644 --- a/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm +++ b/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm @@ -3,8 +3,7 @@ #define EXTRACTION_PHASE_PREPARE 5 SECONDS #define EXTRACTION_PHASE_PORTAL 5 SECONDS #define COMPLETION_NOTIFY_DELAY 5 SECONDS -#define RETURN_BRUISE_CHANCE 50 -#define RETURN_BRUISE_DAMAGE 20 +#define RETURN_INJURY_CHANCE 85 #define RETURN_SOUVENIR_CHANCE 10 /** @@ -461,7 +460,7 @@ // Narrate their kidnapping and torturing experience. if(M.stat != DEAD) // Heal them up - gets them out of crit/soft crit. - M.reagents.add_reagent("omnizine", 20) + M.reagents.add_reagent("omnizine", 10) to_chat(M, "You feel strange...") M.Paralyse(30 SECONDS) @@ -485,6 +484,61 @@ to_chat(M, "You have been kidnapped and interrogated for valuable information! You will be sent back to the station in a few minutes...") +/** + * Default damage if no injury is possible. + * + * Arguments: + * * M - The target mob. + */ +/datum/syndicate_contract/proc/default_damage(mob/living/M) + M.adjustBruteLoss(40) + M.adjustBrainLoss(25) +/** + * Handles the target's injury/interrogation at the Syndicate Jail. + * + * Arguments: + * * M - The target mob. + */ +/datum/syndicate_contract/proc/injure_target(mob/living/M) + if(!prob(RETURN_INJURY_CHANCE) || M.health < 50) + return + + var/obj/item/organ/external/injury_target + if(prob(20)) //remove a limb + if(prob(50)) + injury_target = M.get_organ(pick(BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_FOOT, BODY_ZONE_PRECISE_L_FOOT)) + if(!injury_target) + default_damage(M) + return + injury_target.droplimb() + to_chat(M, "You were interrogated by your captors before being sent back! Oh god something's missing!") + else //fracture + if(ismachineperson(M)) + M.emp_act(EMP_HEAVY) + M.adjustBrainLoss(30) + to_chat(M, "You were interrogated by your captors before being sent back! You feel like some of your components are loose!") + + else if(isslimeperson(M)) + injury_target = M.get_organ(pick(BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_FOOT, BODY_ZONE_PRECISE_L_FOOT)) + if(!injury_target) + default_damage(M) + return + injury_target.cause_internal_bleeding() + + injury_target = M.get_organ(BODY_ZONE_CHEST) + injury_target.cause_internal_bleeding() + to_chat(M, "You were interrogated by your captors before being sent back! You feel like your inner membrane has been punctured!") + + if(prob(25)) + injury_target = M.get_organ(BODY_ZONE_CHEST) + injury_target.fracture() + else + injury_target = M.get_organ(pick(BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_R_LEG, BODY_ZONE_R_LEG)) + if(!injury_target) + default_damage(M) + return + injury_target.fracture() + /** * Handles the target's return to station. * @@ -518,14 +572,12 @@ QDEL_LIST(temp_objs) - // Chance for souvenir or bruises + // Injuries due to questioning and souvenirs + injure_target(M) if(prob(RETURN_SOUVENIR_CHANCE)) to_chat(M, "Your captors left you a souvenir for your troubles!") var/obj/item/souvenir = pick(souvenirs) new souvenir(closet) - else if(prob(RETURN_BRUISE_CHANCE) && M.health >= 50) - to_chat(M, "You were roughed up a little by your captors before being sent back!") - M.adjustBruteLoss(RETURN_BRUISE_DAMAGE) // Return them a bit confused. M.visible_message("[M] vanishes...") @@ -590,6 +642,5 @@ #undef EXTRACTION_PHASE_PREPARE #undef EXTRACTION_PHASE_PORTAL #undef COMPLETION_NOTIFY_DELAY -#undef RETURN_BRUISE_CHANCE -#undef RETURN_BRUISE_DAMAGE +#undef RETURN_INJURY_CHANCE #undef RETURN_SOUVENIR_CHANCE