Fixes borers and antag spawning. (#7917)

Fixed bughunt for real.
    Bughunt now tries to spawn four mercenaries and two borers.
    Added some more intro text to Renegade.
This commit is contained in:
Matt Atlas
2020-01-05 11:39:42 +02:00
committed by Erki
parent 00df6c634a
commit e25dbf0f27
13 changed files with 133 additions and 85 deletions
@@ -39,7 +39,7 @@
var/obj/item/organ/external/head = get_organ(BP_HEAD)
var/mob/living/simple_animal/borer/B
if (head)
if(head)
for(var/I in head.implants)
if(istype(I,/mob/living/simple_animal/borer))
B = I
@@ -47,7 +47,7 @@
if(!B.ckey && ckey && B.controlling)
B.ckey = ckey
B.controlling = 0
if(B.host_brain.ckey)
if(B.host_brain?.ckey)
ckey = B.host_brain.ckey
B.host_brain.ckey = null
B.host_brain.name = "host brain"
@@ -1714,7 +1714,7 @@
/mob/living/carbon/human/proc/get_traumas()
. = list()
var/obj/item/organ/internal/brain/B = internal_organs_by_name[BP_BRAIN]
if(istype(B, /obj/item/organ/borer))
if(istype(B, /obj/item/organ/internal/borer))
return
if(B && should_have_organ(BP_BRAIN) && !isipc(src))
. = B.traumas
@@ -31,7 +31,6 @@
var/truename // Name used for brainworm-speak.
var/mob/living/captive_brain/host_brain // Used for swapping control of the body back and forth.
var/controlling // Used in human death check.
var/docile = 0 // Sugar can stop borers from acting.
var/has_reproduced
var/roundstart
@@ -59,32 +58,10 @@
..()
if(host)
if(!stat && !host.stat)
if(host.reagents.has_reagent("sugar"))
if(!docile)
if(controlling)
to_chat(host, span("notice", "You feel the soporific flow of sugar in your host's blood, lulling you into docility."))
else
to_chat(src, span("notice", "You feel the soporific flow of sugar in your host's blood, lulling you into docility."))
docile = TRUE
else
if(docile)
if(controlling)
to_chat(host, span("notice", "You shake off your lethargy as the sugar leaves your host's blood."))
else
to_chat(src, span("notice", "You shake off your lethargy as the sugar leaves your host's blood."))
docile = FALSE
if(chemicals < 250)
chemicals++
if(controlling)
if(docile)
to_chat(host, span("notice", "You are feeling far too docile to continue controlling your host..."))
host.release_control()
return
if(prob(host.getBrainLoss()/20))
host.say("*[pick(list("blink","blink_r","choke","drool","twitch","twitch_s","gasp"))]")
if(controlling && prob(host.getBrainLoss()/20))
host.say("*[pick(list("blink","blink_r","choke","drool","twitch","twitch_s","gasp"))]")
/mob/living/simple_animal/borer/Stat()
..()
@@ -109,7 +86,10 @@
controlling = FALSE
host.remove_language("Cortical Link")
host.remove_language(LANGUAGE_BORER)
host.remove_language(LANGUAGE_BORER_HIVEMIND)
to_chat(host, "<span class='notice'>You feel your nerves again as your control over your own body is restored.</span>")
host.verbs -= /mob/living/carbon/proc/release_control
host.verbs -= /mob/living/carbon/proc/punish_host
host.verbs -= /mob/living/carbon/proc/spawn_larvae
@@ -9,9 +9,6 @@
if(stat)
to_chat(src, span("notice", "You cannot leave your host in your current state."))
return
if(docile)
to_chat(src, span("notice", "You are feeling far too docile to do that."))
return
to_chat(src, span("notice", "You begin disconnecting from [host]'s synapses and prodding at their internal ear canal."))
@@ -140,9 +137,6 @@
if(host.stat != DEAD)
to_chat(src, span("warning", "Your host is still alive."))
return
if(docile)
to_chat(src, span("warning", "You are feeling far too docile to do that."))
return
to_chat(src, span("danger", "It only takes a few moments to render the dead brain down into a nutrient-rich slurry..."))
replace_brain()
@@ -157,7 +151,8 @@
to_chat(src, span("warning", "You settle into the empty brainpan and begin to expand, fusing inextricably with the dead flesh of [H]."))
H.add_language("Cortical Link")
H.add_language(LANGUAGE_BORER)
H.add_language(LANGUAGE_BORER_HIVEMIND)
if(host.stat == DEAD)
H.verbs |= /mob/living/carbon/human/proc/jumpstart
@@ -173,11 +168,11 @@
src.mind.special_role = "Borer Husk"
src.mind.transfer_to(host)
var/obj/item/organ/borer/B = new(H)
H.internal_organs_by_name[BP_BRAIN] = B
H.internal_organs |= B
var/obj/item/organ/internal/borer/B = new(H)
var/obj/item/organ/external/affecting = H.get_organ(BP_HEAD)
H.internal_organs_by_name[BP_BRAIN] = B
affecting.internal_organs |= B
affecting.implants -= src
var/s2h_id = src.computer_id
@@ -206,16 +201,13 @@
if(stat)
to_chat(src, span("notice", "You cannot secrete chemicals in your current state."))
return
if(docile)
to_chat(src, span("notice", "You are feeling far too docile to do that."))
return
if(chemicals < 20)
to_chat(src, span("warning", "You don't have enough chemicals!"))
return
var/chem = input("Select a chemical to secrete.", "Chemicals") as null|anything in list("Inaprovaline", "Bicaridine", "Hyperzine", "Synaptizine", "Peridaxon", "Tramadol", "Oxycodone", "Fluvoxamine")
if(!chem || docile || chemicals < 20 || !host || controlling || !src || stat) //Sanity check.
if(!chem || chemicals < 20 || !host || controlling || !src || stat) //Sanity check.
return
to_chat(src, span("notice", "You squirt a measure of [chem] from your reservoirs into [host]'s bloodstream."))
@@ -247,7 +239,7 @@
to_chat(src, span("notice", "You cannot use that ability again so soon."))
return
var/mob/living/carbon/M = input(src,"Who do you wish to dominate?") in null|choices
var/mob/living/carbon/M = input(src, "Who do you wish to dominate?") in null|choices
if(!M || !src)
return
@@ -275,9 +267,6 @@
if(src.stat)
to_chat(src, span("notice", "You cannot do that in your current state."))
return
if(docile)
to_chat(src, span("notice", "You are feeling far too docile to do that."))
return
to_chat(src, span("warning", "You begin delicately adjusting your connection to the host brain..."))
to_chat(host, span("warning", "You feel a tingling sensation at the back of your head."))
@@ -290,7 +279,8 @@
to_chat(src, span("danger", "You plunge your probosci deep into the cortex of the host brain, interfacing directly with their nervous system."))
to_chat(host, span("danger", "You feel a strange shifting sensation behind your eyes as an alien consciousness displaces yours."))
host.add_language("Cortical Link")
host.add_language(LANGUAGE_BORER)
host.add_language(LANGUAGE_BORER_HIVEMIND)
// host -> brain
var/h2b_id = host.computer_id
@@ -425,9 +415,6 @@
if(stat)
to_chat(src, span("notice", "You cannot do that in your current state."))
return
if(docile)
to_chat(src, span("notice", "You are feeling far too docile to do that."))
return
if(chemicals < 100)
to_chat(src, span("warning", "You don't have enough chemicals!"))
return
@@ -455,9 +442,6 @@
if(stat)
to_chat(src, span("notice", "You cannot do that in your current state."))
return
if(docile)
to_chat(src, span("notice", "You are feeling far too docile to do that."))
return
if(chemicals < 75)
to_chat(src, span("warning", "You don't have enough chemicals!"))
return
+1 -1
View File
@@ -166,7 +166,7 @@
/obj/item/organ/internal/brain/proc/brain_damage_callback(var/damage) //Confuse them as a somewhat uncommon aftershock. Side note: Only here so a spawn isn't used. Also, for the sake of a unique timer.
to_chat(owner, "<span class = 'notice' font size='10'><B>I can't remember which way is forward...</B></span>")
owner.confused += damage
owner?.confused += damage
/obj/item/organ/internal/brain/proc/handle_severe_brain_damage()
set waitfor = FALSE
+2 -2
View File
@@ -1,5 +1,5 @@
// This borer is the worm that replaced the host's brain, not the brainworm latched onto a brain
/obj/item/organ/borer
/obj/item/organ/internal/borer
name = "cortical borer"
icon = 'icons/obj/objects.dmi'
icon_state = "borer"
@@ -8,7 +8,7 @@
parent_organ = BP_HEAD
vital = TRUE
/obj/item/organ/borer/removed(var/mob/living/user)
/obj/item/organ/internal/borer/removed(var/mob/living/user)
..()
var/mob/living/simple_animal/borer/B = owner.has_brain_worms()