From 9372687d3201e2d642f6fc3fc75068088092ab2d Mon Sep 17 00:00:00 2001 From: Anorak2020 <145682013+Anorak2024@users.noreply.github.com> Date: Tue, 15 Oct 2024 08:53:32 +0300 Subject: [PATCH] add: more objectives for vampires and clings (#6024) * :badguy: * forge_single_human_objective -> forge_single_objective --- .../antagonists/_common/antag_datum.dm | 20 ++++++++++++++++ .../changeling/changeling_datum.dm | 3 +++ .../antagonists/space_ninja/ninja_datum.dm | 2 +- .../antagonists/traitor/datum_traitor.dm | 23 +------------------ .../antagonists/vampire/vampire_datum.dm | 2 ++ 5 files changed, 27 insertions(+), 23 deletions(-) diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index b7d4c2180ed..43d29a57175 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -445,3 +445,23 @@ GLOBAL_LIST_EMPTY(antagonists) */ /datum/antagonist/proc/roundend_report_footer() return + +/** + * Create and assign a single randomized objective. + */ +/datum/antagonist/proc/forge_single_objective() + if(prob(50)) + if(length(active_ais()) && prob(100 / length(GLOB.player_list))) + add_objective(/datum/objective/destroy) + + else if(prob(5)) + add_objective(/datum/objective/debrain) + + else if(prob(20)) + add_objective(/datum/objective/protect) + + else + add_objective(/datum/objective/maroon) + + else + add_objective(/datum/objective/steal) diff --git a/code/modules/antagonists/changeling/changeling_datum.dm b/code/modules/antagonists/changeling/changeling_datum.dm index b8030b57c61..0331c578aa7 100644 --- a/code/modules/antagonists/changeling/changeling_datum.dm +++ b/code/modules/antagonists/changeling/changeling_datum.dm @@ -205,6 +205,9 @@ GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","E absorb.owner = owner objectives += absorb + forge_single_objective() + forge_single_objective() + if(prob(60)) add_objective(/datum/objective/steal) else diff --git a/code/modules/antagonists/space_ninja/ninja_datum.dm b/code/modules/antagonists/space_ninja/ninja_datum.dm index 634098c4e46..1bc6f1254f4 100644 --- a/code/modules/antagonists/space_ninja/ninja_datum.dm +++ b/code/modules/antagonists/space_ninja/ninja_datum.dm @@ -370,7 +370,7 @@ protect_objective.killers_objectives |= killer_objective for(var/i in 1 to objective_amount) - traitor_datum.forge_single_human_objective() + traitor_datum.forge_single_objective() var/list/all_objectives = traitor.get_all_objectives() var/martyr_compatibility = TRUE diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index addb7a3b945..9c95b19510b 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -118,7 +118,7 @@ return for(var/i = objective_count, i < objective_amount) - forge_single_human_objective() + forge_single_objective() i += 1 var/martyr_compatibility = TRUE //You can't succeed in stealing if you're dead. @@ -184,27 +184,6 @@ mob.update_icons() -/** - * Create and assign a single randomized traitor objective. - */ -/datum/antagonist/traitor/proc/forge_single_human_objective() - if(prob(50)) - if(length(active_ais()) && prob(100 / length(GLOB.player_list))) - add_objective(/datum/objective/destroy) - - else if(prob(5)) - add_objective(/datum/objective/debrain) - - else if(prob(20)) - add_objective(/datum/objective/protect) - - else - add_objective(/datum/objective/maroon) - - else - add_objective(/datum/objective/steal) - - /** * Give traitors their uplink. Play the traitor an alert sound. */ diff --git a/code/modules/antagonists/vampire/vampire_datum.dm b/code/modules/antagonists/vampire/vampire_datum.dm index 9ffeeb70733..ab388e1ffa9 100644 --- a/code/modules/antagonists/vampire/vampire_datum.dm +++ b/code/modules/antagonists/vampire/vampire_datum.dm @@ -75,6 +75,8 @@ add_objective(/datum/objective/blood) add_objective(/datum/objective/maroon) add_objective(/datum/objective/steal) + forge_single_objective() + forge_single_objective() if(prob(20)) // 20% chance of getting survive. 80% chance of getting escape. add_objective(/datum/objective/survive)