diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 464ea37d02..628e698ae0 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -458,6 +458,7 @@ var/list/allowed_types = list( /datum/objective/assassinate, + /datum/objective/assassinate/once, /datum/objective/maroon, /datum/objective/debrain, /datum/objective/protect, diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index a9c9e227df..d7ee749f34 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -173,6 +173,30 @@ GLOBAL_LIST_EMPTY(objectives) /datum/objective/assassinate/admin_edit(mob/admin) admin_simple_target_pick(admin) +/datum/objective/assassinate/once + name = "kill once" + var/won = FALSE + +/datum/objective/assassinate/once/update_explanation_text() + ..() + if(target && target.current) + explanation_text = "Kill [target.name], the [!target_role_type ? target.assigned_role : target.special_role]. You only need to kill [target.p_them()] once; if they come back, you've still succeeded." + else + explanation_text = "Free Objective" + +/datum/objective/assassinate/once/find_target_by_role() + . = ..() + if(.) + START_PROCESSING(SSprocessing,src) + +/datum/objective/assassinate/once/check_completion() + return won || ..() + +/datum/objective/assassinate/once/process() + won = check_completion() + if(won) + STOP_PROCESSING(SSprocessing,src) + /datum/objective/assassinate/internal var/stolen = 0 //Have we already eliminated this target? diff --git a/code/modules/antagonists/ninja/ninja.dm b/code/modules/antagonists/ninja/ninja.dm index fe83e2fb2b..42412709fa 100644 --- a/code/modules/antagonists/ninja/ninja.dm +++ b/code/modules/antagonists/ninja/ninja.dm @@ -62,10 +62,10 @@ possible_targets.Cut(index,index+1) if(is_bad_guy ^ helping_station) //kill (good-ninja + bad-guy or bad-ninja + good-guy) - var/datum/objective/assassinate/O = new /datum/objective/assassinate() + var/datum/objective/assassinate/once/O = new /datum/objective/assassinate() O.owner = owner O.target = M - O.explanation_text = "Slay \the [M.current.real_name], the [M.assigned_role]." + O.explanation_text = "Slay \the [M.current.real_name], the [M.assigned_role]. You may let [M.p_they()] live, if they come back from death." objectives += O else //protect var/datum/objective/protect/O = new /datum/objective/protect() diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index 01d3dd5694..f584b6c149 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -191,28 +191,33 @@ maroon_objective.owner = owner maroon_objective.find_target() add_objective(maroon_objective) - else + else if(prob(30)) var/datum/objective/assassinate/kill_objective = new kill_objective.owner = owner kill_objective.find_target() add_objective(kill_objective) + else + var/datum/objective/assassinate/once/kill_objective = new + kill_objective.owner = owner + kill_objective.find_target() + add_objective(kill_objective) else if(prob(15) && !(locate(/datum/objective/download) in objectives) && !(owner.assigned_role in list("Research Director", "Scientist", "Roboticist"))) var/datum/objective/download/download_objective = new download_objective.owner = owner download_objective.gen_amount_goal() add_objective(download_objective) - else if(prob(40)) + else if(prob(33)) // cum. not counting download: 33%. yes, i do know 33/33 won't be equal and that i want 33/50 for that var/datum/objective/steal/steal_objective = new steal_objective.owner = owner steal_objective.find_target() add_objective(steal_objective) - else if(prob(40)) + else if(prob(33)) // cum. not counting download: 22.11% var/datum/objective/sabotage/sabotage_objective = new sabotage_objective.owner = owner sabotage_objective.find_target() add_objective(sabotage_objective) - else + else // cum. not counting download: 44.89% var/datum/objective/flavor/traitor/flavor_objective = new flavor_objective.owner = owner flavor_objective.forge_objective()