Skip to content

Commit

Permalink
[MIRROR] Cultist shades no longer count as cultists for the purposes …
Browse files Browse the repository at this point in the history
…of invoking runes until a minute after being released [MDB IGNORE] (#2847)

* Cultist shades no longer count as cultists for the purposes of invoking runes until a minute after being released (#83487)

## About The Pull Request

The following was made in response to a discussion overheard during the
coderbus roundtable.

Cult shades can no longer contribute to cultist rune invoking until
they've been released from their soulstone from over a minute. If placed
in a shell, they can properly invoke runes and assist you with
converts/summoning as normal.

This also moves around some files/code related to cultist antag datums.
Datum stuff is now in its own subfolder of the cultist folder in the
antagonists module.


![image](https://github.com/tgstation/tgstation/assets/28870487/3d1c009a-2bdd-4b62-a040-ec964427daee)

I hated testing this.
## Why It's Good For The Game

This discourages the common practice of murdering and soulstoning
another player, then keeping them as a shade in their backpack used only
for invoking runes.

This is, of course, incredibly unfun for the player who has been shaded,
and encourages playing singleplayer cultist instead of with your
teammates as a team antagonist.

There are plenty of other ways to play singleplayer cultist. Create a
summon rune, or put your shade in a shell. Carrying them around in your
bag all round sucks.
## Changelog
:cl: Rhials
balance: cultist shades can no longer contribute to rune invocation
until they've been out of their soulstone for a minute. Put them in a
shell for God's sake!
code: sweeps up cultist antag datum code into its own subfolder.
code: cult shades now have their own antag datum.
fix: constructs now properly clear the cultist antag datum and transfer
the mind slightly earlier.
/:cl:

* Cultist shades no longer count as cultists for the purposes of invoking runes until a minute after being released

---------

Co-authored-by: Rhials <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
3 people authored and StealsThePRs committed Jun 5, 2024
1 parent 9ddb0e1 commit c415bf3
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 41 deletions.
34 changes: 34 additions & 0 deletions code/modules/antagonists/cult/cult_other.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/datum/outfit/cultist
name = "Cultist (Preview only)"

uniform = /obj/item/clothing/under/color/black
suit = /obj/item/clothing/suit/hooded/cultrobes/alt
head = /obj/item/clothing/head/hooded/cult_hoodie/alt
shoes = /obj/item/clothing/shoes/cult/alt
r_hand = /obj/item/melee/blood_magic/stun

/datum/outfit/cultist/post_equip(mob/living/carbon/human/equipped, visualsOnly)
equipped.eye_color_left = BLOODCULT_EYE
equipped.eye_color_right = BLOODCULT_EYE
equipped.update_body()

///Returns whether the given mob is convertable to the blood cult
/proc/is_convertable_to_cult(mob/living/target, datum/team/cult/specific_cult)
if(!istype(target))
return FALSE
if(isnull(target.mind) || !GET_CLIENT(target))
return FALSE
if(target.mind.unconvertable)
return FALSE
if(ishuman(target) && target.mind.holy_role)
return FALSE
if(specific_cult?.is_sacrifice_target(target.mind))
return FALSE
var/mob/living/master = target.mind.enslaved_to?.resolve()
if(master && !IS_CULTIST(master))
return FALSE
if(IS_HERETIC_OR_MONSTER(target))
return FALSE
if(HAS_TRAIT(target, TRAIT_MINDSHIELD) || issilicon(target) || isbot(target) || isdrone(target))
return FALSE //can't convert machines, shielded, or braindead
return TRUE
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -277,37 +277,6 @@

return finish_preview_icon(icon)

/datum/outfit/cultist
name = "Cultist (Preview only)"

uniform = /obj/item/clothing/under/color/black
suit = /obj/item/clothing/suit/hooded/cultrobes/alt
head = /obj/item/clothing/head/hooded/cult_hoodie/alt
shoes = /obj/item/clothing/shoes/cult/alt
r_hand = /obj/item/melee/blood_magic/stun

/datum/outfit/cultist/post_equip(mob/living/carbon/human/equipped, visualsOnly)
equipped.eye_color_left = BLOODCULT_EYE
equipped.eye_color_right = BLOODCULT_EYE
equipped.update_body()

///Returns whether the given mob is convertable to the blood cult
/proc/is_convertable_to_cult(mob/living/target, datum/team/cult/specific_cult)
if(!istype(target))
return FALSE
if(isnull(target.mind) || !GET_CLIENT(target))
return FALSE
if(target.mind.unconvertable)
return FALSE
if(ishuman(target) && target.mind.holy_role)
return FALSE
if(specific_cult?.is_sacrifice_target(target.mind))
return FALSE
var/mob/living/master = target.mind.enslaved_to?.resolve()
if(master && !IS_CULTIST(master))
return FALSE
if(IS_HERETIC_OR_MONSTER(target))
return FALSE
if(HAS_TRAIT(target, TRAIT_MINDSHIELD) || issilicon(target) || isbot(target) || isdrone(target))
return FALSE //can't convert machines, shielded, or braindead
///Used to check if the owner is counted as a secondary invoker for runes.
/datum/antagonist/cult/proc/check_invoke_validity()
return TRUE
20 changes: 20 additions & 0 deletions code/modules/antagonists/cult/datums/shade.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/datum/antagonist/cult/shade
name = "\improper Cult Shade"
show_in_antagpanel = FALSE
show_name_in_check_antagonists = TRUE
show_to_ghosts = TRUE
antagpanel_category = ANTAG_GROUP_HORRORS
///The time this player was most recently released from a soulstone.
var/release_time
///The time needed after release time to enable rune invocation.
var/invoke_delay = (1 MINUTES)

/datum/antagonist/cult/shade/check_invoke_validity()
if(isnull(release_time))
to_chat(owner.current, span_alert("You cannot invoke runes from inside of a soulstone!"))
return FALSE

if(release_time + invoke_delay > world.time)
to_chat(owner.current, span_alert("You haven't gathered enough power to invoke runes yet. You need to remain out of your soulstone for a while longer!"))
return FALSE
return TRUE
3 changes: 3 additions & 0 deletions code/modules/antagonists/cult/runes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ structure_check() searches for nearby cultist structures required for the invoca
for(var/mob/living/cultist in range(1, src))
if(!IS_CULTIST(cultist))
continue
var/datum/antagonist/cult/cultist_datum = locate(/datum/antagonist/cult) in cultist.mind.antag_datums
if(!cultist_datum.check_invoke_validity()) //We can assume there's a datum here since we can't get past the previous check otherwise.
continue
if(cultist == user)
continue
if(!cultist.can_speak(allow_mimes = TRUE))
Expand Down
16 changes: 11 additions & 5 deletions code/modules/antagonists/wizard/equipment/soulstone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
for(var/mob/shade_to_convert in contents)
if(IS_CULTIST(shade_to_convert))
continue
shade_to_convert.mind?.add_antag_datum(/datum/antagonist/cult)
shade_to_convert.mind?.add_antag_datum(/datum/antagonist/cult/shade)

RegisterSignal(src, COMSIG_BIBLE_SMACKED)
return TRUE
Expand Down Expand Up @@ -224,7 +224,9 @@
to_chat(captured_shade, span_bold("You have been released from your prison, \
but you are still bound to [user.real_name]'s will. Help [user.p_them()] succeed in \
[user.p_their()] goals at all costs."))

var/datum/antagonist/cult/shade/shade_datum = captured_shade.mind?.has_antag_datum(/datum/antagonist/cult/shade)
if(shade_datum)
shade_datum.release_time = world.time
on_release_spirits()

/obj/item/soulstone/pre_attack(atom/A, mob/living/user, params)
Expand Down Expand Up @@ -345,6 +347,10 @@
to_chat(shade, span_notice("Your soul has been captured by [src]. \
Its arcane energies are reknitting your ethereal form."))

var/datum/antagonist/cult/shade/shade_datum = shade.mind?.has_antag_datum(/datum/antagonist/cult/shade)
if(shade_datum)
shade_datum.release_time = null

if(user != shade)
to_chat(user, "[span_info("<b>Capture successful!</b>:")] [shade.real_name]'s soul \
has been captured and stored within [src].")
Expand All @@ -361,8 +367,8 @@
var/construct_class = show_radial_menu(user, src, GLOB.construct_radial_images, custom_check = CALLBACK(src, PROC_REF(check_menu), user, shell), require_near = TRUE, tooltips = TRUE)
if(QDELETED(shell) || !construct_class)
return FALSE
make_new_construct_from_class(construct_class, theme, shade, user, FALSE, shell.loc)
shade.mind?.remove_antag_datum(/datum/antagonist/cult)
make_new_construct_from_class(construct_class, theme, shade, user, FALSE, shell.loc)
qdel(shell)
qdel(src)
return TRUE
Expand Down Expand Up @@ -398,7 +404,7 @@
if(user)
soulstone_spirit.faction |= "[REF(user)]" //Add the master as a faction, allowing inter-mob cooperation
if(IS_CULTIST(user))
soulstone_spirit.mind.add_antag_datum(/datum/antagonist/cult)
soulstone_spirit.mind.add_antag_datum(/datum/antagonist/cult/shade)
SSblackbox.record_feedback("tally", "cult_shade_created", 1)

soulstone_spirit.cancel_camera()
Expand Down Expand Up @@ -428,7 +434,7 @@
// Cult shades get cult datum
if (user.mind.has_antag_datum(/datum/antagonist/cult))
shade.mind.remove_antag_datum(/datum/antagonist/shade_minion)
shade.mind.add_antag_datum(/datum/antagonist/cult)
shade.mind.add_antag_datum(/datum/antagonist/cult/shade)
return

// Only blessed soulstones can de-cult shades
Expand Down
8 changes: 5 additions & 3 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3146,21 +3146,23 @@
#include "code\modules\antagonists\clown_ops\clownop.dm"
#include "code\modules\antagonists\clown_ops\outfits.dm"
#include "code\modules\antagonists\cult\blood_magic.dm"
#include "code\modules\antagonists\cult\constructs.dm"
#include "code\modules\antagonists\cult\cult.dm"
#include "code\modules\antagonists\cult\cult_bastard_sword.dm"
#include "code\modules\antagonists\cult\cult_comms.dm"
#include "code\modules\antagonists\cult\cult_items.dm"
#include "code\modules\antagonists\cult\cult_objectives.dm"
#include "code\modules\antagonists\cult\cult_other.dm"
#include "code\modules\antagonists\cult\cult_structure_altar.dm"
#include "code\modules\antagonists\cult\cult_structure_archives.dm"
#include "code\modules\antagonists\cult\cult_structure_forge.dm"
#include "code\modules\antagonists\cult\cult_structure_pylon.dm"
#include "code\modules\antagonists\cult\cult_structures.dm"
#include "code\modules\antagonists\cult\cult_team.dm"
#include "code\modules\antagonists\cult\cult_turf_overlay.dm"
#include "code\modules\antagonists\cult\rune_spawn_action.dm"
#include "code\modules\antagonists\cult\runes.dm"
#include "code\modules\antagonists\cult\datums\constructs.dm"
#include "code\modules\antagonists\cult\datums\cult_team.dm"
#include "code\modules\antagonists\cult\datums\cultist.dm"
#include "code\modules\antagonists\cult\datums\shade.dm"
#include "code\modules\antagonists\ert\ert.dm"
#include "code\modules\antagonists\fugitive\fugitive.dm"
#include "code\modules\antagonists\fugitive\fugitive_equipment.dm"
Expand Down

0 comments on commit c415bf3

Please sign in to comment.