Tweaks Xenomorph spitting. (#3852)

* Tweaks Xenomorph spitting.

* Swap 'them' for 'the target'. ..Also fixes the mismatched costs.

* Swaps 'them' for 'the target'. Also, in-progress fixing phoron costs of acid.

* Fixes the acid phoron cost. Because Git wasn't playing nice. AAAAAAA.

* Swaps a long line out for a small check.
This commit is contained in:
Mechoid
2017-09-18 09:03:04 -07:00
committed by Anewbe
parent e94e375cd5
commit 17dfae4020
6 changed files with 66 additions and 30 deletions

View File

@@ -38,7 +38,6 @@
* mob/RangedAttack(atom,params) - used only ranged, only used for tk and laser eyes but could be changed
*/
/mob/proc/ClickOn(var/atom/A, var/params)
if(world.time <= next_click) // Hard check, before anything else, to avoid crashing
return

View File

@@ -29,7 +29,8 @@
return
/mob/living/carbon/human/RangedAttack(var/atom/A)
if(!gloves && !mutations.len) return
if(!gloves && !mutations.len && !spitting)
return
var/obj/item/clothing/gloves/G = gloves
if((LASER in mutations) && a_intent == I_HURT)
LaserEyes(A) // moved into a proc below
@@ -40,6 +41,9 @@
else if(TK in mutations)
A.attack_tk(src)
else if(spitting) //Only used by xenos right now, can be expanded.
Spit(A)
/mob/living/RestrainedClickOn(var/atom/A)
return

View File

@@ -10,6 +10,11 @@
var/obj/item/weapon/rig/wearing_rig // This is very not good, but it's much much better than calling get_rig() every update_canmove() call.
var/last_push_time //For human_attackhand.dm, keeps track of the last use of disarm
var/spitting = 0 //Spitting and spitting related things. Any human based ranged attacks, be it innate or added abilities.
var/spit_projectile = null //Projectile type.
var/spit_name = null //String
var/last_spit = 0 //Timestamp.
/mob/living/carbon/human/New(var/new_loc, var/new_species = null)
if(!dna)

View File

@@ -124,6 +124,29 @@
new /obj/effect/alien/weeds/node(loc)
return
/mob/living/carbon/human/proc/Spit(var/atom/A)
if((last_spit + 1 SECONDS) > world.time) //To prevent YATATATATATAT spitting.
to_chat(src, "<span class='warning'>You have not yet prepared your chemical glands. You must wait before spitting again.</span>")
return
else
last_spit = world.time
if(spitting && incapacitated(INCAPACITATION_DISABLED))
to_chat(src, "You cannot spit in your current state.")
spitting = 0
return
else if(spitting)
if(!check_alien_ability(20,0,O_ACID))
spitting = 0
return
visible_message("<span class='warning'>[src] spits [spit_name] at \the [A]!</span>", "<span class='alium'>You spit [spit_name] at \the [A].</span>")
var/obj/item/projectile/P = new spit_projectile(get_turf(src))
P.firer = src
P.launch(A)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 0)
else
..()
/mob/living/carbon/human/proc/corrosive_acid(O as obj|turf in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
set name = "Corrosive Acid (200)"
set desc = "Drench an object in acid, destroying it over time."
@@ -160,43 +183,47 @@
return
/mob/living/carbon/human/proc/neurotoxin(mob/target as mob in oview())
set name = "Spit Neurotoxin (40)"
set desc = "Spits neurotoxin at someone, paralyzing them for a short time if they are not wearing protective gear."
/mob/living/carbon/human/proc/neurotoxin()
set name = "Toggle Neurotoxic Spit (40)"
set desc = "Readies a neurotoxic spit, which paralyzes the target for a short time if they are not wearing protective gear."
set category = "Abilities"
if(spitting)
to_chat(src, "<span class='alium'>You stop preparing to spit.</span>")
spitting = 0
return
if(!check_alien_ability(40,0,O_ACID))
spitting = 0
return
if(stat || paralysis || stunned || weakened || lying || restrained() || buckled)
src << "You cannot spit neurotoxin in your current state."
return
else
last_spit = world.time
spitting = 1
spit_projectile = /obj/item/projectile/energy/neurotoxin
spit_name = "neurotoxin"
to_chat(src, "<span class='alium'>You prepare to spit neurotoxin.</span>")
visible_message("<span class='warning'>[src] spits neurotoxin at [target]!</span>", "<span class='alium'>You spit neurotoxin at [target].</span>")
var/obj/item/projectile/energy/neurotoxin/A = new(get_turf(src))
A.firer = src
A.launch(target)
return
/mob/living/carbon/human/proc/acidspit(mob/target as mob in oview())
set name = "Spit Acid (50)"
set desc = "Spits a blob of acid at someone, burning them if they are not wearing protective gear."
/mob/living/carbon/human/proc/acidspit()
set name = "Toggle Acid Spit (50)"
set desc = "Readies an acidic spit, which burns the target if they are not wearing protective gear."
set category = "Abilities"
if(spitting)
to_chat(src, "<span class='alium'>You stop preparing to spit.</span>")
spitting = 0
return
if(!check_alien_ability(50,0,O_ACID))
spitting = 0
return
if(stat || paralysis || stunned || weakened || lying || restrained() || buckled)
src << "You cannot spit acid in your current state."
return
visible_message("<span class='warning'>[src] spits acid at [target]!</span>", "<span class='alium'>You spit acid at [target].</span>")
var/obj/item/projectile/energy/acid/A = new(get_turf(src))
A.firer = src
A.launch(target)
return
else
last_spit = world.time
spitting = 1
spit_projectile = /obj/item/projectile/energy/acid
spit_name = "acid"
to_chat(src, "<span class='alium'>You prepare to spit acid.</span>")
/mob/living/carbon/human/proc/resin() // -- TLE
set name = "Secrete Resin (75)"

View File

@@ -11,7 +11,7 @@
has_fine_manipulation = 0
siemens_coefficient = 0
gluttonous = 3
gluttonous = 2
brute_mod = 0.5 // Hardened carapace.
burn_mod = 2 // Weak to fire.
@@ -200,7 +200,6 @@
..()
/datum/species/xenos/hunter
name = "Xenomorph Hunter"
weeds_plasma_rate = 5
caste_name = "hunter"

View File

@@ -16,10 +16,12 @@ proc/create_new_xenomorph(var/alien_caste,var/target)
h_style = "Bald"
faction = "xeno"
..(new_loc, "Xenomorph Sentinel")
/mob/living/carbon/human/xhunter/New(var/new_loc)
h_style = "Bald"
faction = "xeno"
..(new_loc, "Xenomorph Hunter")
/mob/living/carbon/human/xqueen/New(var/new_loc)
h_style = "Bald"
faction = "xeno"