|
|
|
@@ -4,18 +4,47 @@ These are general powers. Specific powers are stored under the appropriate alien
|
|
|
|
|
|
|
|
|
|
/*Alien spit now works like a taser shot. It won't home in on the target but will act the same once it does hit.
|
|
|
|
|
Doesn't work on other aliens/AI.*/
|
|
|
|
|
|
|
|
|
|
/datum/action/spell_action/alien
|
|
|
|
|
|
|
|
|
|
/datum/action/spell_action/alien/UpdateName()
|
|
|
|
|
var/obj/effect/proc_holder/alien/ab = target
|
|
|
|
|
return ab.name
|
|
|
|
|
|
|
|
|
|
/datum/action/spell_action/alien/IsAvailable()
|
|
|
|
|
if(!target)
|
|
|
|
|
return 0
|
|
|
|
|
var/obj/effect/proc_holder/alien/ab = target
|
|
|
|
|
|
|
|
|
|
if(usr)
|
|
|
|
|
return ab.cost_check(ab.check_turf,usr,1)
|
|
|
|
|
else
|
|
|
|
|
if(owner)
|
|
|
|
|
return ab.cost_check(ab.check_turf,owner,1)
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
|
/datum/action/spell_action/alien/CheckRemoval()
|
|
|
|
|
return !isalien(owner)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/obj/effect/proc_holder/alien
|
|
|
|
|
name = "Alien Power"
|
|
|
|
|
panel = "Alien"
|
|
|
|
|
var/plasma_cost = 0
|
|
|
|
|
var/check_turf = 0
|
|
|
|
|
|
|
|
|
|
var/has_action = 1
|
|
|
|
|
var/datum/action/spell_action/alien/action = null
|
|
|
|
|
var/action_icon = 'icons/mob/actions.dmi'
|
|
|
|
|
var/action_icon_state = "spell_default"
|
|
|
|
|
var/action_background_icon_state = "bg_alien"
|
|
|
|
|
|
|
|
|
|
/obj/effect/proc_holder/alien/Click()
|
|
|
|
|
if(!istype(usr,/mob/living/carbon/alien))
|
|
|
|
|
return 1
|
|
|
|
|
var/mob/living/carbon/alien/user = usr
|
|
|
|
|
if(cost_check(check_turf,user))
|
|
|
|
|
if(fire(user))
|
|
|
|
|
if(fire(user) && user) // Second check to prevent runtimes when evolving
|
|
|
|
|
user.adjustToxLoss(-plasma_cost)
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
@@ -25,15 +54,18 @@ Doesn't work on other aliens/AI.*/
|
|
|
|
|
/obj/effect/proc_holder/alien/proc/fire(var/mob/living/carbon/alien/user)
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
|
/obj/effect/proc_holder/alien/proc/cost_check(check_turf=0,var/mob/living/carbon/alien/user)
|
|
|
|
|
/obj/effect/proc_holder/alien/proc/cost_check(check_turf=0,var/mob/living/carbon/alien/user,var/silent = 0)
|
|
|
|
|
if(user.stat)
|
|
|
|
|
user << "<span class='noticealien'>You must be conscious to do this.</span>"
|
|
|
|
|
if(!silent)
|
|
|
|
|
user << "<span class='noticealien'>You must be conscious to do this.</span>"
|
|
|
|
|
return 0
|
|
|
|
|
if(user.getPlasma() < plasma_cost)
|
|
|
|
|
user << "<span class='noticealien'>Not enough plasma stored.</span>"
|
|
|
|
|
if(!silent)
|
|
|
|
|
user << "<span class='noticealien'>Not enough plasma stored.</span>"
|
|
|
|
|
return 0
|
|
|
|
|
if(check_turf && (!isturf(user.loc) || istype(user.loc, /turf/space)))
|
|
|
|
|
user << "<span class='noticealien'>Bad place for a garden!</span>"
|
|
|
|
|
if(!silent)
|
|
|
|
|
user << "<span class='noticealien'>Bad place for a garden!</span>"
|
|
|
|
|
return 0
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
@@ -43,6 +75,8 @@ Doesn't work on other aliens/AI.*/
|
|
|
|
|
plasma_cost = 50
|
|
|
|
|
check_turf = 1
|
|
|
|
|
|
|
|
|
|
action_icon_state = "alien_plant"
|
|
|
|
|
|
|
|
|
|
/obj/effect/proc_holder/alien/plant/fire(var/mob/living/carbon/alien/user)
|
|
|
|
|
if(locate(/obj/structure/alien/weeds/node) in get_turf(user))
|
|
|
|
|
src << "There's already a weed node here."
|
|
|
|
@@ -57,6 +91,8 @@ Doesn't work on other aliens/AI.*/
|
|
|
|
|
desc = "Whisper to someone"
|
|
|
|
|
plasma_cost = 10
|
|
|
|
|
|
|
|
|
|
action_icon_state = "alien_whisper"
|
|
|
|
|
|
|
|
|
|
/obj/effect/proc_holder/alien/whisper/fire(var/mob/living/carbon/alien/user)
|
|
|
|
|
var/mob/M = input("Select who to whisper to:","Whisper to?",null) as mob in oview(user)
|
|
|
|
|
if(!M)
|
|
|
|
@@ -75,6 +111,8 @@ Doesn't work on other aliens/AI.*/
|
|
|
|
|
desc = "Transfer Plasma to another alien"
|
|
|
|
|
plasma_cost = 0
|
|
|
|
|
|
|
|
|
|
action_icon_state = "alien_transfer"
|
|
|
|
|
|
|
|
|
|
/obj/effect/proc_holder/alien/transfer/fire(var/mob/living/carbon/alien/user)
|
|
|
|
|
var/list/mob/living/carbon/alien/aliens_around = list()
|
|
|
|
|
for(var/mob/living/carbon/alien/A in oview(user))
|
|
|
|
@@ -101,6 +139,8 @@ Doesn't work on other aliens/AI.*/
|
|
|
|
|
desc = "Drench an object in acid, destroying it over time."
|
|
|
|
|
plasma_cost = 200
|
|
|
|
|
|
|
|
|
|
action_icon_state = "alien_acid"
|
|
|
|
|
|
|
|
|
|
/obj/effect/proc_holder/alien/acid/on_gain(var/mob/living/carbon/alien/user)
|
|
|
|
|
user.verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
|
|
|
|
|
|
|
|
|
@@ -157,6 +197,8 @@ Doesn't work on other aliens/AI.*/
|
|
|
|
|
desc = "Spits neurotoxin at someone, paralyzing them for a short time."
|
|
|
|
|
plasma_cost = 50
|
|
|
|
|
|
|
|
|
|
action_icon_state = "alien_neurotoxin"
|
|
|
|
|
|
|
|
|
|
/obj/effect/proc_holder/alien/neurotoxin/fire(var/mob/living/carbon/alien/user)
|
|
|
|
|
user.visible_message("<span class='danger'>[user] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
|
|
|
|
|
|
|
|
|
@@ -180,6 +222,8 @@ Doesn't work on other aliens/AI.*/
|
|
|
|
|
plasma_cost = 55
|
|
|
|
|
check_turf = 1
|
|
|
|
|
|
|
|
|
|
action_icon_state = "alien_resin"
|
|
|
|
|
|
|
|
|
|
/obj/effect/proc_holder/alien/resin/fire(var/mob/living/carbon/alien/user)
|
|
|
|
|
if(locate(/obj/structure/alien/resin) in user.loc.contents)
|
|
|
|
|
user << "<span class='danger'>There is already a resin structure there.</span>"
|
|
|
|
@@ -206,6 +250,8 @@ Doesn't work on other aliens/AI.*/
|
|
|
|
|
desc = "Empties the contents of your stomach"
|
|
|
|
|
plasma_cost = 0
|
|
|
|
|
|
|
|
|
|
action_icon_state = "alien_barf"
|
|
|
|
|
|
|
|
|
|
/obj/effect/proc_holder/alien/regurgitate/fire(var/mob/living/carbon/alien/user)
|
|
|
|
|
if(user.stomach_contents.len)
|
|
|
|
|
for(var/atom/movable/A in user.stomach_contents)
|
|
|
|
@@ -221,6 +267,8 @@ Doesn't work on other aliens/AI.*/
|
|
|
|
|
desc = "Toggles Night Vision"
|
|
|
|
|
plasma_cost = 0
|
|
|
|
|
|
|
|
|
|
has_action = 0 // Has dedicated GUI button already
|
|
|
|
|
|
|
|
|
|
/obj/effect/proc_holder/alien/nightvisiontoggle/fire(var/mob/living/carbon/alien/user)
|
|
|
|
|
|
|
|
|
|
if(!user.nightvision)
|
|
|
|
|