diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm
index a0422e05b91..8c52e9221d5 100644
--- a/code/_onclick/hud/alien.dm
+++ b/code/_onclick/hud/alien.dm
@@ -15,8 +15,10 @@
icon_state = "nightvision1"
/obj/screen/alien/nightvision/Click()
- var/mob/living/carbon/alien/humanoid/A = usr
- A.nightvisiontoggle()
+ var/mob/living/carbon/alien/A = usr
+ var/obj/effect/proc_holder/alien/nightvisiontoggle/T = locate() in A.abilities
+ if(T)
+ T.fire(A)
/datum/hud/proc/alien_hud()
diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm
index 0936e3978f4..86cd8abf179 100644
--- a/code/modules/mob/living/carbon/alien/alien.dm
+++ b/code/modules/mob/living/carbon/alien/alien.dm
@@ -28,12 +28,13 @@
var/heat_protection = 0.5
var/leaping = 0
+ var/list/obj/effect/proc_holder/alien/abilities = list()
/mob/living/carbon/alien/New()
verbs += /mob/living/proc/mob_sleep
verbs += /mob/living/proc/lay_down
internal_organs += new /obj/item/organ/brain/alien
-
+ AddAbility(new/obj/effect/proc_holder/alien/nightvisiontoggle(null))
..()
/mob/living/carbon/alien/adjustToxLoss(amount)
@@ -148,6 +149,16 @@
stat(null, "Move Mode: [m_intent]")
stat(null, "Plasma Stored: [getPlasma()]/[max_plasma]")
+ add_abilities_to_panel()
+
+/mob/living/carbon/alien/proc/AddAbility(var/obj/effect/proc_holder/alien/A)
+ abilities.Add(A)
+ A.on_gain(src)
+
+/mob/living/carbon/alien/proc/add_abilities_to_panel()
+ for(var/obj/effect/proc_holder/alien/A in abilities)
+ statpanel("[A.panel]",A.plasma_cost > 0?"([A.plasma_cost])":"",A)
+
/mob/living/carbon/alien/Stun(amount)
if(status_flags & CANSTUN)
stunned = max(max(stunned,amount),0) //can't go below 0, getting a low amount of stun doesn't lower your current stun
@@ -159,21 +170,6 @@
/mob/living/carbon/alien/getTrail()
return "xltrails"
-/mob/living/carbon/alien/verb/nightvisiontoggle()
- set name = "Toggle Night Vision"
- set category = "Alien"
-
- if(!nightvision)
- see_in_dark = 8
- see_invisible = SEE_INVISIBLE_MINIMUM
- nightvision = 1
- hud_used.nightvisionicon.icon_state = "nightvision1"
- else if(nightvision == 1)
- see_in_dark = 4
- see_invisible = 45
- nightvision = 0
- hud_used.nightvisionicon.icon_state = "nightvision0"
-
/*----------------------------------------
Proc: AddInfectionImages()
Des: Gives the client of the alien an image on each infected mob.
diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
index c758e3e4f7a..43314e72e60 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm
@@ -4,172 +4,235 @@ 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.*/
+/obj/effect/proc_holder/alien
+ name = "Alien Power"
+ panel = "Alien"
+ var/plasma_cost = 0
+ var/check_turf = 0
+/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))
+ user.adjustToxLoss(-plasma_cost)
+ return 1
-/mob/living/carbon/alien/proc/powerc(X, Y)//Y is optional, checks for weed planting. X can be null.
- if(stat)
- src << "You must be conscious to do this."
+/obj/effect/proc_holder/alien/proc/on_gain(var/mob/living/carbon/alien/user)
+ return
+
+/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)
+ if(user.stat)
+ user << "You must be conscious to do this."
return 0
- else if(X && getPlasma() < X)
- src << "Not enough plasma stored."
+ if(user.getPlasma() < plasma_cost)
+ user << "Not enough plasma stored."
return 0
- else if(Y && (!isturf(src.loc) || istype(src.loc, /turf/space)))
- src << "Bad place for a garden!"
+ if(check_turf && (!isturf(user.loc) || istype(user.loc, /turf/space)))
+ user << "Bad place for a garden!"
return 0
- else return 1
+ return 1
-/mob/living/carbon/alien/humanoid/verb/plant()
- set name = "Plant Weeds (50)"
- set desc = "Plants some alien weeds"
- set category = "Alien"
+/obj/effect/proc_holder/alien/plant
+ name = "Plant Weeds"
+ desc = "Plants some alien weeds"
+ plasma_cost = 50
+ check_turf = 1
- if(locate(/obj/structure/alien/weeds/node) in get_turf(src))
+/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."
- return
+ return 0
+ for(var/mob/O in viewers(user, null))
+ O.show_message(text("[user] has planted some alien weeds!"), 1)
+ new/obj/structure/alien/weeds/node(user.loc)
+ return 1
- if(powerc(50,1))
- adjustToxLoss(-50)
- for(var/mob/O in viewers(src, null))
- O.show_message(text("[src] has planted some alien weeds!"), 1)
- new /obj/structure/alien/weeds/node(loc)
- return
+/obj/effect/proc_holder/alien/whisper
+ name = "Whisper"
+ desc = "Whisper to someone"
+ plasma_cost = 10
-/*
-/mob/living/carbon/alien/humanoid/verb/ActivateHuggers()
- set name = "Activate facehuggers (5)"
- set desc = "Makes all nearby facehuggers activate"
- set category = "Alien"
+/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)
+ return 0
+ var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
+ if(msg)
+ log_say("AlienWhisper: [key_name(user)]->[M.key] : [msg]")
+ M << "You hear a strange, alien voice in your head...[msg]"
+ user << {"You said: "[msg]" to [M]"}
+ else
+ return 0
+ return 1
- if(powerc(5))
- adjustToxLoss(-5)
- for(var/obj/item/clothing/mask/facehugger/F in range(8,src))
- F.GoActive()
- emote("roar")
- return
-*/
-/mob/living/carbon/alien/humanoid/verb/whisp(mob/M as mob in oview())
- set name = "Whisper (10)"
- set desc = "Whisper to someone"
- set category = "Alien"
-
- if(powerc(10))
- adjustToxLoss(-10)
- var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
- if(msg)
- log_say("AlienWhisper: [key_name(src)]->[M.key] : [msg]")
- M << "You hear a strange, alien voice in your head...[msg]"
- src << {"You said: "[msg]" to [M]"}
- return
-
-/mob/living/carbon/alien/humanoid/verb/transfer_plasma(mob/living/carbon/alien/M as mob in oview())
- set name = "Transfer Plasma"
- set desc = "Transfer Plasma to another alien"
- set category = "Alien"
+/obj/effect/proc_holder/alien/transfer
+ name = "Transfer Plasma"
+ desc = "Transfer Plasma to another alien"
+ plasma_cost = 0
+/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))
+ aliens_around.Add(A)
+ var/mob/living/carbon/alien/M = input("Select who to transfer to:","Transfer plasma to?",null) as mob in aliens_around
+ if(!M)
+ return 0
if(isalien(M))
var/amount = input("Amount:", "Transfer Plasma to [M]") as num
if (amount)
amount = abs(round(amount))
- if(powerc(amount))
- if (get_dist(src,M) <= 1)
+ if(user.getPlasma() > amount)
+ if (get_dist(user,M) <= 1)
M.adjustToxLoss(amount)
- adjustToxLoss(-amount)
- M << "[src] has transfered [amount] plasma to you."
- src << {"You have trasferred [amount] plasma to [M]"}
+ user.adjustToxLoss(-amount)
+ M << "[user] has transfered [amount] plasma to you."
+ user << {"You have trasferred [amount] plasma to [M]"}
else
- src << "You need to be closer."
+ user << "You need to be closer."
return
+/obj/effect/proc_holder/alien/acid
+ name = "Corrossive Acid"
+ desc = "Drench an object in acid, destroying it over time."
+ plasma_cost = 200
-/mob/living/carbon/alien/humanoid/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 = "Corrossive Acid (200)"
- set desc = "Drench an object in acid, destroying it over time."
- set category = "Alien"
+/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)
- if(powerc(200))
- if(O in oview(1))
- // OBJ CHECK
- if(isobj(O))
- var/obj/I = O
- if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
- src << "You cannot dissolve this object."
- return
- // TURF CHECK
- else if(istype(O, /turf/simulated))
- var/turf/T = O
- // R WALL
- if(istype(T, /turf/simulated/wall/r_wall))
- src << "You cannot dissolve this object."
- return
- // R FLOOR
- if(istype(T, /turf/simulated/floor/engine))
- src << "You cannot dissolve this object."
- return
- else// Not a type we can acid.
- return
-
- adjustToxLoss(-200)
- new /obj/effect/acid(get_turf(O), O)
- visible_message("[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!")
- else
- src << "Target is too far away."
- return
+/obj/effect/proc_holder/alien/acid/proc/corrode(var/target,var/mob/living/carbon/alien/user = usr)
+ if(target in oview(1,user))
+ // OBJ CHECK
+ if(isobj(target))
+ var/obj/I = target
+ if(I.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
+ user << "You cannot dissolve this object."
+ return 0
+ // TURF CHECK
+ else if(istype(target, /turf/simulated))
+ var/turf/T = target
+ // R WALL
+ if(istype(T, /turf/simulated/wall/r_wall))
+ user << "You cannot dissolve this object."
+ return 0
+ // R FLOOR
+ if(istype(T, /turf/simulated/floor/engine))
+ user << "You cannot dissolve this object."
+ return 0
+ else// Not a type we can acid.
+ return 0
+ new /obj/effect/acid(get_turf(target), target)
+ user.visible_message("[user] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid!")
+ return 1
+ else
+ src << "Target is too far away."
+ return 0
-/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"
+/obj/effect/proc_holder/alien/acid/fire(var/mob/living/carbon/alien/user)
+ var/O = input("Select what to dissolve:","Dissolve",null) as obj|turf in oview(1,user)
+ if(!O)
+ return 0
+ return corrode(O,user)
- if(powerc(50))
- adjustToxLoss(-50)
- src.visible_message("[src] spits neurotoxin!", "You spit neurotoxin.")
+/mob/living/carbon/alien/humanoid/proc/corrosive_acid(O as obj|turf in oview(1)) // right click menu verb ugh
+ set name = "Corrossive Acid"
- var/turf/T = loc
- var/turf/U = get_step(src, dir) // Get the tile infront of the move, based on their direction
- if(!isturf(U) || !isturf(T))
- return
+ if(!isalien(usr))
+ return
+ var/mob/living/carbon/alien/humanoid/user = usr
+ var/obj/effect/proc_holder/alien/acid/A = locate() in user.abilities
+ if(!A)
+ return
+ if(user.getPlasma() > A.plasma_cost && A.corrode(O))
+ user.adjustToxLoss(-A.plasma_cost)
- 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
- A.fire()
- return
-/mob/living/carbon/alien/humanoid/proc/resin()
- set name = "Secrete Resin (55)"
- set desc = "Secrete tough malleable resin."
- set category = "Alien"
+/obj/effect/proc_holder/alien/neurotoxin
+ name = "Spit Neurotoxin"
+ desc = "Spits neurotoxin at someone, paralyzing them for a short time."
+ plasma_cost = 50
- if(powerc(55,1))
- if(locate(/obj/structure/alien/resin) in loc.contents)
- src << "There is already a resin structure there."
- return
- var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
- if(!choice || !powerc(55)) return
- adjustToxLoss(-55)
- src << "You shape a [choice]."
- visible_message("[src] vomits up a thick purple substance and begins to shape it.")
- switch(choice)
- if("resin wall")
- new /obj/structure/alien/resin/wall(loc)
- if("resin membrane")
- new /obj/structure/alien/resin/membrane(loc)
- if("resin nest")
- new /obj/structure/stool/bed/nest(loc)
- return
+/obj/effect/proc_holder/alien/neurotoxin/fire(var/mob/living/carbon/alien/user)
+ user.visible_message("[user] spits neurotoxin!", "You spit neurotoxin.")
-/mob/living/carbon/alien/humanoid/verb/regurgitate()
- set name = "Regurgitate"
- set desc = "Empties the contents of your stomach"
- set category = "Alien"
+ 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
- if(powerc() && stomach_contents.len)
- for(var/atom/movable/A in stomach_contents)
- if(A in stomach_contents)
- stomach_contents.Remove(A)
- A.loc = loc
+ 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.fire()
+
+ return 1
+
+
+/obj/effect/proc_holder/alien/resin
+ name = "Secrete Resin"
+ desc = "Secrete tough malleable resin."
+ plasma_cost = 55
+ check_turf = 1
+
+/obj/effect/proc_holder/alien/resin/fire(var/mob/living/carbon/alien/user)
+ if(locate(/obj/structure/alien/resin) in user.loc.contents)
+ user << "There is already a resin structure there."
+ return 0
+ var/choice = input("Choose what you wish to shape.","Resin building") as null|anything in list("resin wall","resin membrane","resin nest") //would do it through typesof but then the player choice would have the type path and we don't want the internal workings to be exposed ICly - Urist
+
+ if(!choice)
+ return 0
+
+ user << "You shape a [choice]."
+ user.visible_message("[user] vomits up a thick purple substance and begins to shape it.")
+
+ switch(choice)
+ if("resin wall")
+ new /obj/structure/alien/resin/wall(user.loc)
+ if("resin membrane")
+ new /obj/structure/alien/resin/membrane(user.loc)
+ if("resin nest")
+ new /obj/structure/stool/bed/nest(user.loc)
+ return 1
+
+/obj/effect/proc_holder/alien/regurgitate
+ name = "Regurgitate"
+ desc = "Empties the contents of your stomach"
+ plasma_cost = 0
+
+/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)
+ if(A in user.stomach_contents)
+ user.stomach_contents.Remove(A)
+ A.loc = user.loc
//Paralyse(10)
- src.visible_message("[src] hurls out the contents of their stomach!")
+ user.visible_message("[user] hurls out the contents of their stomach!")
return
+
+/obj/effect/proc_holder/alien/nightvisiontoggle
+ name = "Toggle Night Vision"
+ desc = "Toggles Night Vision"
+ plasma_cost = 0
+
+/obj/effect/proc_holder/alien/nightvisiontoggle/fire(var/mob/living/carbon/alien/user)
+
+ if(!user.nightvision)
+ user.see_in_dark = 8
+ user.see_invisible = SEE_INVISIBLE_MINIMUM
+ user.nightvision = 1
+ user.hud_used.nightvisionicon.icon_state = "nightvision1"
+ else if(user.nightvision == 1)
+ user.see_in_dark = 4
+ user.see_invisible = 45
+ user.nightvision = 0
+ user.hud_used.nightvisionicon.icon_state = "nightvision0"
+
+ return 1
+
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
index bae52d99d01..a572cd2d80e 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/drone.dm
@@ -12,7 +12,11 @@
if(src.name == "alien drone")
src.name = text("alien drone ([rand(1, 1000)])")
src.real_name = src.name
- verbs.Add(/mob/living/carbon/alien/humanoid/proc/resin,/mob/living/carbon/alien/humanoid/proc/corrosive_acid)
+
+ AddAbility(new/obj/effect/proc_holder/alien/resin(null))
+ AddAbility(new/obj/effect/proc_holder/alien/acid(null))
+ AddAbility(new/obj/effect/proc_holder/alien/evolve(null))
+
..()
//Drones use the same base as generic humanoids.
@@ -20,29 +24,24 @@
. = ..()
. += 1
+/obj/effect/proc_holder/alien/evolve
+ name = "Evolve"
+ desc = "Produce an interal egg sac capable of spawning children. Only one queen can exist at a time."
+ plasma_cost = 500
-//Drone verbs
-/mob/living/carbon/alien/humanoid/drone/verb/evolve()
- set name = "Evolve (500)"
- set desc = "Produce an interal egg sac capable of spawning children. Only one queen can exist at a time."
- set category = "Alien"
-
- if(powerc(500))
- // Queen check
- var/no_queen = 1
- for(var/mob/living/carbon/alien/humanoid/queen/Q in living_mob_list)
- if(!Q.key || !Q.getorgan(/obj/item/organ/brain))
- continue
- no_queen = 0
-
- if(no_queen)
- adjustToxLoss(-500)
- src << "You begin to evolve!"
- for(var/mob/O in viewers(src, null))
- O.show_message(text("[src] begins to twist and contort!"), 1)
- var/mob/living/carbon/alien/humanoid/queen/new_xeno = new (loc)
- mind.transfer_to(new_xeno)
- qdel(src)
- else
- src << "We already have an alive queen."
- return
\ No newline at end of file
+/obj/effect/proc_holder/alien/evolve/fire(var/mob/living/carbon/alien/user)
+ var/no_queen = 1
+ for(var/mob/living/carbon/alien/humanoid/queen/Q in living_mob_list)
+ if(!Q.key || !Q.getorgan(/obj/item/organ/brain))
+ continue
+ no_queen = 0
+ if(no_queen)
+ user << "You begin to evolve!"
+ user.visible_message("[user] begins to twist and contort!")
+ var/mob/living/carbon/alien/humanoid/queen/new_xeno = new (user.loc)
+ user.mind.transfer_to(new_xeno)
+ qdel(user)
+ return 1
+ else
+ user << "We already have an alive queen."
+ return 0
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
index c277695df7c..ecd8a193a33 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm
@@ -14,7 +14,10 @@
if(name == "alien sentinel")
name = text("alien sentinel ([rand(1, 1000)])")
real_name = name
- verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin)
+
+ AddAbility(new/obj/effect/proc_holder/alien/acid(null))
+ AddAbility(new/obj/effect/proc_holder/alien/neurotoxin(null))
+
..()
/mob/living/carbon/alien/humanoid/sentinel/handle_hud_icons_health()
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index 3a6f10f3780..1e993e79363 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -15,6 +15,12 @@
if(name == "alien")
name = text("alien ([rand(1, 1000)])")
real_name = name
+
+ AddAbility(new/obj/effect/proc_holder/alien/plant(null))
+ AddAbility(new/obj/effect/proc_holder/alien/whisper(null))
+ AddAbility(new/obj/effect/proc_holder/alien/transfer(null))
+ AddAbility(new/obj/effect/proc_holder/alien/regurgitate(null))
+
..()
/mob/living/carbon/alien/humanoid/movement_delay()
diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
index e1aae3cc6e2..3919492a553 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm
@@ -22,7 +22,12 @@
break
real_name = src.name
- verbs.Add(/mob/living/carbon/alien/humanoid/proc/corrosive_acid,/mob/living/carbon/alien/humanoid/proc/neurotoxin,/mob/living/carbon/alien/humanoid/proc/resin)
+
+ AddAbility(new/obj/effect/proc_holder/alien/acid(null))
+ AddAbility(new/obj/effect/proc_holder/alien/neurotoxin(null))
+ AddAbility(new/obj/effect/proc_holder/alien/resin(null))
+ AddAbility(new/obj/effect/proc_holder/alien/lay_egg(null))
+
..()
/mob/living/carbon/alien/humanoid/queen/handle_hud_icons_health()
@@ -52,23 +57,19 @@
//Queen verbs
-/mob/living/carbon/alien/humanoid/queen/verb/lay_egg()
-
- set name = "Lay Egg (75)"
- set desc = "Lay an egg to produce huggers to impregnate prey with."
- set category = "Alien"
-
- if(locate(/obj/structure/alien/egg) in get_turf(src))
- src << "There's already an egg here."
- return
-
- if(powerc(75,1))//Can't plant eggs on spess tiles. That's silly.
- adjustToxLoss(-75)
- for(var/mob/O in viewers(src, null))
- O.show_message(text("[src] has laid an egg!"), 1)
- new /obj/structure/alien/egg(loc)
- return
+/obj/effect/proc_holder/alien/lay_egg
+ name = "Lay Egg"
+ desc = "Lay an egg to produce huggers to impregnate prey with."
+ plasma_cost = 75
+ check_turf = 1
+/obj/effect/proc_holder/alien/lay_egg/fire(var/mob/living/carbon/alien/user)
+ if(locate(/obj/structure/alien/egg) in get_turf(user))
+ user << "There's already an egg here."
+ return 0
+ user.visible_message("[user] has laid an egg!")
+ new /obj/structure/alien/egg(user.loc)
+ return 1
/mob/living/carbon/alien/humanoid/queen/large
icon = 'icons/mob/alienqueen.dmi'
diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm
index c560c3d7f3e..edae69928ef 100644
--- a/code/modules/mob/living/carbon/alien/larva/larva.dm
+++ b/code/modules/mob/living/carbon/alien/larva/larva.dm
@@ -21,6 +21,8 @@
name = "alien larva ([rand(1, 1000)])"
real_name = name
regenerate_icons()
+ AddAbility(new/obj/effect/proc_holder/alien/hide(null))
+ AddAbility(new/obj/effect/proc_holder/alien/larva_evolve(null))
..()
//This needs to be fixed
diff --git a/code/modules/mob/living/carbon/alien/larva/powers.dm b/code/modules/mob/living/carbon/alien/larva/powers.dm
index efbdcdafe9b..8a4cbfea95a 100644
--- a/code/modules/mob/living/carbon/alien/larva/powers.dm
+++ b/code/modules/mob/living/carbon/alien/larva/powers.dm
@@ -1,51 +1,57 @@
+/obj/effect/proc_holder/alien/hide
+ name = "Hide"
+ desc = "Allows to hide beneath tables or certain items. Toggled on or off."
+ plasma_cost = 0
-/mob/living/carbon/alien/larva/verb/hide()
- set name = "Hide"
- set desc = "Allows to hide beneath tables or certain items. Toggled on or off."
- set category = "Alien"
-
- if(stat != CONSCIOUS)
+/obj/effect/proc_holder/alien/hide/fire(var/mob/living/carbon/alien/user)
+ if(user.stat != CONSCIOUS)
return
- if (layer != TURF_LAYER+0.2)
- layer = TURF_LAYER+0.2
- visible_message("[src] scurries to the ground!", \
+ if (user.layer != TURF_LAYER+0.2)
+ user.layer = TURF_LAYER+0.2
+ user.visible_message("[user] scurries to the ground!", \
"You are now hiding.")
else
- layer = MOB_LAYER
- visible_message("[src] slowly peaks up from the ground...", \
+ user.layer = MOB_LAYER
+ user.visible_message("[user.] slowly peaks up from the ground...", \
"You have stopped hiding.")
+ return 1
-/mob/living/carbon/alien/larva/verb/evolve()
- set name = "Evolve"
- set desc = "Evolve into a fully grown Alien."
- set category = "Alien"
- if(stat != CONSCIOUS)
+/obj/effect/proc_holder/alien/larva_evolve
+ name = "Evolve"
+ desc = "Evolve into a fully grown Alien."
+ plasma_cost = 0
+
+/obj/effect/proc_holder/alien/larva_evolve/fire(var/mob/living/carbon/alien/user)
+ if(!islarva(user))
return
+ var/mob/living/carbon/alien/larva/L = user
- if(handcuffed || legcuffed)
- src << "You cannot evolve when you are cuffed."
+ if(L.stat != CONSCIOUS)
+ return
+ if(L.handcuffed || L.legcuffed) // Cuffing larvas ? Eh ?
+ user << "You cannot evolve when you are cuffed."
- if(amount_grown >= max_grown) //TODO ~Carn
- src << "You are growing into a beautiful alien! It is time to choose a caste."
- src << "There are three to choose from:"
- src << "Hunters are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
- src << "Sentinels are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
- src << "Drones are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
- var/alien_caste = alert(src, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
+ if(L.amount_grown >= L.max_grown) //TODO ~Carn
+ L << "You are growing into a beautiful alien! It is time to choose a caste."
+ L << "There are three to choose from:"
+ L << "Hunters are strong and agile, able to hunt away from the hive and rapidly move through ventilation shafts. Hunters generate plasma slowly and have low reserves."
+ L << "Sentinels are tasked with protecting the hive and are deadly up close and at a range. They are not as physically imposing nor fast as the hunters."
+ L << "Drones are the working class, offering the largest plasma storage and generation. They are the only caste which may evolve again, turning into the dreaded alien queen."
+ var/alien_caste = alert(L, "Please choose which alien caste you shall belong to.",,"Hunter","Sentinel","Drone")
var/mob/living/carbon/alien/humanoid/new_xeno
switch(alien_caste)
if("Hunter")
- new_xeno = new /mob/living/carbon/alien/humanoid/hunter(loc)
+ new_xeno = new /mob/living/carbon/alien/humanoid/hunter(L.loc)
if("Sentinel")
- new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(loc)
+ new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(L.loc)
if("Drone")
- new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
- if(mind) mind.transfer_to(new_xeno)
- qdel(src)
- return
+ new_xeno = new /mob/living/carbon/alien/humanoid/drone(L.loc)
+ if(L.mind) L.mind.transfer_to(new_xeno)
+ qdel(L)
+ return 0
else
- src << "You are not fully grown."
- return
+ user << "You are not fully grown."
+ return 0
\ No newline at end of file
diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm
index 4df5469296f..acdbfd4d055 100644
--- a/code/modules/mob/living/carbon/alien/life.dm
+++ b/code/modules/mob/living/carbon/alien/life.dm
@@ -62,4 +62,4 @@
handle_hud_icons_health()
- return 1
+ return 1
\ No newline at end of file