forces antag if all antags are dead

This commit is contained in:
Putnam
2019-11-09 21:29:09 -08:00
parent d78bc94b49
commit 57fbad5d41
2 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -632,8 +632,11 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
if (prob(get_injection_chance()))
var/list/drafted_rules = list()
var/antag_num = current_players[CURRENT_LIVING_ANTAGS].len
for (var/datum/dynamic_ruleset/midround/rule in midround_rules)
if (rule.acceptable(current_players[CURRENT_LIVING_PLAYERS].len, threat_level) && threat >= rule.cost)
var/antag_acceptable = (antag_num || !isnull(rule.antag_flag))
// if there are antags OR the rule is an antag rule, antag_acceptable will be true.
if (antag_acceptable && rule.acceptable(current_players[CURRENT_LIVING_PLAYERS].len, threat_level) && threat >= rule.cost)
// Classic secret : only autotraitor/minor roles
if (GLOB.dynamic_classic_secret && !((rule.flags & TRAITOR_RULESET) || (rule.flags & MINOR_RULESET)))
continue
@@ -724,9 +724,10 @@
return Ninja
/datum/dynamic_ruleset/midround/event/pirates
name = "Pirates"
name = "Space Pirates"
config_tag = "pirates"
typepath = /datum/round_event/pirates
antag_flag = ROLE_TRAITOR
enemy_roles = list("AI","Security Officer","Head of Security","Captain")
required_enemies = list(2,2,1,1,0,0,0,0,0,0)
weight = 5