Files
Bubberstation/code/modules/events/scrubber_overflow.dm
T
JacquerelandGitHub 728a0f1b91 Grand Ritual: Alternate Wizard objective (Wizard Events II) (#72918)
Adds an alternate greentext objective for Wizards known as the "Grand
Ritual". This was initially the gimmick of a different wizard-related
antagonist downstream. I didn't get permission to port it, so I'm
attaching it to regular Wizards instead.

Wizards will spawn in with a new Grand Ritual button next to their
antagonist info button. Pressing it will pinpoint them towards their
next Ritual Location (a randomly chosen region of the space station).
Once within that location, pressing it will summon a magic circle and
obliterate any dense objects which are in the way. This also puts the
ability on a two minute cooldown.
Clicking on the magic circle with an empty hand will begin a three-stage
invocation to gather magical power. You can interrupt this invocation at
any time and will resume from the last stage you completed (if you
finished two stages you only need to do one more).
Once you complete a ritual, a random event will be triggered based on
how many rituals you have performed so far. These tend to be ones which
annoy the crew in some manner, and Wizard Events are included in the
list. Additionally, something weird will usually happen to the room you
are in.
Then you are assigned a new location and can toddle off to do it again.

Once you have done this three times, you will be picked up by the
station's sensors every time you start a subsequent ritual and should
expect annoyed company to come investigate.
Once you have done this six times, you can finally spend all of that
accumulated power on the seventh Grand Finale ritual. Completing this
grants you victory at the end of the round and will have a larger,
flashier effect which you can pick from a list of options, think of it
like a wizard equivalent of a Traitor Final Objective or Heretic
Ascension.
After that you can still keep doing rituals if you want to pester the
crew further by summoning more random events, you've already "won" at
this point so now it's your job to make them want to go home.

I think it'd be more fun to just find out what the Finale ritual can do
by seeing it happen but maintainers will probably want a list of its
precise capabilities, so here it is:

Currently completing a ritual also has a chance to create Heretic
Reality Tears (of both varieties, available for Heretics to eat and
visible to crew) as a kind of cross-antagonist interaction which seemed
to make sense to me but if this seems thematically or mechanically
inappropriate it's easy to strip out.
2023-02-12 14:27:05 -06:00

179 lines
6.5 KiB
Plaintext

/datum/round_event_control/scrubber_overflow
name = "Scrubber Overflow: Normal"
typepath = /datum/round_event/scrubber_overflow
weight = 10
max_occurrences = 3
min_players = 10
category = EVENT_CATEGORY_JANITORIAL
description = "The scrubbers release a tide of mostly harmless froth."
admin_setup = /datum/event_admin_setup/listed_options/scrubber_overflow
/datum/round_event/scrubber_overflow
announce_when = 1
start_when = 5
/// The probability that the ejected reagents will be dangerous
var/danger_chance = 1
/// Amount of reagents ejected from each scrubber
var/reagents_amount = 50
/// Probability of an individual scrubber overflowing
var/overflow_probability = 50
/// Specific reagent to force all scrubbers to use, null for random reagent choice
var/datum/reagent/forced_reagent_type
/// A list of scrubbers that will have reagents ejected from them
var/list/scrubbers = list()
/// The list of chems that scrubbers can produce
var/list/safer_chems = list(/datum/reagent/water,
/datum/reagent/carbon,
/datum/reagent/consumable/flour,
/datum/reagent/space_cleaner,
/datum/reagent/carpet/royal/blue,
/datum/reagent/carpet/orange,
/datum/reagent/consumable/nutriment,
/datum/reagent/consumable/condensedcapsaicin,
/datum/reagent/drug/mushroomhallucinogen,
/datum/reagent/lube,
/datum/reagent/glitter/blue,
/datum/reagent/glitter/pink,
/datum/reagent/cryptobiolin,
/datum/reagent/blood,
/datum/reagent/medicine/c2/multiver,
/datum/reagent/water/holywater,
/datum/reagent/consumable/ethanol,
/datum/reagent/consumable/hot_coco,
/datum/reagent/consumable/yoghurt,
/datum/reagent/consumable/tinlux,
/datum/reagent/hydrogen_peroxide,
/datum/reagent/bluespace,
/datum/reagent/pax,
/datum/reagent/consumable/laughter,
/datum/reagent/concentrated_barbers_aid,
/datum/reagent/baldium,
/datum/reagent/colorful_reagent,
/datum/reagent/consumable/salt,
/datum/reagent/consumable/ethanol/beer,
/datum/reagent/hair_dye,
/datum/reagent/consumable/sugar,
/datum/reagent/glitter/white,
/datum/reagent/gravitum,
/datum/reagent/growthserum,
/datum/reagent/yuck,
)
//needs to be chemid unit checked at some point
/datum/round_event/scrubber_overflow/announce_deadchat(random)
if(!forced_reagent_type)
//nothing out of the ordinary, so default announcement
return ..()
deadchat_broadcast(" has just been[random ? " randomly" : ""] triggered!", "<b>Scrubber Overflow: [initial(forced_reagent_type.name)]</b>", message_type=DEADCHAT_ANNOUNCEMENT)
/datum/round_event/scrubber_overflow/announce(fake)
priority_announce("The scrubbers network is experiencing a backpressure surge. Some ejection of contents may occur.", "Atmospherics alert")
/datum/round_event/scrubber_overflow/setup()
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent in GLOB.machines)
var/turf/scrubber_turf = get_turf(temp_vent)
if(!scrubber_turf)
continue
if(!is_station_level(scrubber_turf.z))
continue
if(temp_vent.welded)
continue
if(!prob(overflow_probability))
continue
scrubbers += temp_vent
if(!scrubbers.len)
return kill()
/datum/round_event_control/scrubber_overflow/can_spawn_event(players_amt, allow_magic = FALSE)
. = ..()
if(!.)
return
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/temp_vent in GLOB.machines)
var/turf/scrubber_turf = get_turf(temp_vent)
if(!scrubber_turf)
continue
if(!is_station_level(scrubber_turf.z))
continue
if(temp_vent.welded)
continue
return TRUE //there's at least one. we'll let the codergods handle the rest with prob() i guess.
return FALSE
/// proc that will run the prob check of the event and return a safe or dangerous reagent based off of that.
/datum/round_event/scrubber_overflow/proc/get_overflowing_reagent(dangerous)
return dangerous ? get_random_reagent_id() : pick(safer_chems)
/datum/round_event/scrubber_overflow/start()
for(var/obj/machinery/atmospherics/components/unary/vent_scrubber/vent as anything in scrubbers)
if(!vent.loc)
CRASH("SCRUBBER SURGE: [vent] has no loc somehow?")
var/datum/reagents/dispensed_reagent = new /datum/reagents(reagents_amount)
dispensed_reagent.my_atom = vent
if (forced_reagent_type)
dispensed_reagent.add_reagent(forced_reagent_type, reagents_amount)
else if (prob(danger_chance))
dispensed_reagent.add_reagent(get_overflowing_reagent(dangerous = TRUE), reagents_amount)
new /mob/living/basic/cockroach(get_turf(vent))
new /mob/living/basic/cockroach(get_turf(vent))
else
dispensed_reagent.add_reagent(get_overflowing_reagent(dangerous = FALSE), reagents_amount)
dispensed_reagent.create_foam(/datum/effect_system/fluid_spread/foam/short, reagents_amount)
CHECK_TICK
/datum/round_event_control/scrubber_overflow/threatening
name = "Scrubber Overflow: Threatening"
typepath = /datum/round_event/scrubber_overflow/threatening
weight = 4
min_players = 25
max_occurrences = 1
earliest_start = 35 MINUTES
description = "The scrubbers release a tide of moderately harmless froth."
min_wizard_trigger_potency = 0
max_wizard_trigger_potency = 4
/datum/round_event/scrubber_overflow/threatening
danger_chance = 10
reagents_amount = 100
/datum/round_event_control/scrubber_overflow/catastrophic
name = "Scrubber Overflow: Catastrophic"
typepath = /datum/round_event/scrubber_overflow/catastrophic
weight = 2
min_players = 35
max_occurrences = 1
earliest_start = 45 MINUTES
description = "The scrubbers release a tide of mildly harmless froth."
min_wizard_trigger_potency = 3
max_wizard_trigger_potency = 6
/datum/round_event/scrubber_overflow/catastrophic
danger_chance = 30
reagents_amount = 150
/datum/round_event_control/scrubber_overflow/every_vent
name = "Scrubber Overflow: Every Vent"
typepath = /datum/round_event/scrubber_overflow/every_vent
weight = 0
max_occurrences = 0
description = "The scrubbers release a tide of mostly harmless froth, but every scrubber is affected."
/datum/round_event/scrubber_overflow/every_vent
overflow_probability = 100
reagents_amount = 100
/datum/event_admin_setup/listed_options/scrubber_overflow
normal_run_option = "Random Reagents"
special_run_option = "Random Single Reagent"
/datum/event_admin_setup/listed_options/scrubber_overflow/get_list()
return sort_list(subtypesof(/datum/reagent), /proc/cmp_typepaths_asc)
/datum/event_admin_setup/listed_options/scrubber_overflow/apply_to_event(datum/round_event/scrubber_overflow/event)
if(chosen == special_run_option)
chosen = event.get_overflowing_reagent(dangerous = prob(event.danger_chance))
event.forced_reagent_type = chosen