[MIRROR] Adds the Ectoplasmic Outburst, a rare ghost-centric anomaly event [MDB IGNORE] (#19292)

* Adds the Ectoplasmic Outburst, a rare ghost-centric anomaly event (#73024)

## About The Pull Request

This PR description might be a bit rushed because I accidentally
submitted the PR and want to bang out a quick explanation of what this
is before people start asking questions.

Adds a new, rare, ghost-themed anomaly event -- The Ectoplasmic
Outburst.

![Animation](https://user-images.githubusercontent.com/28870487/215292488-cc5ce589-39be-490d-bd80-92a2ed6e948b.gif)

This event increases in power as more ghosts orbit it, with three
important thresholds to meet.

If 10% or more of all active observers are orbiting the anomaly, an
effect will occur in the nearby area akin to the revenant's defile
spell, damaging flooring, windows, and making a mess.

If 35% or more are orbiting the anomaly, nearby objects in the effect
radius have a chance to become haunted, and will fling themselves at
anyone nearby for a bit. Spooky!

Now, at 50% or more participation, things get serious. Ghosts orbiting
the anomaly will be polled to be brought back into the world for a brief
period as a vengeful spirit, anchored to a SUPER spooky ghost portal.
The portal closes after two minutes (alternatively, smash it with a
toolbox) and deletes all of the ghosts it spawned. Vengeful spirits are
mostly just meant to smash stuff and be a nuisance while they can. It's
a wonderful opportunity to let deadchat desalinate a little.

![spooky
ghosts](https://user-images.githubusercontent.com/28870487/215293550-f7bbede2-cfa0-49b1-87fe-f38ee45d1df8.gif)

Oh, also, the anomaly is deadchat controlled. With enough ghosts, you
could theoretically outrun anyone trying to neutralize it!

The associated reactive armor has an effect similar to the anomaly,
haunting nearby objects for a time when the wearer is struck. Not
particularly outstanding, but it can introduce an element of chaos into
a fight that your opponent might not expect.

## Why It's Good For The Game

Anomaly events are great for ghosts. Why not make one tailored just for
them!

Gives admins something to spawn when a wizard has killed half of the
crew but it's not quiiiite time for an ERT.

It's a bit of a silly event with a novelty reward, but I think it's rare
enough not to be a huge issue.

## Changelog

🆑 Rhials
add: Ectoplasmic Outburst anomaly event
add: Reactive Ectoplasm Armor
/🆑

* Adds the Ectoplasmic Outburst, a rare ghost-centric anomaly event

---------

Co-authored-by: Rhials <Datguy33456@gmail.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-02-12 16:44:26 -08:00
committed by GitHub
co-authored by Rhials lessthanthree
parent 63280c408d
commit 668bbcac4a
10 changed files with 363 additions and 0 deletions
@@ -0,0 +1,76 @@
#define ANOMALY_INTENSITY_MINOR "Minor Intensity"
#define ANOMALY_INTENSITY_MODERATE "Moderate Intensity"
#define ANOMALY_INTENSITY_MAJOR "Major Intensity"
/datum/round_event_control/anomaly/anomaly_ectoplasm
name = "Anomaly: Ectoplasmic Outburst"
description = "Anomaly that produces an effect of varying intensity based on how many ghosts are orbiting it."
typepath = /datum/round_event/anomaly/anomaly_ectoplasm
min_players = 30
max_occurrences = 2
weight = 4 //Rare because of it's wacky and silly nature
category = EVENT_CATEGORY_ANOMALIES
admin_setup = /datum/event_admin_setup/anomaly/anomaly_ectoplasm
/datum/round_event/anomaly/anomaly_ectoplasm
anomaly_path = /obj/effect/anomaly/ectoplasm
start_when = 3
announce_when = 20
///The admin-set impact effect intensity override
var/effect_override
///The admin-set number of ghosts, for use in calculating impact size.
var/orbit_override
/datum/round_event/anomaly/anomaly_ectoplasm/start()
if(!effect_override || !orbit_override)
return ..() //If we provide no override, just run the usual startup.
var/turf/anomaly_turf = placer.findValidTurf(impact_area)
var/obj/effect/anomaly/ectoplasm/newAnomaly
if(anomaly_turf)
newAnomaly = new anomaly_path(anomaly_turf)
newAnomaly.override_ghosts = TRUE
newAnomaly.effect_power = effect_override
newAnomaly.ghosts_orbiting = orbit_override
newAnomaly.intensity_update()
if(newAnomaly)
announce_to_ghosts(newAnomaly)
/datum/round_event/anomaly/anomaly_ectoplasm/announce(fake)
priority_announce("Localized ectoplasmic outburst detected on long range scanners. Expected location of impact: [impact_area.name].", "Anomaly Alert")
/datum/event_admin_setup/anomaly/anomaly_ectoplasm
///The admin-selected intensity
var/chosen_effect
///The number of ghosts the admin has selected to simulate orbiting the anomaly.
var/ghost_override
/datum/event_admin_setup/anomaly/anomaly_ectoplasm/prompt_admins()
. = ..()
if(tgui_alert(usr, "Override the anomaly effect and power?", "You'll be ruining the authenticity.", list("Yes", "No")) == "Yes")
var/list/power_values = list(ANOMALY_INTENSITY_MINOR, ANOMALY_INTENSITY_MODERATE, ANOMALY_INTENSITY_MAJOR)
chosen_effect = tgui_input_list(usr, "Provide effect override", "Criiiiinge.", power_values)
if(!chosen_effect)
return ADMIN_CANCEL_EVENT
ghost_override = tgui_input_number(usr, "How many ghosts do you want simulate orbiting your anomaly? (determines the effect radius).", "Seriously, CRINGE.", 0, 20, 1)
if(!ghost_override)
return ADMIN_CANCEL_EVENT
switch(chosen_effect) //Converts the text choice into a number for the anomaly to use
if(ANOMALY_INTENSITY_MINOR)
chosen_effect = 10
if(ANOMALY_INTENSITY_MODERATE)
chosen_effect = 35
if(ANOMALY_INTENSITY_MAJOR)
chosen_effect = 50
/datum/event_admin_setup/anomaly/anomaly_ectoplasm/apply_to_event(datum/round_event/anomaly/anomaly_ectoplasm/event)
. = ..()
event.effect_override = chosen_effect
event.orbit_override = ghost_override
#undef ANOMALY_INTENSITY_MINOR
#undef ANOMALY_INTENSITY_MODERATE
#undef ANOMALY_INTENSITY_MAJOR