Mirrors can trap dormant revenants (#95942)

## About The Pull Request
If glimmering residue (revenant ectoplasm) is scattered in the vicinity
of a mirror, the revenant will be trapped inside it instead.
-When mirrors are cursed in this way, the reflections are shifty and
distorted, like the revenant's reflection when it's alive.
-In this state, the revenant may only communicate via telepathy with
people reflected in the mirror (it's more like "standing close to it",
but that's probably ok).
-If the mirror is broken, the revenant will reform. If it's catatonic, a
new candidate will be pulled, much like with ectoplasm reforming.
-If the mirror is destroyed in another way, the revenant will be
destroyed as well.
-There is a 1/500 chance that a mirror will be haunted roundstart
## Why It's Good For The Game
You can now torment the revenant by eternally trapping it if it really
pissed you off

## Changelog
🆑
add: you can now trap dormant revenants in mirrors
add: haunted mirrors may very rarely appear roundstart
/🆑

---------

Co-authored-by: l0 <-->
Co-authored-by: SmArtKar <44720187+SmArtKar@users.noreply.github.com>
This commit is contained in:
levels0
2026-05-24 12:10:35 +02:00
committed by GitHub
co-authored by l0 <--> SmArtKar
parent 259a28b98b
commit 7cf1670987
9 changed files with 162 additions and 61 deletions
+15 -5
View File
@@ -15,6 +15,9 @@
#define PRIDE_MIRROR_OPTIONS list(CHANGE_HAIR, CHANGE_BEARD, CHANGE_RACE, CHANGE_SEX, CHANGE_EYES)
#define MAGIC_MIRROR_OPTIONS list(CHANGE_HAIR, CHANGE_BEARD, CHANGE_RACE, CHANGE_SEX, CHANGE_EYES, CHANGE_NAME)
// Chance for the mirror to be haunted at creation
#define ROUNDSTART_CURSED_CHANCE 0.2
/obj/structure/mirror
name = "mirror"
desc = "Mirror mirror on the wall, who's the most robust of them all?"
@@ -29,7 +32,8 @@
///Can this mirror be removed from walls with tools?
var/deconstructable = TRUE
var/list/mirror_options = INERT_MIRROR_OPTIONS
// Can a revenant be imprisoned in this mirror?
var/cursable = TRUE
///Flags this race must have to be selectable with this type of mirror.
var/race_flags = MIRROR_MAGIC
///List of all Races that can be chosen, decided by its Initialize.
@@ -57,6 +61,8 @@
)
if(mapload)
find_and_mount_on_atom()
if(prob(ROUNDSTART_CURSED_CHANCE) && cursable)
AddComponent(/datum/component/revenant_prison, create_on_release = TRUE)
update_choices()
register_context()
@@ -72,10 +78,12 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror, 28)
/obj/structure/mirror/broken
icon_state = "mirror_broke"
cursable = FALSE
broken = TRUE
desc = "Oh no, seven years of bad luck!"
/obj/structure/mirror/broken/Initialize(mapload)
. = ..()
atom_break(null, mapload)
MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28)
@@ -302,13 +310,12 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28)
to_chat(unlucky_dude, span_warning("A chill runs down your spine as [src] shatters..."))
unlucky_dude.AddComponent(/datum/component/omen, incidents_left = 7)
/obj/structure/mirror/atom_break(damage_flag, mapload)
/obj/structure/mirror/atom_break(damage_flag)
. = ..()
if(broken)
return
icon_state = "mirror_broke"
if(!mapload)
playsound(src, SFX_SHATTER, 70, TRUE)
playsound(src, SFX_SHATTER, 70, TRUE)
if(desc == initial(desc))
desc = "Oh no, seven years of bad luck!"
broken = TRUE
@@ -361,6 +368,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28)
icon_state = "magic_mirror"
mirror_options = MAGIC_MIRROR_OPTIONS
deconstructable = FALSE
cursable = FALSE
/obj/structure/mirror/magic/Initialize(mapload)
. = ..()
@@ -463,3 +471,5 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/mirror/broken, 28)
#undef INERT_MIRROR_OPTIONS
#undef PRIDE_MIRROR_OPTIONS
#undef MAGIC_MIRROR_OPTIONS
#undef ROUNDSTART_CURSED_CHANCE