/datum/game_mode var/list/datum/mind/vampires = list() var/list/datum/mind/vampire_enthralled = list() //those controlled by a vampire /datum/game_mode/vampire name = "vampire" config_tag = "vampire" restricted_jobs = list("AI", "Cyborg") protected_jobs = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Blueshield", "Nanotrasen Representative", "Magistrate", "Chaplain", "Internal Affairs Agent", "Nanotrasen Navy Officer", "Special Operations Officer", "Syndicate Officer", "Solar Federation General") protected_species = list("Machine") required_players = 15 required_enemies = 1 recommended_enemies = 4 ///list of minds of soon to be vampires var/list/datum/mind/pre_vampires = list() /datum/game_mode/vampire/announce() to_chat(world, "The current game mode is - Vampires!") to_chat(world, "There are Bluespace Vampires infesting your fellow crewmates, keep your blood close and neck safe!") /datum/game_mode/vampire/pre_setup() if(GLOB.configuration.gamemode.prevent_mindshield_antags) restricted_jobs += protected_jobs var/list/datum/mind/possible_vampires = get_players_for_role(ROLE_VAMPIRE) var/vampire_amount = 1 + round(num_players() / 10) if(length(possible_vampires)) for(var/i in 1 to vampire_amount) if(!length(possible_vampires)) break var/datum/mind/vampire = pick_n_take(possible_vampires) pre_vampires += vampire vampire.special_role = SPECIAL_ROLE_VAMPIRE vampire.restricted_roles = restricted_jobs ..() return TRUE else return FALSE /datum/game_mode/vampire/post_setup() for(var/datum/mind/vampire in pre_vampires) vampire.add_antag_datum(/datum/antagonist/vampire) ..() /datum/game_mode/proc/auto_declare_completion_vampire() if(!length(vampires)) return var/list/text = list("The vampires were:") for(var/datum/mind/vampire in vampires) var/traitorwin = TRUE var/datum/antagonist/vampire/V = vampire.has_antag_datum(/datum/antagonist/vampire) text += "
[vampire.get_display_key()] was [vampire.name] (" if(vampire.current) if(vampire.current.stat == DEAD) text += "died" else text += "survived" if(V.subclass) text += " as a [V.subclass.name]" else text += "body destroyed" text += ")" var/list/all_objectives = vampire.get_all_objectives(include_team = FALSE) if(length(all_objectives))//If the traitor had no objectives, don't need to process this. var/count = 1 for(var/datum/objective/objective in all_objectives) if(objective.check_completion()) text += "
Objective #[count]: [objective.explanation_text] Success!" if(istype(objective, /datum/objective/steal)) var/datum/objective/steal/S = objective SSblackbox.record_feedback("nested tally", "vampire_steal_objective", 1, list("Steal [S.steal_target]", "SUCCESS")) else SSblackbox.record_feedback("nested tally", "vampire_objective", 1, list("[objective.type]", "SUCCESS")) else text += "
Objective #[count]: [objective.explanation_text] Fail." if(istype(objective, /datum/objective/steal)) var/datum/objective/steal/S = objective SSblackbox.record_feedback("nested tally", "vampire_steal_objective", 1, list("Steal [S.steal_target]", "FAIL")) else SSblackbox.record_feedback("nested tally", "vampire_objective", 1, list("[objective.type]", "FAIL")) traitorwin = FALSE count++ var/special_role_text if(vampire.special_role) special_role_text = lowertext(vampire.special_role) else special_role_text = "antagonist" if(traitorwin) text += "
The [special_role_text] was successful!" SSblackbox.record_feedback("tally", "vampire_success", 1, "SUCCESS") else text += "
The [special_role_text] has failed!" SSblackbox.record_feedback("tally", "vampire_success", 1, "FAIL") return text.Join("") /datum/game_mode/proc/auto_declare_completion_enthralled() if(!length(vampire_enthralled)) return var/list/text = list("The Enthralled were:") for(var/datum/mind/mind in vampire_enthralled) text += "
[mind.get_display_key()] was [mind.name] (" if(mind.current) if(mind.current.stat == DEAD) text += "died" else text += "survived" if(mind.current.real_name != mind.name) text += " as [mind.current.real_name]" else text += "body destroyed" text += ")" return text.Join("")