Skip to content

Commit

Permalink
Remove snowflake conversion immunities (#3477)
Browse files Browse the repository at this point in the history
* guh

* yay
  • Loading branch information
RikuTheKiller authored Sep 28, 2024
1 parent 2dd0640 commit 16f2f99
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 4 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/surgery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/monkestation/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/~monkestation/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion code/modules/antagonists/brother/brother.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 ..()

Expand Down Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions code/modules/assembly/flash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
*
Expand Down
3 changes: 2 additions & 1 deletion code/modules/mob/living/carbon/carbon_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion monkestation/code/modules/assembly/flash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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 <i>directly flash them</i>, 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.")
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. = ..()
Expand Down

0 comments on commit 16f2f99

Please sign in to comment.