From 8fc39f67b845b18bda7bda0e72312b7fa5017220 Mon Sep 17 00:00:00 2001 From: GDN <96800819+GDNgit@users.noreply.github.com> Date: Fri, 30 Jun 2023 23:40:26 -0500 Subject: [PATCH] Fixes people not getting escape objectives when they should (#21522) --- .../modules/antagonists/traitor/datum_traitor.dm | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index 261e41f4f61..4c650595fd8 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -100,17 +100,15 @@ for(var/i in 1 to GLOB.configuration.gamemode.traitor_objectives_amount) forge_single_human_objective() - // Are they required to stay alive for their objectives? - var/martyr_compatibility = TRUE - if(prob(20)) - for(var/objective in owner.get_all_objectives()) - var/datum/objective/O = objective - if(!O.martyr_compatible) // Check if our current objectives can co-exist with martyr. - martyr_compatibility = FALSE - break + var/can_succeed_if_dead = TRUE + for(var/objective in owner.get_all_objectives()) + var/datum/objective/O = objective + if(!O.martyr_compatible) // Check if our current objectives can co-exist with martyr. + can_succeed_if_dead = FALSE + break // Give them an escape objective if they don't have one already. - if(!(locate(/datum/objective/escape) in owner.get_all_objectives()) && !martyr_compatibility) + if(!(locate(/datum/objective/escape) in owner.get_all_objectives()) && (!can_succeed_if_dead || prob(80))) add_objective(/datum/objective/escape) /**