From 49853973e75d8d9a4d49e40dba3ebbda970c93e8 Mon Sep 17 00:00:00 2001 From: dearmochi Date: Wed, 9 Dec 2020 18:15:27 +0100 Subject: [PATCH] Buff EMPs against augments, remove duplicate external organ emp_act (buffs IPCs vs. EMPs) (#14813) * Buff EMPs against augments, remove duplicate external organ emp_act * Remove losebreath/toxloss --- code/modules/surgery/organs/organ_external.dm | 32 ++------ .../surgery/organs/subtypes/standard.dm | 74 +++++++++++++++++++ 2 files changed, 79 insertions(+), 27 deletions(-) diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index be3d00faf8e..10c47f1eae6 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -262,16 +262,14 @@ /obj/item/organ/external/emp_act(severity) if(!is_robotic() || emp_proof) return - if(tough) // Augmented limbs + if(tough) // Augmented limbs (remember they take -5 brute/-4 burn damage flat so any value below is compensated) switch(severity) if(1) - receive_damage(0, 5.5) - if(owner) - owner.Stun(10) + // 44 total burn damage with 11 augmented limbs + receive_damage(0, 8) if(2) - receive_damage(0, 2.8) - if(owner) - owner.Stun(5) + // 22 total burn damage with 11 augmented limbs + receive_damage(0, 6) else if(emp_resistant) // IPC limbs switch(severity) if(1) @@ -808,23 +806,3 @@ Note that amputating the affected organ does in fact remove the infection from t var/obj/item/organ/external/L = X for(var/obj/item/I in L.embedded_objects) return 1 - -/obj/item/organ/external/emp_act(severity) - if(!is_robotic() || emp_proof) - return - if(tough) - switch(severity) - if(1) - receive_damage(0, 5.5) - if(owner) - owner.Stun(10) - if(2) - receive_damage(0, 2.8) - if(owner) - owner.Stun(5) - else - switch(severity) - if(1) - receive_damage(0, 20) - if(2) - receive_damage(0, 7) diff --git a/code/modules/surgery/organs/subtypes/standard.dm b/code/modules/surgery/organs/subtypes/standard.dm index c736930f084..895bcbefd95 100644 --- a/code/modules/surgery/organs/subtypes/standard.dm +++ b/code/modules/surgery/organs/subtypes/standard.dm @@ -17,6 +17,17 @@ encased = "ribcage" convertable_children = list(/obj/item/organ/external/groin) +/obj/item/organ/external/chest/emp_act(severity) + ..() + if(!is_robotic() || emp_proof || !tough) // Augmented chest suffocates the user on EMP. + return + switch(severity) + if(1) + owner?.adjustStaminaLoss(20) + if(2) + owner?.adjustStaminaLoss(10) + to_chat(owner, "Your [name] malfunctions, causing fatigue!") + /obj/item/organ/external/groin name = "lower body" limb_name = "groin" @@ -43,6 +54,16 @@ can_grasp = 1 convertable_children = list(/obj/item/organ/external/hand) +/obj/item/organ/external/arm/emp_act(severity) + ..() + if(!owner || !is_robotic() || emp_proof || !tough) // Augmented arms and hands drop whatever they are holding on EMP. + return + var/hand = (body_part == ARM_LEFT) ? owner.l_hand : owner.r_hand + if(hand && owner.canUnEquip(hand)) + owner.unEquip(hand) + to_chat(owner, "Your [name] malfunctions, dropping what it was holding!") + owner.custom_emote(1, "drops what [owner.p_they()] [owner.p_were()] holding, [owner.p_their()] [name] malfunctioning!") + /obj/item/organ/external/arm/right limb_name = "r_arm" name = "right arm" @@ -65,6 +86,22 @@ can_stand = 1 convertable_children = list(/obj/item/organ/external/foot) +/obj/item/organ/external/leg/emp_act(severity) + ..() + if(!owner || !is_robotic() || emp_proof || !tough) // Augmented legs and feet make the user drop to the floor on EMP. + return + if(owner.weakened) + to_chat(owner, "Your [name] malfunctions, preventing you from getting back up!") + owner.custom_emote(1, "is unable to get back up, [owner.p_their()] [name] malfunctioning!") + else + to_chat(owner, "Your [name] malfunctions, dropping you to the ground!") + owner.custom_emote(1, "drops to the ground, [owner.p_their()] [name] malfunctioning!") + switch(severity) + if(1) + owner.AdjustWeakened(4) + if(2) + owner.AdjustWeakened(2) + /obj/item/organ/external/leg/right limb_name = "r_leg" name = "right leg" @@ -87,6 +124,22 @@ amputation_point = "left ankle" can_stand = 1 +/obj/item/organ/external/foot/emp_act(severity) + ..() + if(!owner || !is_robotic() || emp_proof || !tough) // Augmented legs and feet make the user drop to the floor on EMP. + return + if(owner.weakened) + to_chat(owner, "Your [name] malfunctions, preventing you from getting back up!") + owner.custom_emote(1, "is unable to get back up, [owner.p_their()] [name] malfunctioning!") + else + to_chat(owner, "Your [name] malfunctions, dropping you to the ground!") + owner.custom_emote(1, "drops to the ground, [owner.p_their()] [name] malfunctioning!") + switch(severity) + if(1) + owner.AdjustWeakened(4) + if(2) + owner.AdjustWeakened(2) + /obj/item/organ/external/foot/remove() if(owner && owner.shoes) owner.unEquip(owner.shoes) . = ..() @@ -112,6 +165,16 @@ amputation_point = "left wrist" can_grasp = 1 +/obj/item/organ/external/hand/emp_act(severity) + ..() + if(!owner || !is_robotic() || emp_proof || !tough) // Augmented arms and hands drop whatever they are holding on EMP. + return + var/hand = (body_part == HAND_LEFT) ? owner.l_hand : owner.r_hand + if(hand && owner.canUnEquip(hand)) + owner.unEquip(hand) + to_chat(owner, "Your [name] malfunctions, dropping what it was holding!") + owner.custom_emote(1, "drops what [owner.p_they()] [owner.p_were()] holding, [owner.p_their()] [name] malfunctioning!") + /obj/item/organ/external/hand/remove() if(owner) if(owner.gloves) @@ -210,3 +273,14 @@ /obj/item/organ/external/head/set_dna(datum/dna/new_dna) ..() new_dna.write_head_attributes(src) + +/obj/item/organ/external/head/emp_act(severity) + ..() + if(!is_robotic() || emp_proof || !tough) // Augmented head confuses the user on EMP. + return + switch(severity) + if(1) + owner?.AdjustConfused(30) + if(2) + owner?.AdjustConfused(20) + to_chat(owner, "Your [name] malfunctions, overloading your motor control!")