Files
Bubberstation/code/game/gamemodes/blob/blob_finish.dm
Incoming c4f6d85b44 Any roundtype can now take advantage of continuous/non-continuous settings as well as the mulligan antag system. (as a reminder at this point the mulligan system only creates lings and/or traitors)
A generic check for antags now exists in check_finished, and overrides a lot of checks in specific modes. Specific checks are still needed if you have special means of determining antag viability (blob cores), or things to do when specific antags die (summon events).

In situations where mulligans are on but fail, the round will usually lurch on as "extended" but in wizard/malf/blob/ragin mages the round will end then and there. This mirrors current behavior.

Config settings are fully customizable and for the most part defaults mirror existing behaviors:

Revolution, Shadowling, Gang, Ragin Mages and Monkey are noncontinuous and will end with the death of all antagonists.

* There is a change here in shadowling in that rounds with living thralls but no living shadowlings will continue until the thralls are delt with, as they can still raise their dead master.

* Abductors not ending with the death of all ayyliens if there are still probe victims around is likewise a change. If the dev of abduction would rather have it default the other way, we can do that.

* Monkey being noncontinuous is a change, but given how monkey mode works, it really only makes sense.

All modes that are continous use the mulligan system by default, remember that this will only come into effect if EVERY antagonist dies, so modes with many antagonists are very likely to only mulligan extremely rarely because if even one isn't slaughtered and is instead brigged or otherwise neutralized nonfatally the mulligan will never come. A nice little bonus for security not to kill everyone!

Fixes a bug where shuttle stranding could occur in continous rev modes (not something on by default)

Probably buggy as hell in initial commit. Please no quick merge
2015-04-24 15:40:42 -04:00

54 lines
2.2 KiB
Plaintext

/datum/game_mode/blob/check_finished()
if(infected_crew.len > burst)//Some blobs have yet to burst
return 0
if(blobwincount <= blobs.len)//Blob took over
return 1
if(!blob_cores.len) // blob is dead
if(config.continuous["blob"])
SSshuttle.emergencyNoEscape = 0
if(SSshuttle.emergency.mode == SHUTTLE_STRANDED)
SSshuttle.emergency.mode = SHUTTLE_DOCKED
SSshuttle.emergency.timer = world.time
priority_announce("Hostile enviroment resolved. You have 3 minutes to board the Emergency Shuttle.", null, 'sound/AI/shuttledock.ogg', "Priority")
return ..()
return 1
if(station_was_nuked)//Nuke went off
return 1
return 0
/datum/game_mode/blob/declare_completion()
if(round_converted) //So badmin blobs later don't step on the dead natural blobs metaphorical toes
..()
if(blobwincount <= blobs.len)
feedback_set_details("round_end_result","win - blob took over")
world << "<FONT size = 3><B>The blob has taken over the station!</B></FONT>"
world << "<B>The entire station was eaten by the Blob</B>"
log_game("Blob mode completed with a blob victory.")
else if(station_was_nuked)
feedback_set_details("round_end_result","halfwin - nuke")
world << "<FONT size = 3><B>Partial Win: The station has been destroyed!</B></FONT>"
world << "<B>Directive 7-12 has been successfully carried out preventing the Blob from spreading.</B>"
log_game("Blob mode completed with a tie (station destroyed).")
else if(!blob_cores.len)
feedback_set_details("round_end_result","loss - blob eliminated")
world << "<FONT size = 3><B>The staff has won!</B></FONT>"
world << "<B>The alien organism has been eradicated from the station</B>"
log_game("Blob mode completed with a crew victory.")
world << "<span class='notice'>Rebooting in 30s</span>"
..()
return 1
datum/game_mode/proc/auto_declare_completion_blob()
if(istype(ticker.mode,/datum/game_mode/blob) )
var/datum/game_mode/blob/blob_mode = src
if(blob_mode.infected_crew.len)
var/text = "<FONT size = 2><B>The blob[(blob_mode.infected_crew.len > 1 ? "s were" : " was")]:</B></FONT>"
for(var/datum/mind/blob in blob_mode.infected_crew)
text += "<br><b>[blob.key]</b> was <b>[blob.name]</b>"
world << text
return 1