#define PLAYER_WEIGHT 1 #define HUMAN_DEATH -500 #define OTHER_DEATH -500 #define EXPLO_SCORE -1000 //boum //estimated stats //80 minute round //60 player server //48k player-ticks //60 deaths (ideally) //20 explosions var/global/datum/tension/tension_master /datum/tension var/score var/deaths var/human_deaths var/explosions var/adminhelps var/air_alarms var/nuketeam = 0 var/malfAI = 0 var/wizard = 0 var/forcenexttick = 0 var/supress = 0 var/list/antagonistmodes = list ( "POINTS_FOR_TRATIOR" = 10000, "POINTS_FOR_CHANGLING" = 12000, "POINTS_FOR_REVS" = 15000, "POINTS_FOR_MALF" = 25000, "POINTS_FOR_WIZARD" = 15000, "POINTS_FOR_CULT" = 15000, "POINTS_FOR_NUKETEAM" = 25000, "POINTS_FOR_ALIEN" = 20000, "POINTS_FOR_NINJA" = 20000, "POINTS_FOR_DEATHSQUAD" = 50000 ) var/list/potentialgames = list() New() score = 0 deaths=0 human_deaths=0 explosions=0 adminhelps=0 air_alarms=0 proc/process() score += get_num_players()*PLAYER_WEIGHT if(config.Tensioner_Active) if(score > 100000) if(!supress) if(prob(1) || forcenexttick) if(prob(1) || forcenexttick) if(forcenexttick) forcenexttick = 0 for (var/mob/M in world) if (M.client && M.client.holder) M << "The tensioner wishes to create additional antagonists! Press (this) in 30 seconds to abort!" spawn(300) if(!supress) for(var/V in antagonistmodes) // OH SHIT SOMETHING IS GOING TO HAPPEN NOW if(antagonistmodes[V] < score) potentialgames.Add(V) antagonistmodes.Remove(V) if(potentialgames.len) var/thegame = pick(potentialgames) switch(thegame) if("POINTS_FOR_TRATIOR") if(!makeTratiors()) forcenexttick = 1 else potentialgames.Remove(thegame) if("POINTS_FOR_CHANGLING") if(!makeChanglings()) forcenexttick = 1 else potentialgames.Remove(thegame) if("POINTS_FOR_REVS") if(!makeRevs()) forcenexttick = 1 else potentialgames.Remove(thegame) if("POINTS_FOR_MALF") if(!makeMalfAImode()) forcenexttick = 1 else potentialgames.Remove(thegame) if("POINTS_FOR_WIZARD") if(!makeWizard()) forcenexttick = 1 else potentialgames.Remove(thegame) if("POINTS_FOR_CULT") if(!makeCult()) forcenexttick = 1 else potentialgames.Remove(thegame) if("POINTS_FOR_NUKETEAM") if(!makeNukeTeam()) forcenexttick = 1 else potentialgames.Remove(thegame) if("POINTS_FOR_ALIEN") //makeAliens() forcenexttick = 1 if("POINTS_FOR_NINJA") //makeSpaceNinja() forcenexttick = 1 if("POINTS_FOR_DEATHSQUAD") //makeDeathsquad() forcenexttick = 1 proc/get_num_players() var/peeps = 0 for (var/mob/M in world) if (!M.client) continue peeps += 1 return peeps proc/death(var/mob/M) if (!M) return deaths++ if (istype(M,/mob/living/carbon/human)) score += HUMAN_DEATH human_deaths++ else score += OTHER_DEATH proc/explosion() score += EXPLO_SCORE explosions++ proc/new_adminhelp() adminhelps++ proc/new_air_alarm() air_alarms++ Topic(href, href_list) log_admin("[key_name(usr)] used a tensioner override. The override was [href]") message_admins("[key_name(usr)] used a tensioner override. The override was [href]") if(href_list["addScore"]) score += 50000 if (href_list["makeTratior"]) makeTratiors() else if (href_list["makeChanglings"]) makeChanglings() else if (href_list["makeRevs"]) makeRevs() else if (href_list["makeWizard"]) makeWizard() else if (href_list["makeCult"]) makeCult() else if (href_list["makeMalf"]) makeMalfAImode() else if (href_list["makeNukeTeam"]) makeNukeTeam() else if (href_list["makeAliens"]) makeAliens() else if (href_list["makeSpaceNinja"]) makeSpaceNinja() else if (href_list["makeDeathsquad"]) makeDeathsquad() else if (href_list["Supress"]) supress = 1 spawn(6000) supress = 0 proc/makeMalfAImode() var/list/mob/living/silicon/AIs = list() var/mob/living/silicon/malfAI = null var/datum/mind/themind = null for(var/mob/living/silicon/ai in world) if(ai.client) AIs += ai if(AIs.len) malfAI = pick(AIs) else return 0 if(malfAI) themind = malfAI.mind themind.make_AI_Malf() return 1 proc/makeTratiors() var/datum/game_mode/traitor/temp = new if(config.protect_roles_from_antagonist) temp.restricted_jobs += temp.protected_jobs var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null for(var/mob/living/carbon/human/applicant in world) if(applicant.stat < 2) if(applicant.mind) if (!applicant.mind.special_role) if(!(applicant.job in temp.restricted_jobs)) if(applicant.client) candidates += applicant if(candidates.len) var/numTratiors = min(candidates.len, 3) for(var/i = 0, i300)//If more than 30 game seconds passed. return candidates += G if("No") return spawn(300) if(candidates.len) theghost = pick(candidates) var/mob/living/carbon/human/new_character=makeBody(theghost) new_character.mind.make_Wizard() proc/makeCult() var/datum/game_mode/cult/temp = new if(config.protect_roles_from_antagonist) temp.restricted_jobs += temp.protected_jobs var/list/mob/living/carbon/human/candidates = list() var/mob/living/carbon/human/H = null for(var/mob/living/carbon/human/applicant in world) if(applicant.stat < 2) if(applicant.mind) if (!applicant.mind.special_role) if(!(applicant.job in temp.restricted_jobs)) if(applicant.client) candidates += applicant if(candidates.len) var/numCultists = min(candidates.len, 4) for(var/i = 0, i300)//If more than 30 game seconds passed. return candidates += G if("No") return spawn(300) if(candidates.len) var/numagents = min(candidates.len, 5) syndicate_begin() for(var/i = 0, i