Fixes mindswap book runtime (#37881)

This commit is contained in:
ShizCalev
2018-05-19 06:31:43 -04:00
committed by letterjay
parent bfcaceb4e1
commit 4e4e07e8bb
2 changed files with 23 additions and 13 deletions

View File

@@ -208,12 +208,13 @@
if(stored_swap == user)
to_chat(user,"<span class='notice'>You stare at the book some more, but there doesn't seem to be anything else to learn...</span>")
return
var/obj/effect/proc_holder/spell/targeted/mind_transfer/swapper = new
swapper.cast(user, stored_swap, TRUE)
if(swapper.cast(list(stored_swap), user, TRUE, TRUE))
to_chat(user,"<span class='warning'>You're suddenly somewhere else... and someone else?!</span>")
to_chat(stored_swap,"<span class='warning'>Suddenly you're staring at [src] again... where are you, who are you?!</span>")
else
user.visible_message("<span class='warning'>[src] fizzles slightly as it stops glowing!</span>") //if the mind_transfer failed to transfer mobs, likely due to the target being catatonic.
to_chat(stored_swap,"<span class='warning'>You're suddenly somewhere else... and someone else?!</span>")
to_chat(user,"<span class='warning'>Suddenly you're staring at [src] again... where are you, who are you?!</span>")
stored_swap = null
/obj/item/book/granter/spell/forcewall