mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Merge pull request #8785 from AnturK/alien_proc_holder
Turns alien abilities into proc holders
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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 << "<span class='noticealien'>You must be conscious to do this.</span>"
|
||||
/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 << "<span class='noticealien'>You must be conscious to do this.</span>"
|
||||
return 0
|
||||
else if(X && getPlasma() < X)
|
||||
src << "<span class='noticealien'>Not enough plasma stored.</span>"
|
||||
if(user.getPlasma() < plasma_cost)
|
||||
user << "<span class='noticealien'>Not enough plasma stored.</span>"
|
||||
return 0
|
||||
else if(Y && (!isturf(src.loc) || istype(src.loc, /turf/space)))
|
||||
src << "<span class='noticealien'>Bad place for a garden!</span>"
|
||||
if(check_turf && (!isturf(user.loc) || istype(user.loc, /turf/space)))
|
||||
user << "<span class='noticealien'>Bad place for a garden!</span>"
|
||||
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("<span class='alertalien'>[user] has planted some alien weeds!</span>"), 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("<span class='alertalien'>[src] has planted some alien weeds!</span>"), 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 << "<span class='noticealien'>You hear a strange, alien voice in your head...</span>[msg]"
|
||||
user << {"<span class='noticealien'>You said: "[msg]" to [M]</span>"}
|
||||
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 << "<span class='noticealien'>You hear a strange, alien voice in your head...</span>[msg]"
|
||||
src << {"<span class='noticealien'>You said: "[msg]" to [M]</span>"}
|
||||
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 << "<span class='noticealien'>[src] has transfered [amount] plasma to you.</span>"
|
||||
src << {"<span class='noticealien'>You have trasferred [amount] plasma to [M]</span>"}
|
||||
user.adjustToxLoss(-amount)
|
||||
M << "<span class='noticealien'>[user] has transfered [amount] plasma to you.</span>"
|
||||
user << {"<span class='noticealien'>You have trasferred [amount] plasma to [M]</span>"}
|
||||
else
|
||||
src << "<span class='noticealien'>You need to be closer.</span>"
|
||||
user << "<span class='noticealien'>You need to be closer.</span>"
|
||||
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 << "<span class='noticealien'>You cannot dissolve this object.</span>"
|
||||
return
|
||||
// TURF CHECK
|
||||
else if(istype(O, /turf/simulated))
|
||||
var/turf/T = O
|
||||
// R WALL
|
||||
if(istype(T, /turf/simulated/wall/r_wall))
|
||||
src << "<span class='noticealien'>You cannot dissolve this object.</span>"
|
||||
return
|
||||
// R FLOOR
|
||||
if(istype(T, /turf/simulated/floor/engine))
|
||||
src << "<span class='noticealien'>You cannot dissolve this object.</span>"
|
||||
return
|
||||
else// Not a type we can acid.
|
||||
return
|
||||
|
||||
adjustToxLoss(-200)
|
||||
new /obj/effect/acid(get_turf(O), O)
|
||||
visible_message("<span class='alertalien'>[src] vomits globs of vile stuff all over [O]. It begins to sizzle and melt under the bubbling mess of acid!</span>")
|
||||
else
|
||||
src << "<span class='noticealien'>Target is too far away.</span>"
|
||||
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 << "<span class='noticealien'>You cannot dissolve this object.</span>"
|
||||
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 << "<span class='noticealien'>You cannot dissolve this object.</span>"
|
||||
return 0
|
||||
// R FLOOR
|
||||
if(istype(T, /turf/simulated/floor/engine))
|
||||
user << "<span class='noticealien'>You cannot dissolve this object.</span>"
|
||||
return 0
|
||||
else// Not a type we can acid.
|
||||
return 0
|
||||
new /obj/effect/acid(get_turf(target), target)
|
||||
user.visible_message("<span class='alertalien'>[user] vomits globs of vile stuff all over [target]. It begins to sizzle and melt under the bubbling mess of acid!</span>")
|
||||
return 1
|
||||
else
|
||||
src << "<span class='noticealien'>Target is too far away.</span>"
|
||||
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("<span class='danger'>[src] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
|
||||
/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 << "<span class='danger'>There is already a resin structure there.</span>"
|
||||
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 << "<span class='notice'>You shape a [choice].</span>"
|
||||
visible_message("<span class='notice'>[src] vomits up a thick purple substance and begins to shape it.</span>")
|
||||
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("<span class='danger'>[user] spits neurotoxin!", "<span class='alertalien'>You spit neurotoxin.</span>")
|
||||
|
||||
/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 << "<span class='danger'>There is already a resin structure there.</span>"
|
||||
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 << "<span class='notice'>You shape a [choice].</span>"
|
||||
user.visible_message("<span class='notice'>[user] vomits up a thick purple substance and begins to shape it.</span>")
|
||||
|
||||
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("<span class='alertealien'>[src] hurls out the contents of their stomach!</span>")
|
||||
user.visible_message("<span class='alertealien'>[user] hurls out the contents of their stomach!</span>")
|
||||
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
|
||||
|
||||
|
||||
@@ -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 << "<span class='noticealien'>You begin to evolve!</span>"
|
||||
for(var/mob/O in viewers(src, null))
|
||||
O.show_message(text("<span class='alertalien'>[src] begins to twist and contort!</span>"), 1)
|
||||
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new (loc)
|
||||
mind.transfer_to(new_xeno)
|
||||
qdel(src)
|
||||
else
|
||||
src << "<span class='notice'>We already have an alive queen.</span>"
|
||||
return
|
||||
/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 << "<span class='noticealien'>You begin to evolve!</span>"
|
||||
user.visible_message("<span class='alertalien'>[user] begins to twist and contort!</span>")
|
||||
var/mob/living/carbon/alien/humanoid/queen/new_xeno = new (user.loc)
|
||||
user.mind.transfer_to(new_xeno)
|
||||
qdel(user)
|
||||
return 1
|
||||
else
|
||||
user << "<span class='notice'>We already have an alive queen.</span>"
|
||||
return 0
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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("<span class='alertalien'>[src] has laid an egg!</span>"), 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("<span class='alertalien'>[user] has laid an egg!</span>")
|
||||
new /obj/structure/alien/egg(user.loc)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/alien/humanoid/queen/large
|
||||
icon = 'icons/mob/alienqueen.dmi'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("<span class='name'>[src] scurries to the ground!</span>", \
|
||||
if (user.layer != TURF_LAYER+0.2)
|
||||
user.layer = TURF_LAYER+0.2
|
||||
user.visible_message("<span class='name'>[user] scurries to the ground!</span>", \
|
||||
"<span class='noticealien'>You are now hiding.</span>")
|
||||
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...", \
|
||||
"<span class='noticealien'>You have stopped hiding.</span>")
|
||||
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 << "<span class='danger'>You cannot evolve when you are cuffed.</span>"
|
||||
if(L.stat != CONSCIOUS)
|
||||
return
|
||||
if(L.handcuffed || L.legcuffed) // Cuffing larvas ? Eh ?
|
||||
user << "<span class='danger'>You cannot evolve when you are cuffed.</span>"
|
||||
|
||||
if(amount_grown >= max_grown) //TODO ~Carn
|
||||
src << "<span class='name'>You are growing into a beautiful alien! It is time to choose a caste.</span>"
|
||||
src << "<span class='info'>There are three to choose from:"
|
||||
src << "<span class='name'>Hunters</span> <span class='info'> 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.</span>"
|
||||
src << "<span class='name'>Sentinels</span> <span class='info'> 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.</span>"
|
||||
src << "<span class='name'>Drones</span> <span class='info'> 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.</span>"
|
||||
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 << "<span class='name'>You are growing into a beautiful alien! It is time to choose a caste.</span>"
|
||||
L << "<span class='info'>There are three to choose from:"
|
||||
L << "<span class='name'>Hunters</span> <span class='info'> 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.</span>"
|
||||
L << "<span class='name'>Sentinels</span> <span class='info'> 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.</span>"
|
||||
L << "<span class='name'>Drones</span> <span class='info'> 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.</span>"
|
||||
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 << "<span class='danger'>You are not fully grown.</span>"
|
||||
return
|
||||
user << "<span class='danger'>You are not fully grown.</span>"
|
||||
return 0
|
||||
@@ -62,4 +62,4 @@
|
||||
|
||||
handle_hud_icons_health()
|
||||
|
||||
return 1
|
||||
return 1
|
||||
Reference in New Issue
Block a user