diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm
index 421582d26a1..1cc2cd9d469 100644
--- a/code/game/gamemodes/shadowling/shadowling.dm
+++ b/code/game/gamemodes/shadowling/shadowling.dm
@@ -172,9 +172,8 @@ Made by Xhuis
thrall_mind.current.attack_log += "\[[time_stamp()]\] Dethralled"
thrall_mind.special_role = null
update_shadow_icons_removed(thrall_mind)
- thrall_mind.remove_spell(/obj/effect/proc_holder/spell/targeted/lesser_glare)
- thrall_mind.remove_spell(/obj/effect/proc_holder/spell/targeted/lesser_shadow_walk)
- //thrall_mind.remove_spell(/obj/effect/proc_holder/spell/targeted/thrall_vision) //uncomment when vision code is unfucked.
+ for(var/obj/effect/proc_holder/spell/S in thrall_mind.spell_list)
+ thrall_mind.remove_spell(S)
thrall_mind.current.remove_language("Shadowling Hivemind")
if(kill && ishuman(thrall_mind.current)) //If dethrallization surgery fails, kill the mob as well as dethralling them
var/mob/living/carbon/human/H = thrall_mind.current
@@ -211,7 +210,29 @@ Made by Xhuis
else
shadowling_dead = 1 //but shadowling was kill :(
return 1
-
+
+/datum/game_mode/proc/remove_shadowling(datum/mind/ling_mind)
+ if(!istype(ling_mind) || !(ling_mind in shadows)) return 0
+ update_shadow_icons_removed(ling_mind)
+ shadows.Remove(ling_mind)
+ ling_mind.current.attack_log += "\[[time_stamp()]\] Deshadowlinged"
+ ling_mind.special_role = null
+ for(var/obj/effect/proc_holder/spell/S in ling_mind.spell_list)
+ ling_mind.remove_spell(S)
+ var/mob/living/M = ling_mind.current
+ if(issilicon(M))
+ M.audible_message("[M] lets out a short blip.", \
+ "You have been turned into a robot! You are no longer a shadowling! Though you try, you cannot remember anything about your time as one...")
+ else
+ M.visible_message("[M] screams and contorts!", \
+ "THE LIGHT-- YOUR MIND-- BURNS--")
+ spawn(30)
+ if(!M || qdeleted(M))
+ return
+ M.visible_message("[M] suddenly bloats and explodes!", \
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA----")
+ playsound(M, 'sound/magic/Disintegrate.ogg', 100, 1)
+ M.gib()
/datum/game_mode/shadowling/proc/check_shadow_victory()
var/success = 0 //Did they win?
diff --git a/code/modules/mob/living/silicon/login.dm b/code/modules/mob/living/silicon/login.dm
index a95a754eae8..cc2cb3e8435 100644
--- a/code/modules/mob/living/silicon/login.dm
+++ b/code/modules/mob/living/silicon/login.dm
@@ -3,4 +3,6 @@
if(mind && ticker && ticker.mode)
ticker.mode.remove_cultist(mind, 1)
ticker.mode.remove_revolutionary(mind, 1)
+ ticker.mode.remove_thrall(mind,0)
+ ticker.mode.remove_shadowling(mind)
..()
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/robot/login.dm b/code/modules/mob/living/silicon/robot/login.dm
index df9f6e050e5..84b31b16766 100644
--- a/code/modules/mob/living/silicon/robot/login.dm
+++ b/code/modules/mob/living/silicon/robot/login.dm
@@ -2,6 +2,8 @@
..()
regenerate_icons()
show_laws(0)
+ if(mind) ticker.mode.remove_cultist(mind)
if(mind) ticker.mode.remove_revolutionary(mind)
if(mind) ticker.mode.remove_thrall(mind,0)
+ if(mind) ticker.mode.remove_shadowling(mind)
return
\ No newline at end of file