From 4b3e3a67f473fcd48955697c529ac3ffffe29e60 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 11 Jan 2020 19:57:59 -0500 Subject: [PATCH] Apprentices are not traitors. IsWizard checks apprentices as well. Wizard Rounds End when all Wizard/Apprentices die, even if other antagonists are alive. --- code/game/gamemodes/wizard/artefact.dm | 2 +- code/game/gamemodes/wizard/wizard.dm | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 187ac0f0ea1..4d6215ef4c4 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -99,7 +99,7 @@ new_objective:target = H:mind new_objective.explanation_text = "Protect [H.real_name], the wizard." M.mind.objectives += new_objective - SSticker.mode.traitors += M.mind + SSticker.mode.apprentices += M.mind M.mind.special_role = SPECIAL_ROLE_WIZARD_APPRENTICE SSticker.mode.update_wiz_icons_added(M.mind) M.faction = list("wizard") diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 131afd84fff..7a6f634784f 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -1,5 +1,6 @@ /datum/game_mode var/list/datum/mind/wizards = list() + var/list/datum/mind/apprentices = list() /datum/game_mode/wizard name = "wizard" @@ -161,7 +162,7 @@ // Checks if the game should end due to all wizards and apprentices being dead, or MMI'd/Borged /datum/game_mode/wizard/check_finished() var/wizards_alive = 0 - var/traitors_alive = 0 + var/apprentices_alive = 0 // Wizards for(var/datum/mind/wizard in wizards) @@ -173,18 +174,18 @@ continue wizards_alive++ - // Apprentices - classified as "traitors" + // Apprentices if(!wizards_alive) - for(var/datum/mind/traitor in traitors) - if(!istype(traitor.current,/mob/living/carbon)) + for(var/datum/mind/apprentice in apprentices) + if(!istype(apprentice.current,/mob/living/carbon)) continue - if(traitor.current.stat==DEAD) + if(apprentice.current.stat==DEAD) continue - if(istype(traitor.current, /obj/item/mmi)) // apprentice is in an MMI, don't count them as alive + if(istype(apprentice.current, /obj/item/mmi)) // apprentice is in an MMI, don't count them as alive continue - traitors_alive++ + apprentices_alive++ - if(wizards_alive || traitors_alive || but_wait_theres_more) + if(wizards_alive || apprentices_alive || but_wait_theres_more) return ..() else finished = 1 @@ -279,4 +280,4 @@ Made a proc so this is not repeated 14 (or more) times.*/ return 1 /proc/iswizard(mob/living/M as mob) - return istype(M) && M.mind && SSticker && SSticker.mode && (M.mind in SSticker.mode.wizards) + return istype(M) && M.mind && SSticker && SSticker.mode && ((M.mind in SSticker.mode.wizards) || (M.mind in SSticker.mode.apprentices))