Borer removal, control, release of control, host death.

This commit is contained in:
Zuhayr
2013-08-09 18:10:55 -07:00
parent 4a4249fd6e
commit 7aa8d00e70
4 changed files with 80 additions and 1 deletions
@@ -54,6 +54,25 @@
dizziness = 0
jitteriness = 0
//Handle brain slugs.
var/datum/organ/external/head = get_organ("head")
var/mob/living/simple_animal/borer/B
for(var/I in head.implants)
if(istype(I,/mob/living/simple_animal/borer))
B = I
if(B)
if(!B.ckey && ckey && B.controlling)
B.ckey = ckey
B.controlling = 0
if(B.host_brain.ckey)
ckey = B.host_brain.ckey
B.host_brain.ckey = null
B.host_brain.name = "host brain"
B.host_brain.real_name = "host brain"
verbs -= /mob/living/carbon/human/proc/release_control
//Check for heist mode kill count.
if(ticker.mode && ( istype( ticker.mode,/datum/game_mode/heist) ) )
//Check for last assailant's mutantrace.
@@ -1274,3 +1274,32 @@ mob/living/carbon/human/yank_out_object()
return 1
else
return 0
//Brain slug proc for voluntary removal of control.
/mob/living/carbon/human/proc/release_control()
set category = "Alien"
set name = "Release Control"
set desc = "Release control of your host's body."
var/datum/organ/external/head = get_organ("head")
var/mob/living/simple_animal/borer/B
for(var/I in head.implants)
if(istype(I,/mob/living/simple_animal/borer))
B = I
if(!B)
return
if(!B.ckey && ckey && B.controlling)
src << "\red <B>You withdraw your probosci, releasing control of [B.host_brain]</B>"
B.host_brain << "\red <B>Your vision swims as the alien parasite releases control of your body.</B>"
B.ckey = ckey
B.controlling = 0
if(B.host_brain.ckey)
ckey = B.host_brain.ckey
B.host_brain.ckey = null
B.host_brain.name = "host brain"
B.host_brain.real_name = "host brain"
verbs -= /mob/living/carbon/human/proc/release_control
+26
View File
@@ -606,6 +606,32 @@
var/mob/living/L = usr
//Resisting control by an alien mind.
if(istype(src.loc,/mob/living/simple_animal/borer))
var/mob/living/simple_animal/borer/B = src.loc
var/mob/living/captive_brain/H = src
H << "\red <B>You begin doggedly resisting the parasite's control.</B>"
B.host << "\red <B>You feel the captive mind of [src] begin to resist your control.</B>"
spawn(50)
if(!B || !H || !H.ckey)
return
H << "\red <B>With an immense exertion of will, you regain control of your body!</B>"
B.host << "\red <B>You feel control of the host brain ripped from your grasp, and retract your probosci before the wild neural impulses can damage you.</b>"
B.controlling = 0
B.ckey = B.host.ckey
B.host.ckey = H.ckey
H.ckey = null
H.name = "host brain"
H.real_name = "host brain"
return
//resisting grabs (as if it helps anyone...)
if ((!( L.stat ) && L.canmove && !( L.restrained() )))
var/resisting = 0
+6 -1
View File
@@ -166,7 +166,7 @@
if (affected.implants.len)
var/obj/item/weapon/obj = affected.implants[1]
var/obj/item/obj = affected.implants[1]
if(istype(obj,/obj/item/weapon/implant))
var/obj/item/weapon/implant/imp = obj
@@ -181,6 +181,11 @@
user.visible_message("\blue [user] takes something out of incision on [target]'s [affected.display_name] with \the [tool].", \
"\blue You take [obj] out of incision on [target]'s [affected.display_name]s with \the [tool]." )
affected.implants -= obj
//Handle possessive brain borers.
if(istype(obj,/mob/living/simple_animal/borer))
target.release_control()
obj.loc = get_turf(target)
if(istype(obj,/obj/item/weapon/implant))
var/obj/item/weapon/implant/imp = obj