Refactors liches a bit (#25104)

* totally not breaking shit

* yes
This commit is contained in:
Contrabang
2024-04-19 18:05:44 +00:00
committed by GitHub
parent 24aadc9212
commit 7dcc7d41f2
3 changed files with 13 additions and 48 deletions
+5 -15
View File
@@ -45,21 +45,11 @@
if(but_wait_theres_more)
return ..()
// Wizards
for(var/datum/mind/wizard in wizards)
if(!iscarbon(wizard.current) || wizard.current.stat == DEAD) // wizard is in an MMI, don't count them as alive
continue
return ..()
// Apprentices
for(var/datum/mind/apprentice in apprentices)
if(!iscarbon(apprentice.current))
continue
if(apprentice.current.stat == DEAD)
continue
if(istype(apprentice.current, /obj/item/mmi)) // apprentice is in an MMI, don't count them as alive
continue
return ..()
// Wizards and Apprentices
for(var/datum/mind/wizard in (wizards + apprentices)) // yes, this works so it iterates through wizards, then apprentices
var/datum/antagonist/wizard/datum_wizard = wizard.has_antag_datum(/datum/antagonist/wizard)
if(datum_wizard?.wizard_is_alive())
return ..()
finished = TRUE
return TRUE