From 16f2f99bfeb71ecb2ff1b0fd0804d11c32681eb8 Mon Sep 17 00:00:00 2001 From: RikuTheKiller <88713943+RikuTheKiller@users.noreply.github.com> Date: Sat, 28 Sep 2024 08:04:55 +0300 Subject: [PATCH] Remove snowflake conversion immunities (#3477) * guh * yay --- code/__DEFINES/surgery.dm | 2 ++ code/__DEFINES/traits/monkestation/declarations.dm | 2 ++ code/__DEFINES/~monkestation/antagonists.dm | 6 ++++++ code/_globalvars/traits/_traits.dm | 1 + code/modules/antagonists/brother/brother.dm | 3 ++- code/modules/assembly/flash.dm | 5 +++++ code/modules/mob/living/carbon/carbon_defense.dm | 3 ++- monkestation/code/modules/assembly/flash.dm | 2 +- .../code/modules/smithing/ipcs/body/internal_organs.dm | 2 +- 9 files changed, 22 insertions(+), 4 deletions(-) diff --git a/code/__DEFINES/surgery.dm b/code/__DEFINES/surgery.dm index 2c037f3728b2..aa81976f6dd3 100644 --- a/code/__DEFINES/surgery.dm +++ b/code/__DEFINES/surgery.dm @@ -17,6 +17,8 @@ #define ORGAN_HIDDEN (1<<7) /// Synthetic organ granted by a species (for use for organ replacements between species) #define ORGAN_SYNTHETIC_FROM_SPECIES (1<<8) +/// This organ has no impact on conversion via flash, such as revs or bbs. Doesn't affect hypnosis and whatnot, though. MONKESTATION EDIT +#define ORGAN_DOESNT_PROTECT_AGAINST_CONVERSION (1<<9) // Flags for the bodypart_flags var on /obj/item/bodypart /// Bodypart cannot be dismembered or amputated diff --git a/code/__DEFINES/traits/monkestation/declarations.dm b/code/__DEFINES/traits/monkestation/declarations.dm index 2ab31d15b457..29d153abd301 100644 --- a/code/__DEFINES/traits/monkestation/declarations.dm +++ b/code/__DEFINES/traits/monkestation/declarations.dm @@ -53,6 +53,8 @@ #define TRAIT_REVIVES_BY_HEALING "trait_revives_by_healing" /// This mob is a ghost critter. #define TRAIT_GHOST_CRITTER "ghost_critter" +/// This mob is *currently* being flashed by someone with CAN_BYPASS_INNATE_FLASH_RESISTANCE returning TRUE. Used to make IPCs not immune to rev and bb conversions. +#define TRAIT_CONVERSION_FLASHED "conversion_flashed" // /datum/mind + /mob/living /// Prevents the user from casting spells using sign language. Works on both /datum/mind and /mob/living. diff --git a/code/__DEFINES/~monkestation/antagonists.dm b/code/__DEFINES/~monkestation/antagonists.dm index 81040552ec45..353559f0d41f 100644 --- a/code/__DEFINES/~monkestation/antagonists.dm +++ b/code/__DEFINES/~monkestation/antagonists.dm @@ -26,6 +26,12 @@ /// is something a worm #define iscorticalborer(A) (istype(A, /mob/living/basic/cortical_borer)) +/// Is the mob a blood brother +#define IS_BROTHER(mob) (mob?.mind?.has_antag_datum(/datum/antagonist/brother)) + +/// Whether the mob can convert others through innate flash shielding like IPCs (head revolutionaries and blood brothers) +#define CAN_BYPASS_INNATE_FLASH_RESISTANCE(mob) (IS_BROTHER(mob) || IS_HEAD_REVOLUTIONARY(mob)) + // Borer evolution defines // The three primary paths that eventually diverge #define BORER_EVOLUTION_SYMBIOTE "Symbiote" diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index c11a1b6a1cf5..99db47cf8472 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -186,6 +186,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_CLUMSY" = TRAIT_CLUMSY, "TRAIT_COAGULATING" = TRAIT_COAGULATING, "TRAIT_COLDBLOODED" = TRAIT_COLDBLOODED, + "TRAIT_CONVERSION_FLASHED" = TRAIT_CONVERSION_FLASHED, "TRAIT_CORPSELOCKED" = TRAIT_CORPSELOCKED, "TRAIT_CRITICAL_CONDITION" = TRAIT_CRITICAL_CONDITION, "TRAIT_CULT_HALO" = TRAIT_CULT_HALO, diff --git a/code/modules/antagonists/brother/brother.dm b/code/modules/antagonists/brother/brother.dm index 22991570da91..4aef0a99229f 100644 --- a/code/modules/antagonists/brother/brother.dm +++ b/code/modules/antagonists/brother/brother.dm @@ -39,6 +39,7 @@ if (!is_first_brother) to_chat(carbon_owner, span_boldwarning("The Syndicate have higher expectations from you than others. They have granted you an extra flash to convert one other person.")) + carbon_owner.balloon_alert(carbon_owner, "extra flash granted!") return ..() @@ -80,7 +81,7 @@ flashed.balloon_alert(source, "[flashed.p_theyre()] loyal to someone else!") return - if (HAS_TRAIT(flashed, TRAIT_MINDSHIELD) || HAS_MIND_TRAIT(flashed, TRAIT_UNCONVERTABLE) || (flashed.mind.assigned_role?.departments_bitflags & DEPARTMENT_BITFLAG_SECURITY)) // monkestation edit: TRAIT_UNCONVERTABLE + if (HAS_TRAIT(flashed, TRAIT_MINDSHIELD) || HAS_MIND_TRAIT(flashed, TRAIT_UNCONVERTABLE)) // monkestation edit: TRAIT_UNCONVERTABLE and remove hardcoded security check flashed.balloon_alert(source, "[flashed.p_they()] resist!") return diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index d45528c2d3ed..e80f45ae8dee 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -164,6 +164,9 @@ if(deviation == DEVIATION_FULL) return + if(CAN_BYPASS_INNATE_FLASH_RESISTANCE(user)) // MONKESTATION EDIT: Make IPCs not resistant to bb and rev conversions. + ADD_TRAIT(flashed, TRAIT_CONVERSION_FLASHED, TRAIT_GENERIC) + if(targeted) if(flashed.flash_act(1, 1)) flashed.set_confusion_if_lower(confusion_duration * CONFUSION_STACK_MAX_MULTIPLIER) @@ -185,6 +188,8 @@ if(flashed.flash_act()) flashed.set_confusion_if_lower(confusion_duration * CONFUSION_STACK_MAX_MULTIPLIER) + REMOVE_TRAIT(flashed, TRAIT_CONVERSION_FLASHED, TRAIT_GENERIC) // MONKESTATION EDIT: Make IPCs not resistant to bb and rev conversions. + /** * Handles the directionality of the attack * diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 3b21192da75d..bbd4b644412c 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -6,7 +6,8 @@ return INFINITY //For all my homies that can not see in the world var/obj/item/organ/internal/eyes/eyes = get_organ_slot(ORGAN_SLOT_EYES) if(eyes) - . += eyes.flash_protect + if(!HAS_TRAIT(src, TRAIT_CONVERSION_FLASHED) || !(eyes.organ_flags & ORGAN_DOESNT_PROTECT_AGAINST_CONVERSION)) // MONKESTATION EDIT: Make IPCs not immune to rev and bb conversions. + . += eyes.flash_protect else return INFINITY //Can't get flashed without eyes if(isclothing(head)) //Adds head protection diff --git a/monkestation/code/modules/assembly/flash.dm b/monkestation/code/modules/assembly/flash.dm index b67ade990435..273ea4cdf1e5 100644 --- a/monkestation/code/modules/assembly/flash.dm +++ b/monkestation/code/modules/assembly/flash.dm @@ -5,4 +5,4 @@ var/datum/component/can_flash_from_behind/flash_handler = user.GetComponent(/datum/component/can_flash_from_behind) if(REF(blood_bond) in flash_handler?.sources) . += span_boldnotice("In order to convert someone into your blood brother, you must directly flash them, not AoE flash!") - . += span_warning("Conversion will fail if the target is either dead, unconscious, SSD, mindshielded, a member of security, someone else's brother, or if they are targeted by your objectives.") + . += span_warning("Conversion will fail if the target is either dead, unconscious, SSD, mindshielded, someone else's brother or if they are targeted by your objectives.") diff --git a/monkestation/code/modules/smithing/ipcs/body/internal_organs.dm b/monkestation/code/modules/smithing/ipcs/body/internal_organs.dm index dad7cc42e5d3..99f34996424e 100644 --- a/monkestation/code/modules/smithing/ipcs/body/internal_organs.dm +++ b/monkestation/code/modules/smithing/ipcs/body/internal_organs.dm @@ -122,7 +122,7 @@ desc = "A very basic set of optical sensors with no extra vision modes or functions." maxHealth = 1 * STANDARD_ORGAN_THRESHOLD flash_protect = FLASH_PROTECTION_WELDER - organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES + organ_flags = ORGAN_ROBOTIC | ORGAN_SYNTHETIC_FROM_SPECIES | ORGAN_DOESNT_PROTECT_AGAINST_CONVERSION /obj/item/organ/internal/eyes/synth/emp_act(severity) . = ..()