[MIRROR] Fixes heretic giving you both hijack and dagd, fixes protection objective. (#1333)

* Fixes heretic giving you both hijack and dagd, fixes protection objective. (#54374)

Heretic can no longer give you both hijack AND die a glorius death objective.

Protection objective was broken for some time, it always suceeded. It should be fixed now.

* Fixes heretic giving you both hijack and dagd, fixes protection objective.

Co-authored-by: EdgeLordExe <42111655+EdgeLordExe@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-10-15 22:11:27 +01:00
committed by GitHub
co-authored by EdgeLordExe
parent 519eed8d82
commit 80ceda266f
2 changed files with 35 additions and 31 deletions
+1 -1
View File
@@ -296,7 +296,7 @@ GLOBAL_LIST(admin_objective_list) //Prefilled admin assignable objective list
if(human_check)
brain_target = target.current.getorganslot(ORGAN_SLOT_BRAIN)
//Protect will always suceed when someone suicides
return !target || considered_alive(target, enforce_human = human_check) || (human_check == TRUE && brain_target)? !brain_target.suicided : FALSE
return !target || considered_alive(target, enforce_human = human_check) || (human_check == TRUE && brain_target) ? brain_target.suicided : FALSE
/datum/objective/protect/update_explanation_text()
..()
@@ -92,42 +92,46 @@
/datum/antagonist/heretic/proc/forge_primary_objectives()
var/list/assasination = list()
var/list/protection = list()
var/choose_list = list("assasinate","hjiack","protect","glory")
for(var/i in 1 to 2)
var/pck = pick(choose_list)
switch(pck)
if("assasinate")
var/datum/objective/assassinate/A = new
A.owner = owner
var/list/owners = A.get_owners()
A.find_target(owners,protection)
assasination += A.target
objectives += A
if("hjiack")
var/datum/objective/hijack/hijack = new
hijack.owner = owner
objectives += hijack
choose_list -= "hijack"
choose_list -= "glory"
if("glory")
var/datum/objective/martyr/martyrdom = new
martyrdom.owner = owner
objectives += martyrdom
choose_list -= "hijack"
choose_list -= "glory"
if("protect")
var/datum/objective/protect/P = new
P.owner = owner
var/list/owners = P.get_owners()
P.find_target(owners,assasination)
protection += P.target
objectives += P
var/choose_list_begin = list("assassinate","protect")
var/choose_list_end = list("assassinate","hijack","protect","glory")
var/pck1 = pick(choose_list_begin)
var/pck2 = pick(choose_list_end)
forge_objective(pck1,assasination,protection)
forge_objective(pck2,assasination,protection)
var/datum/objective/sacrifice_ecult/SE = new
SE.owner = owner
SE.update_explanation_text()
objectives += SE
/datum/antagonist/heretic/proc/forge_objective(string,assasination,protection)
switch(string)
if("assassinate")
var/datum/objective/assassinate/A = new
A.owner = owner
var/list/owners = A.get_owners()
A.find_target(owners,protection)
assasination += A.target
objectives += A
if("hijack")
var/datum/objective/hijack/hijack = new
hijack.owner = owner
objectives += hijack
if("glory")
var/datum/objective/martyr/martyrdom = new
martyrdom.owner = owner
objectives += martyrdom
if("protect")
var/datum/objective/protect/P = new
P.owner = owner
var/list/owners = P.get_owners()
P.find_target(owners,assasination)
protection += P.target
objectives += P
/datum/antagonist/heretic/apply_innate_effects(mob/living/mob_override)
. = ..()
var/mob/living/current = owner.current