borer fixes

This commit is contained in:
Ty-Omaha
2018-10-14 20:46:31 -04:00
parent 0f78bf636c
commit 6020c9a794
+27 -5
View File
@@ -91,6 +91,7 @@
)
var/talk_inside_host = FALSE // So that borers don't accidentally give themselves away on a botched message
var/used_dominate
var/input_open = FALSE // To prevent people from spam opening the Dominate Victim input
var/chemicals = 10 // Chemicals used for reproduction and chemical injection.
var/max_chems = 250
var/mob/living/carbon/human/host // Human host for the brain worm.
@@ -471,7 +472,7 @@
set category = "Borer"
set name = "Dominate Victim"
set desc = "Freeze the limbs of a potential host with supernatural fear."
if(world.time - used_dominate < 150)
to_chat(src, "You cannot use that ability again so soon.")
return
@@ -483,23 +484,43 @@
if(stat)
to_chat(src, "You cannot do that in your current state.")
return
if(input_open)
to_chat(src, "You're already targetting someone!")
return
var/list/choices = list()
for(var/mob/living/carbon/C in view(3,src))
if(C.stat != DEAD)
choices += C
if(world.time - used_dominate < 300)
to_chat(src, "You cannot use that ability again so soon.")
return
input_open = TRUE
var/mob/living/carbon/M = input(src,"Who do you wish to dominate?") in null|choices
if(!M || !src)
if(!M)
input_open = FALSE
return
if(!src) //different statement to avoid a runtime since if the source is deleted then input_open would also be deleted
return
if(M.has_brain_worms())
to_chat(src, "You cannot dominate someone who is already infested!")
input_open = FALSE
return
if(stat == DEAD)
input_open = FALSE
return
if(get_dist(src, M) > 7) //to avoid people remotely doing from across the map etc, 7 is the default view range
to_chat(src, "<span class='warning'>You're too far away!</span>")
input_open = FALSE
return
to_chat(src, "<span class='warning'>You focus your psychic lance on [M] and freeze [M.p_their()] limbs with a wave of terrible dread.</span>")
@@ -507,6 +528,7 @@
M.Weaken(3)
used_dominate = world.time
input_open = FALSE
/mob/living/simple_animal/borer/verb/release_host()
set category = "Borer"