From 2ac3fb2b3e8dbbd73d4c2dece9eb202eb9e1f2a5 Mon Sep 17 00:00:00 2001 From: Pooble <90473506+poobsie@users.noreply.github.com> Date: Wed, 3 Dec 2025 12:38:26 -0500 Subject: [PATCH] Add two new IPC implants, an EMP resist and a Defensive implant (#30911) * add two new IPC implants * make EMP resisted IPCs take less body damage but more organ damage * oops --- code/__DEFINES/combat_defines.dm | 6 ++-- .../traders/trader_organization_spawners.dm | 2 ++ .../modules/mob/living/carbon/carbon_procs.dm | 2 +- .../mob/living/carbon/human/human_defense.dm | 2 +- .../designs/mechfabricator_designs.dm | 11 +++++++ .../surgery/organs/augments_internal.dm | 30 +++++++++++++++++++ code/modules/surgery/organs/organ_external.dm | 3 ++ code/modules/surgery/organs/organ_internal.dm | 2 ++ 8 files changed, 54 insertions(+), 4 deletions(-) diff --git a/code/__DEFINES/combat_defines.dm b/code/__DEFINES/combat_defines.dm index 2ed4f252cce..e2b09309669 100644 --- a/code/__DEFINES/combat_defines.dm +++ b/code/__DEFINES/combat_defines.dm @@ -149,8 +149,10 @@ #define EXPLODE_LIGHT 3 #define EMP_HEAVY 1 -#define EMP_LIGHT 2 -#define EMP_WEAKENED 3 +#define EMP_RESIST_ORGAN 2 +#define EMP_LIGHT 3 +#define EMP_RESIST_BODY 4 +#define EMP_WEAKENED 5 /* * converts life cycle values into deciseconds. try and avoid usage of this. diff --git a/code/game/objects/effects/spawners/random/traders/trader_organization_spawners.dm b/code/game/objects/effects/spawners/random/traders/trader_organization_spawners.dm index a97e36d8c69..6e91ea61aac 100644 --- a/code/game/objects/effects/spawners/random/traders/trader_organization_spawners.dm +++ b/code/game/objects/effects/spawners/random/traders/trader_organization_spawners.dm @@ -162,6 +162,8 @@ /obj/item/organ/internal/cyberimp/chest/ipc_repair = 5, /obj/item/organ/internal/cyberimp/chest/ipc_joints/magnetic_joints = 5, /obj/item/organ/internal/cyberimp/chest/ipc_joints/sealed = 5, + /obj/item/organ/internal/cyberimp/chest/ipc_joints/emp_shield = 5, + /obj/item/organ/internal/cyberimp/chest/ipc_joints/sealed_and_emp = 1, /obj/item/autosurgeon/organ = 1, /obj/item/flag/species/machine = 2 ) diff --git a/code/modules/mob/living/carbon/carbon_procs.dm b/code/modules/mob/living/carbon/carbon_procs.dm index 98980017b18..2aa971636a4 100644 --- a/code/modules/mob/living/carbon/carbon_procs.dm +++ b/code/modules/mob/living/carbon/carbon_procs.dm @@ -1049,7 +1049,7 @@ GLOBAL_LIST_INIT(ventcrawl_machinery, list(/obj/machinery/atmospherics/unary/ven if(HAS_TRAIT(src, TRAIT_EMP_IMMUNE)) return if(HAS_TRAIT(src, TRAIT_EMP_RESIST)) - severity = clamp(severity, EMP_LIGHT, EMP_WEAKENED) + severity = clamp(severity, EMP_RESIST_ORGAN, EMP_WEAKENED) for(var/X in internal_organs) var/obj/item/organ/internal/O = X O.emp_act(severity) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 004f6b5d1af..57521e5f1bb 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -273,7 +273,7 @@ emp_act if(HAS_TRAIT(src, TRAIT_EMP_IMMUNE)) return if(HAS_TRAIT(src, TRAIT_EMP_RESIST)) - severity = clamp(severity, EMP_LIGHT, EMP_WEAKENED) + severity = clamp(severity, EMP_RESIST_BODY, EMP_WEAKENED) for(var/X in bodyparts) var/obj/item/organ/external/L = X L.emp_act(severity) diff --git a/code/modules/research/designs/mechfabricator_designs.dm b/code/modules/research/designs/mechfabricator_designs.dm index e61c88ebb47..a7eaa85149d 100644 --- a/code/modules/research/designs/mechfabricator_designs.dm +++ b/code/modules/research/designs/mechfabricator_designs.dm @@ -1467,6 +1467,17 @@ build_path = /obj/item/organ/internal/cyberimp/chest/ipc_joints/sealed category = list("IPC Upgrades") +/datum/design/mistral_implant + name = "Electromagnetic Shielding Implant" + desc = "This implant improves the conductivity of the IPC frame, providing partial protection against EMPs." + id = "ci-mistral_implant" + req_tech = list("materials" = 5, "programming" = 5, "biotech" = 5, "engineering" = 5, "combat" = 5) + build_type = MECHFAB + construction_time = 60 + materials = list(MAT_METAL = 12500, MAT_SILVER = 12000, MAT_GOLD = 2500, MAT_PLASMA = 5000) + build_path = /obj/item/organ/internal/cyberimp/chest/ipc_joints/emp_shield + category = list("IPC Upgrades") + /datum/design/flayer_pacification name = "Mindflayer Pacification Implant" desc = "This implant acts on mindflayer swarms like smoke to bees, making them much more docile." diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 6480cafc523..f0fb814ed49 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -1019,6 +1019,36 @@ owner.physiology.stamina_mod /= 1.15 return ..() +/obj/item/organ/internal/cyberimp/chest/ipc_joints/emp_shield + name = "Electromagnetic Shielding Implant" + desc = "This implant improves the conductivity of the IPC frame, providing partial protection against EMPs." + implant_color = "#301beeff" + origin_tech = "materials=4;programming=4;biotech=4;engineering=4;combat=4;" + +/obj/item/organ/internal/cyberimp/chest/ipc_joints/emp_shield/insert(mob/living/carbon/M, special = FALSE) + ..() + ADD_TRAIT(M, TRAIT_EMP_RESIST, "ipc[UID()]") + +/obj/item/organ/internal/cyberimp/chest/ipc_joints/emp_shield/remove(mob/living/carbon/M, special = FALSE) + REMOVE_TRAIT(M, TRAIT_EMP_RESIST, "ipc[UID()]") + return ..() + +/obj/item/organ/internal/cyberimp/chest/ipc_joints/sealed_and_emp + name = "Experimental Defensive Implant" + desc = "This implant deploys experimental nanobots into the IPC chassis to harden joints and provide partial protection against EMPs." + implant_color = "#065513ff" + origin_tech = "materials=5;programming=5;biotech=5;engineering=5;combat=5;" + +/obj/item/organ/internal/cyberimp/chest/ipc_joints/sealed_and_emp/insert(mob/living/carbon/M, special = FALSE) + ..() + ADD_TRAIT(M, TRAIT_IPC_JOINTS_SEALED, "ipc_joint[UID()]") + ADD_TRAIT(M, TRAIT_EMP_RESIST, "ipc_joint[UID()]") + +/obj/item/organ/internal/cyberimp/chest/ipc_joints/sealed_and_emp/remove(mob/living/carbon/M, special = FALSE) + REMOVE_TRAIT(M, TRAIT_IPC_JOINTS_SEALED, "ipc_joint[UID()]") + REMOVE_TRAIT(M, TRAIT_EMP_RESIST, "ipc_joint[UID()]") + return ..() + /obj/item/organ/internal/cyberimp/chest/ipc_joints/flayer_pacification name = "\improper Nanite pacifier" desc = "This implant acts on mindflayer nanobots like smoke does to bees, rendering them significantly more docile." diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index cdbffc11e3c..478dc9fc6b1 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -376,6 +376,9 @@ if(EMP_LIGHT) // 3.63 burn damage, 39.93 damage with 11 limbs. receive_damage(0, 3.63) + if(EMP_RESIST_BODY) + // 1.9 burn damage, 20.9 damage with 11 limbs. + receive_damage(0, 1.9) if(EMP_WEAKENED) // 1.32 (2 * .66 burn mod) burn damage, 14.52 damage with 11 limbs. receive_damage(0, 2) diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index e24d5bf3a58..8927a703789 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -178,6 +178,8 @@ switch(severity) if(EMP_HEAVY) receive_damage(20, 1) + if(EMP_RESIST_ORGAN) + receive_damage(12, 1) if(EMP_LIGHT) receive_damage(7, 1) if(EMP_WEAKENED)