Merge pull request #2306 from hornygranny/alienspit

Code by Giacom. Changes alien neurotoxin spit to dumbfire.
This commit is contained in:
Cheridan
2014-01-12 23:42:36 -08:00
3 changed files with 20 additions and 29 deletions
@@ -112,38 +112,21 @@ Doesn't work on other aliens/AI.*/
return
/mob/living/carbon/alien/humanoid/proc/neurotoxin(mob/target as mob in oview())
/mob/living/carbon/alien/humanoid/proc/neurotoxin() // ok
set name = "Spit Neurotoxin (50)"
set desc = "Spits neurotoxin at someone, paralyzing them for a short time."
set category = "Alien"
if(powerc(50))
if(isalien(target))
src << "\green Your allies are not a valid target."
return
adjustToxLoss(-50)
src << "\green You spit neurotoxin at [target]."
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << "\red [src] spits neurotoxin at [target]!"
//I'm not motivated enough to revise this. Prjectile code in general needs update.
src.visible_message("\red [src] spits neurotoxin!", "\green You spit neurotoxin.")
var/turf/T = loc
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
if(!U || !T)
return
while(U && !istype(U,/turf))
U = U.loc
if(!istype(T, /turf))
return
if (U == T)
usr.bullet_act(src, get_organ_target())
return
if(!istype(U, /turf))
var/turf/U = get_step(src, dir) // Get the tile infront of the move, based on their direction
if(!isturf(U) || !isturf(T))
return
var/obj/item/projectile/energy/neurotoxin/A = new /obj/item/projectile/energy/neurotoxin(usr.loc)
var/obj/item/projectile/bullet/neurotoxin/A = new /obj/item/projectile/bullet/neurotoxin(usr.loc)
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
@@ -102,3 +102,15 @@
name = "syringe"
icon = 'icons/obj/chemical.dmi'
icon_state = "syringeproj"
/obj/item/projectile/bullet/neurotoxin
name = "neurotoxin spit"
icon_state = "neurotoxin"
damage = 5
damage_type = TOX
weaken = 5
/obj/item/projectile/bullet/neurotoxin/on_hit(var/atom/target, var/blocked = 0)
if(isalien(target))
return 0
..() // Execute the rest of the code.
@@ -52,12 +52,8 @@
damage = 20
/obj/item/projectile/energy/neurotoxin
name = "neuro"
icon_state = "neurotoxin"
damage = 5
damage_type = TOX
weaken = 5