mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
Merge pull request #18132 from GunHog/Aimed_Spit_For_Mista_Jay
Aimed Neurotoxin Spit
This commit is contained in:
@@ -190,26 +190,55 @@ Doesn't work on other aliens/AI.*/
|
||||
/obj/effect/proc_holder/alien/neurotoxin
|
||||
name = "Spit Neurotoxin"
|
||||
desc = "Spits neurotoxin at someone, paralyzing them for a short time."
|
||||
plasma_cost = 50
|
||||
action_icon_state = "alien_neurotoxin"
|
||||
action_icon_state = "alien_neurotoxin_0"
|
||||
var/active = 0
|
||||
|
||||
/obj/effect/proc_holder/alien/neurotoxin/fire(mob/living/carbon/alien/user)
|
||||
user.visible_message("<span class='danger'>[user] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
|
||||
/obj/effect/proc_holder/alien/neurotoxin/fire(mob/living/carbon/user)
|
||||
if(active)
|
||||
user.ranged_ability = null
|
||||
user << "<span class='notice'>You empty your neurotoxin gland.</span>"
|
||||
active = 0
|
||||
else if(user.ranged_ability && user.ranged_ability != src)
|
||||
user << "<span class='warning'>You already have another aimed ability readied! Cancel it first."
|
||||
return
|
||||
else
|
||||
user.ranged_ability = src
|
||||
active = 1
|
||||
user << "<span class='notice'>You prepare your neurotoxin gland. <B>Left-click to fire at a target!</B></span>"
|
||||
|
||||
user.client.click_intercept = user.ranged_ability
|
||||
action.button_icon_state = "alien_neurotoxin_[active]"
|
||||
action.UpdateButtonIcon()
|
||||
|
||||
/obj/effect/proc_holder/alien/neurotoxin/InterceptClickOn(mob/living/carbon/user, params, atom/target)
|
||||
var/p_cost = 50
|
||||
if(!iscarbon(user) || user.lying || user.stat)
|
||||
return
|
||||
user.next_click = world.time + 6
|
||||
user.face_atom(target)
|
||||
if(user.getPlasma() < p_cost)
|
||||
user << "<span class='warning'>You need at least [p_cost] plasma to spit.</span>"
|
||||
return
|
||||
|
||||
var/turf/T = user.loc
|
||||
var/turf/U = get_step(user, user.dir) // Get the tile infront of the move, based on their direction
|
||||
if(!isturf(U) || !isturf(T))
|
||||
return 0
|
||||
|
||||
user.visible_message("<span class='danger'>[user] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
|
||||
var/obj/item/projectile/bullet/neurotoxin/A = new /obj/item/projectile/bullet/neurotoxin(user.loc)
|
||||
A.current = U
|
||||
A.yo = U.y - T.y
|
||||
A.xo = U.x - T.x
|
||||
A.preparePixelProjectile(target, get_turf(target), user, params)
|
||||
A.fire()
|
||||
user.newtonian_move(get_dir(U, T))
|
||||
user.adjustPlasma(-p_cost)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/effect/proc_holder/alien/neurotoxin/on_lose(mob/living/carbon/user)
|
||||
if(user.ranged_ability == src)
|
||||
user.ranged_ability = null
|
||||
|
||||
|
||||
/obj/effect/proc_holder/alien/resin
|
||||
name = "Secrete Resin"
|
||||
|
||||
@@ -69,4 +69,5 @@
|
||||
var/mob/living/mental_dominator //The person controlling the mind of this person, if applicable
|
||||
var/mob/living/mind_control_holder/mind_control_holder //If the mob is being mind controlled, where their old mind is stored (check clock_mobs.dm)
|
||||
|
||||
var/blood_volume = 0 //how much blood the mob has
|
||||
var/blood_volume = 0 //how much blood the mob has
|
||||
var/obj/effect/proc_holder/ranged_ability //Any ranged ability the mob has, as a click override
|
||||
|
||||
@@ -17,3 +17,6 @@
|
||||
if(ventcrawler)
|
||||
src << "<span class='notice'>You can ventcrawl! Use alt+click on vents to quickly travel about the station.</span>"
|
||||
|
||||
if(ranged_ability)
|
||||
client.click_intercept = ranged_ability
|
||||
src << "<span class='notice'>You currently have <b>[ranged_ability.name]</b> active!</span>"
|
||||
@@ -1,4 +1,4 @@
|
||||
/mob/living/Logout()
|
||||
..()
|
||||
if(!key && mind) //key and mind have become seperated.
|
||||
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
|
||||
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
|
||||
@@ -71,4 +71,5 @@
|
||||
if(AA)
|
||||
AA.display_to(list(src))
|
||||
|
||||
update_client_colour()
|
||||
update_client_colour()
|
||||
client.click_intercept = null
|
||||
@@ -6,6 +6,10 @@
|
||||
|
||||
var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin verb for now
|
||||
|
||||
/obj/effect/proc_holder/proc/InterceptClickOn(mob/user, params, atom/A)
|
||||
return
|
||||
|
||||
|
||||
/obj/effect/proc_holder/spell
|
||||
name = "Spell"
|
||||
desc = "A wizard spell"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 83 KiB |
Reference in New Issue
Block a user