diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 985eec7dcf2..f6ba5867919 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -37,11 +37,12 @@ datum/objective proc/find_target_by_role(role, role_type=0)//Option sets either to check assigned role or special role. Default to assigned. + var/list/possible_targets = list() for(var/datum/mind/possible_target in ticker.minds) - if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) ) - target = possible_target - break - + if((possible_target != owner) && ishuman(possible_target.current) && ((role_type ? possible_target.special_role : possible_target.assigned_role) == role) && (possible_target.current.stat != 2) ) + possible_targets += possible_target + if(possible_targets.len > 0) + target = pick(possible_targets) datum/objective/assassinate