diff --git a/code/__DEFINES/cinematics.dm b/code/__DEFINES/cinematics.dm
index 6d85c45f1bc..f994dc82a4b 100644
--- a/code/__DEFINES/cinematics.dm
+++ b/code/__DEFINES/cinematics.dm
@@ -11,3 +11,4 @@
#define CINEMATIC_NUKE_FAR 11
#define CINEMATIC_NUKE_CLOWNOP 12
#define CINEMATIC_CULT_NUKE 13
+#define CINEMATIC_CULT_FAIL 14
diff --git a/code/datums/cinematic.dm b/code/datums/cinematic.dm
index ed1b7d670ff..e26f8fba2cf 100644
--- a/code/datums/cinematic.dm
+++ b/code/datums/cinematic.dm
@@ -203,6 +203,20 @@
special()
screen.icon_state = "summary_cult"
+/datum/cinematic/cult_fail
+ id = CINEMATIC_CULT_FAIL
+
+/datum/cinematic/cult_fail/content()
+ screen.icon_state = "station_intact"
+ sleep(20)
+ cinematic_sound(sound('sound/creatures/narsie_rises.ogg'))
+ sleep(60)
+ cinematic_sound(sound('sound/effects/explosion_distant.ogg'))
+ sleep(10)
+ cinematic_sound(sound('sound/magic/demon_dies.ogg'))
+ sleep(30)
+ special()
+
/datum/cinematic/nuke_annihilation
id = CINEMATIC_ANNIHILATION
diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm
index f569bbfe09c..26483160071 100644
--- a/code/modules/antagonists/cult/cult.dm
+++ b/code/modules/antagonists/cult/cult.dm
@@ -1,4 +1,7 @@
#define SUMMON_POSSIBILITIES 3
+#define CULT_VICTORY 1
+#define CULT_LOSS 0
+#define CULT_NARSIE_KILLED -1
/datum/antagonist/cult
name = "Cultist"
@@ -351,6 +354,7 @@
/datum/objective/eldergod
var/summoned = FALSE
+ var/killed = FALSE
var/list/summon_spots = list()
/datum/objective/eldergod/New()
@@ -367,18 +371,25 @@
explanation_text = "Summon Nar'Sie by invoking the rune 'Summon Nar'Sie'. The summoning can only be accomplished in [english_list(summon_spots)] - where the veil is weak enough for the ritual to begin."
/datum/objective/eldergod/check_completion()
+ if(killed)
+ return CULT_NARSIE_KILLED // You failed so hard that even the code went backwards.
return summoned || completed
/datum/team/cult/proc/check_cult_victory()
for(var/datum/objective/O in objectives)
- if(!O.check_completion())
- return FALSE
- return TRUE
+ if(O.check_completion() == CULT_NARSIE_KILLED)
+ return CULT_NARSIE_KILLED
+ else if(!O.check_completion())
+ return CULT_LOSS
+ return CULT_VICTORY
/datum/team/cult/roundend_report()
var/list/parts = list()
+ var/victory = check_cult_victory()
- if(check_cult_victory())
+ if(victory == CULT_NARSIE_KILLED) // Epic failure, you summoned your god and then someone killed it.
+ parts += "Nar'sie has been killed! The cult will haunt the universe no longer!"
+ else if(victory)
parts += "The cult has succeeded! Nar'Sie has snuffed out another torch in the void!"
else
parts += "The staff managed to stop the cult! Dark words and heresy are no match for Nanotrasen's finest!"
diff --git a/code/modules/power/singularity/narsie.dm b/code/modules/power/singularity/narsie.dm
index 8de860dd0fe..2a4cd291ed7 100644
--- a/code/modules/power/singularity/narsie.dm
+++ b/code/modules/power/singularity/narsie.dm
@@ -66,34 +66,68 @@
if(player.stat != DEAD && player.loc && is_station_level(player.loc.z) && !iscultist(player) && !isanimal(player))
souls_needed[player] = TRUE
soul_goal = round(1 + LAZYLEN(souls_needed) * 0.75)
- INVOKE_ASYNC(src, .proc/begin_the_end)
+ INVOKE_ASYNC(GLOBAL_PROC, .proc/begin_the_end)
-/obj/singularity/narsie/large/cult/proc/begin_the_end()
+/proc/begin_the_end()
sleep(50)
+ if(QDELETED(GLOB.cult_narsie)) // uno
+ priority_announce("Status report? We detected a anomaly, but it disappeared almost immediately.","Central Command Higher Dimensional Affairs", 'sound/misc/notice1.ogg')
+ GLOB.cult_narsie = null
+ sleep(20)
+ INVOKE_ASYNC(GLOBAL_PROC, .proc/cult_ending_helper, 2)
+ return
priority_announce("An acausal dimensional event has been detected in your sector. Event has been flagged EXTINCTION-CLASS. Directing all available assets toward simulating solutions. SOLUTION ETA: 60 SECONDS.","Central Command Higher Dimensional Affairs", 'sound/misc/airraid.ogg')
sleep(500)
+ if(QDELETED(GLOB.cult_narsie)) // dos
+ priority_announce("Simulations aborted, sensors report that the acasual event is normalizing. Good work, crew.","Central Command Higher Dimensional Affairs", 'sound/misc/notice1.ogg')
+ GLOB.cult_narsie = null
+ sleep(20)
+ INVOKE_ASYNC(GLOBAL_PROC, .proc/cult_ending_helper, 2)
+ return
priority_announce("Simulations on acausal dimensional event complete. Deploying solution package now. Deployment ETA: ONE MINUTE. ","Central Command Higher Dimensional Affairs")
sleep(50)
set_security_level("delta")
- SSshuttle.registerHostileEnvironment(src)
+ SSshuttle.registerHostileEnvironment(GLOB.cult_narsie)
SSshuttle.lockdown = TRUE
sleep(600)
- if(resolved == FALSE)
- resolved = TRUE
+ if(QDELETED(GLOB.cult_narsie)) // tres
+ priority_announce("Normalization detected! Abort the solution package!","Central Command Higher Dimensional Affairs", 'sound/misc/notice1.ogg')
+ GLOB.cult_narsie = null
+ sleep(20)
+ set_security_level("red")
+ SSshuttle.clearHostileEnvironment()
+ SSshuttle.lockdown = FALSE
+ INVOKE_ASYNC(GLOBAL_PROC, .proc/cult_ending_helper, 2)
+ return
+ if(GLOB.cult_narsie.resolved == FALSE)
+ GLOB.cult_narsie.resolved = TRUE
sound_to_playing_players('sound/machines/alarm.ogg')
addtimer(CALLBACK(GLOBAL_PROC, .proc/cult_ending_helper), 120)
/obj/singularity/narsie/large/cult/Destroy()
- GLOB.cult_narsie = null
+ send_to_playing_players("\"[pick("Nooooo...", "Not die. How-", "Die. Mort-", "Sas tyen re-")]\"")
+ sound_to_playing_players('sound/magic/demon_dies.ogg', 50)
+ var/list/all_cults = list()
+ for(var/datum/antagonist/cult/C in GLOB.antagonists)
+ if(!C.owner)
+ continue
+ all_cults |= C.cult_team
+ for(var/datum/team/cult/T in all_cults)
+ var/datum/objective/eldergod/summon_objective = locate() in T.objectives
+ if(summon_objective)
+ summon_objective.summoned = FALSE
+ summon_objective.killed = TRUE
return ..()
/proc/ending_helper()
SSticker.force_ending = 1
-/proc/cult_ending_helper(var/no_explosion = 0)
- if(no_explosion)
+/proc/cult_ending_helper(var/ending_type = 0)
+ if(ending_type == 2) //narsie fukkin died
+ Cinematic(CINEMATIC_CULT_FAIL,world,CALLBACK(GLOBAL_PROC,/proc/ending_helper))
+ else if(ending_type) //no explosion
Cinematic(CINEMATIC_CULT,world,CALLBACK(GLOBAL_PROC,/proc/ending_helper))
- else
+ else // explosion
Cinematic(CINEMATIC_CULT_NUKE,world,CALLBACK(GLOBAL_PROC,/proc/ending_helper))
//ATTACK GHOST IGNORING PARENT RETURN VALUE