diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index ba8718d0239..f57e26f5463 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1302,4 +1302,52 @@ mob/living/carbon/human/yank_out_object() B.host_brain.name = "host brain" B.host_brain.real_name = "host brain" - verbs -= /mob/living/carbon/human/proc/release_control \ No newline at end of file + verbs -= /mob/living/carbon/human/proc/release_control + verbs -= /mob/living/carbon/human/proc/punish_host + verbs -= /mob/living/carbon/human/proc/spawn_larvae + +//Brain slug proc for tormenting the host. +/mob/living/carbon/human/proc/punish_host() + set category = "Alien" + set name = "Torment host" + set desc = "Punish your host with agony." + + 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.host_brain.ckey) + src << "\red You send a punishing spike of psychic agony lancing into your host's brain." + B.host_brain << "\red Horrific, burning agony lances through you, ripping a soundless scream from your trapped mind!" + +/mob/living/carbon/human/proc/spawn_larvae() + set category = "Alien" + set name = "Reproduce" + set desc = "Spawn several young." + + 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.chemicals >= 100) + src << "\red Your host twitches and quivers as you rapdly excrete several larvae from your sluglike body." + visible_message("\red [src] heaves violently, expelling a rush of vomit and a wriggling, sluglike creature!") + B.chemicals -= 100 + + new /obj/effect/decal/cleanable/vomit(get_turf(src)) + playsound(loc, 'sound/effects/splat.ogg', 50, 1) + new /mob/living/simple_animal/borer(get_turf(src)) + + else + src << "You do not have enough chemicals stored to reproduce." + return \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/borer.dm b/code/modules/mob/living/simple_animal/borer.dm index c0354ed07e5..3dff4b7bde2 100644 --- a/code/modules/mob/living/simple_animal/borer.dm +++ b/code/modules/mob/living/simple_animal/borer.dm @@ -39,17 +39,34 @@ friendly = "prods" wander = 0 + var/chemicals = 10 // Chemicals used for reproduction and spitting neurotoxin. var/mob/living/carbon/human/host // Human host for the brain worm. var/truename // Name used for brainworm-speak. var/bonded // Var for full bonding with the host brain. var/mob/living/captive_brain/host_brain // Used for swapping control of the body back and forth. var/controlling // Used in human death check. +/mob/living/simple_animal/borer/Life() + + ..() + if(host) + if(!stat && !host.stat && chemicals < 250) + chemicals++ + /mob/living/simple_animal/borer/New() ..() truename = "[pick("Primary","Secondary","Tertiary","Quaternary")] [rand(1000,9999)]" host_brain = new/mob/living/captive_brain(src) + for(var/mob/M in player_list) + if(istype(M,/mob/dead/observer)) + var/mob/dead/observer/O = M + if(O.client) + if(O.client.prefs.be_special & BE_ALIEN) + src.ckey = O.ckey + break + + /mob/living/simple_animal/borer/say(var/message) message = trim(copytext(sanitize(message), 1, MAX_MESSAGE_LEN)) @@ -120,6 +137,8 @@ controlling = 1 host.verbs += /mob/living/carbon/human/proc/release_control + host.verbs += /mob/living/carbon/human/proc/punish_host + host.verbs += /mob/living/carbon/human/proc/spawn_larvae mob/living/simple_animal/borer/verb/release_host() set category = "Alien" @@ -165,6 +184,10 @@ mob/living/simple_animal/borer/proc/detatch() src.loc = get_turf(host) controlling = 0 + host.verbs -= /mob/living/carbon/human/proc/release_control + host.verbs -= /mob/living/carbon/human/proc/punish_host + host.verbs -= /mob/living/carbon/human/proc/spawn_larvae + if(host_brain.ckey) src.ckey = host.ckey host.ckey = host_brain.ckey diff --git a/code/modules/mob/screen.dm b/code/modules/mob/screen.dm index 22775a6c8cd..a2299d63c72 100644 --- a/code/modules/mob/screen.dm +++ b/code/modules/mob/screen.dm @@ -611,12 +611,12 @@ var/mob/living/simple_animal/borer/B = src.loc var/mob/living/captive_brain/H = src - H << "\red You begin doggedly resisting the parasite's control." + H << "\red You begin doggedly resisting the parasite's control (this will take approximately sixty seconds)." B.host << "\red You feel the captive mind of [src] begin to resist your control." - spawn(50) + spawn(rand(400,500)) - if(!B || !H || !H.ckey) + if(!B || !B.controlling) return H << "\red With an immense exertion of will, you regain control of your body!"