Makes malf AI its own ruleset in dynamic.
This commit is contained in:
@@ -225,7 +225,7 @@
|
||||
|
||||
/datum/dynamic_ruleset/midround/malf
|
||||
name = "Malfunctioning AI"
|
||||
config_tag = "malf_ai"
|
||||
config_tag = "malf_ai_midround"
|
||||
antag_datum = /datum/antagonist/traitor
|
||||
antag_flag = ROLE_MALF
|
||||
enemy_roles = list("Security Officer", "Warden","Detective","Head of Security", "Captain", "Scientist", "Chemist", "Research Director", "Chief Engineer")
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
antag_datum = /datum/antagonist/traitor/
|
||||
minimum_required_age = 0
|
||||
protected_roles = list("Security Officer", "Warden", "Detective", "Head of Security", "Captain", "Head of Personnel", "Chief Engineer", "Chief Medical Officer", "Research Director", "Quartermaster", "Cyborg")
|
||||
restricted_roles = list("Cyborg")
|
||||
restricted_roles = list("Cyborg", "AI")
|
||||
required_candidates = 1
|
||||
weight = 5
|
||||
cost = 10
|
||||
@@ -41,6 +41,60 @@
|
||||
log_game("DYNAMIC: Checking if we can turn someone into a traitor.")
|
||||
mode.picking_specific_rule(/datum/dynamic_ruleset/midround/autotraitor)
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// //
|
||||
// SYNDICATE TRAITORS //
|
||||
// //
|
||||
//////////////////////////////////////////////
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/malf_ai
|
||||
name = "Malfunctioning AI"
|
||||
config_tag = "malf_ai"
|
||||
antag_datum = /datum/antagonist/traitor
|
||||
antag_flag = ROLE_MALF
|
||||
enemy_roles = list("Security Officer", "Warden","Detective","Head of Security", "Captain", "Scientist", "Chemist", "Research Director", "Chief Engineer")
|
||||
exclusive_roles = list("AI")
|
||||
required_enemies = list(4,4,4,4,4,4,2,2,2,0)
|
||||
required_candidates = 1
|
||||
weight = 1
|
||||
cost = 35
|
||||
requirements = list(101,101,80,70,60,60,50,50,40,40)
|
||||
high_population_requirement = 35
|
||||
required_type = /mob/living/silicon/ai
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/malf_ai/trim_candidates()
|
||||
..()
|
||||
candidates = candidates[CURRENT_LIVING_PLAYERS]
|
||||
for(var/mob/living/player in candidates)
|
||||
if(!isAI(player))
|
||||
candidates -= player
|
||||
continue
|
||||
if(is_centcom_level(player.z))
|
||||
candidates -= player
|
||||
continue
|
||||
if(player.mind && (player.mind.special_role || player.mind.antag_datums?.len > 0))
|
||||
candidates -= player
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/malf_ai/execute()
|
||||
if(!candidates || !candidates.len)
|
||||
return FALSE
|
||||
var/mob/living/silicon/ai/M = pick(candidates)
|
||||
candidates -= M
|
||||
assigned += M.mind
|
||||
var/datum/antagonist/traitor/AI = new
|
||||
M.mind.special_role = antag_flag
|
||||
M.mind.add_antag_datum(AI)
|
||||
return TRUE
|
||||
|
||||
/datum/dynamic_ruleset/roundstart/malf_ai/rule_process()
|
||||
if (autotraitor_cooldown > 0)
|
||||
autotraitor_cooldown--
|
||||
else
|
||||
autotraitor_cooldown = 450 // 15 minutes
|
||||
message_admins("Checking if we can turn someone into a traitor.")
|
||||
log_game("DYNAMIC: Checking if we can turn someone into a traitor.")
|
||||
mode.picking_specific_rule(/datum/dynamic_ruleset/midround/autotraitor)
|
||||
|
||||
//////////////////////////////////////////
|
||||
// //
|
||||
// BLOOD BROTHERS //
|
||||
|
||||
@@ -280,6 +280,7 @@ DYNAMIC_POP_PER_REQUIREMENT 6
|
||||
## 1 -> 9, probability for this rule to be picked against other rules.
|
||||
## Note that requirements must also be met, and some requirements are impossible to meet.
|
||||
DYNAMIC_WEIGHT TRAITOR 5
|
||||
DYNAMIC_WEIGHT MALF_AI 1
|
||||
DYNAMIC_WEIGHT TRAITORBRO 4
|
||||
DYNAMIC_WEIGHT CHANGELING 3
|
||||
DYNAMIC_WEIGHT WIZARD 1
|
||||
@@ -296,7 +297,7 @@ DYNAMIC_WEIGHT METEOR 3
|
||||
|
||||
## Midround antags
|
||||
DYNAMIC_WEIGHT MIDROUND_TRAITOR 7
|
||||
DYNAMIC_WEIGHT MALF_AI 3
|
||||
DYNAMIC_WEIGHT MIDROUND_MALF_AI 3
|
||||
DYNAMIC_WEIGHT MIDROUND_WIZARD 1
|
||||
DYNAMIC_WEIGHT MIDROUND_NUCLEAR 5
|
||||
DYNAMIC_WEIGHT BLOB 4
|
||||
@@ -309,6 +310,7 @@ DYNAMIC_WEIGHT LATEJOIN_REVOLUTION 2
|
||||
|
||||
## Threat cost. This is decreased from the mode's threat when the rule is executed.
|
||||
DYNAMIC_COST TRAITOR 10
|
||||
DYNAMIC_COST MALF_AI 35
|
||||
DYNAMIC_COST TRAITORBRO 10
|
||||
DYNAMIC_COST CHANGELING 30
|
||||
DYNAMIC_COST WIZARD 30
|
||||
@@ -325,7 +327,7 @@ DYNAMIC_COST METEOR 0
|
||||
|
||||
## Midround antags
|
||||
DYNAMIC_COST MIDROUND_TRAITOR 10
|
||||
DYNAMIC_COST MALF_AI 35
|
||||
DYNAMIC_COST MIDROUND_MALF_AI 35
|
||||
DYNAMIC_COST MIDROUND_WIZARD 20
|
||||
DYNAMIC_COST MIDROUND_NUCLEAR 35
|
||||
DYNAMIC_COST BLOB 10
|
||||
@@ -341,6 +343,7 @@ DYNAMIC_COST LATEJOIN_REVOLUTION 20
|
||||
## This means that 40 30 30 20 20 20 15 15 15 10 will not generate below 40 at 0-5, 30 at 6-11 etc.
|
||||
DYNAMIC_REQUIREMENTS TRAITOR 10 10 10 10 10 10 10 10 10 10
|
||||
DYNAMIC_REQUIREMENTS TRAITORBRO 40 30 30 20 20 15 15 15 10 10
|
||||
DYNAMIC_REQUIREMENTS MALF_AI 101 101 80 70 60 60 50 50 40 40
|
||||
DYNAMIC_REQUIREMENTS CHANGELING 80 70 60 50 40 20 20 10 10 10
|
||||
DYNAMIC_REQUIREMENTS WIZARD 90 90 70 40 30 20 10 10 10 10
|
||||
DYNAMIC_REQUIREMENTS CULT 100 90 80 60 40 30 10 10 10 10
|
||||
@@ -356,7 +359,7 @@ DYNAMIC_REQUIREMENTS METEOR 101 101 101 101 101 101 101 101 101 101
|
||||
|
||||
## Midround antags
|
||||
DYNAMIC_REQUIREMENTS MIDROUND_TRAITOR 50 40 30 20 10 10 10 10 10 10
|
||||
DYNAMIC_REQUIREMENTS MALF_AI 101 101 80 70 60 60 50 50 40 40
|
||||
DYNAMIC_REQUIREMENTS MIDROUND_MALF_AI 101 101 80 70 60 60 50 50 40 40
|
||||
DYNAMIC_REQUIREMENTS MIDROUND_WIZARD 90 90 70 40 30 20 10 10 10 10
|
||||
DYNAMIC_REQUIREMENTS MIDROUND_NUCLEAR 90 90 90 80 60 40 30 20 10 10
|
||||
DYNAMIC_REQUIREMENTS BLOB 101 101 101 80 60 50 30 20 10 10
|
||||
@@ -369,6 +372,7 @@ DYNAMIC_REQUIREMENTS LATEJOIN_REVOLUTION 101 101 70 40 30 20 20 20 20 20
|
||||
|
||||
## An alternative, static requirement used instead when pop is over mode's high_pop_limit.
|
||||
DYNAMIC_HIGH_POPULATION_REQUIREMENT TRAITOR 10
|
||||
DYNAMIC_HIGH_POPULATION_REQUIREMENT MALF_AI 15
|
||||
DYNAMIC_HIGH_POPULATION_REQUIREMENT TRAITORBRO 15
|
||||
DYNAMIC_HIGH_POPULATION_REQUIREMENT CHANGELING 10
|
||||
DYNAMIC_HIGH_POPULATION_REQUIREMENT WIZARD 10
|
||||
@@ -385,7 +389,7 @@ DYNAMIC_HIGH_POPULATION_REQUIREMENT METEOR 101
|
||||
|
||||
## Midround antags
|
||||
DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_TRAITOR 10
|
||||
DYNAMIC_HIGH_POPULATION_REQUIREMENT MALF_AI 35
|
||||
DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_MALF_AI 35
|
||||
DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_WIZARD 50
|
||||
DYNAMIC_HIGH_POPULATION_REQUIREMENT MIDROUND_NUCLEAR 10
|
||||
DYNAMIC_HIGH_POPULATION_REQUIREMENT BLOB 50
|
||||
|
||||
Reference in New Issue
Block a user