Updated xeno ability code.

Updated ninja ability code.
Misc ninja update.
Fixed chemistry reagent code for the ninja suit.

This final update could have been more awesome but whatever.
I've copy-pasted the ninja info on to SpiderOS for future reference.
It's been fun but now I must sayonara. Whatever that means. Oh, it means goodbye.
~Later~

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1469 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
noisomehollow@lycos.com
2011-04-18 07:36:33 +00:00
parent 2cabf3edc6
commit 3abc38a2bc
10 changed files with 439 additions and 457 deletions

View File

@@ -259,20 +259,30 @@ Useful for copy pasta since I'm lazy.*/
//SPACE NINJA ABILITIES
//X is optional, tells the proc to check for stealth.
/*X is optional, tells the proc to check for specific stuff. C is also optional.
All the procs here assume that the character is wearing the ninja suit if they are using the procs.
They should, as I have made every effort for that to be the case.
In the case that they are not, I imagine the game will run-time error like crazy.
*/
/mob/proc/ninjacost(C,X)
var/mob/living/carbon/human/U = src
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
if(U.stat)
U << "\red You must be conscious to do this."
return 0
else if(X&&U.wear_suit:active)
U << "\red You must deactivate the CLOAK-tech device prior to using this ability."
return 0
else if(U.wear_suit:charge>=C*10)
return 1
else
else if(C&&S.charge<C*10)
U << "\red Not enough energy."
return 0
else if(X==1&&S.active)
U << "\red You must deactivate the CLOAK-tech device prior to using this ability."
return 0
else if(X==2&&S.sbombs<=0)
U << "\red There are no more smoke bombs remaining."
return 0
else if(X==3&&S.aboost<=0)
U << "\red You do not have any more adrenaline boosters."
return 0
else return 1
//Smoke
//Summons smoke in radius of user.
@@ -282,19 +292,15 @@ Useful for copy pasta since I'm lazy.*/
set desc = "Blind your enemies momentarily with a well-placed smoke bomb."
set category = "Ninja"
if(src.stat)
src << "\red You must be conscious to do this."
return
if(!src:wear_suit:sbombs)
src << "\red There are no more smoke bombs remaining."
return
src:wear_suit:sbombs--
src << "\blue There are <B>[src:wear_suit:sbombs]</B> smoke bombs remaining."
var/datum/effects/system/bad_smoke_spread/smoke = new /datum/effects/system/bad_smoke_spread()
smoke.set_up(10, 0, src.loc)
smoke.start()
playsound(src.loc, 'bamf.ogg', 50, 2)
if(ninjacost(,2))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
S.sbombs--
src << "\blue There are <B>[S.sbombs]</B> smoke bombs remaining."
var/datum/effects/system/bad_smoke_spread/smoke = new /datum/effects/system/bad_smoke_spread()
smoke.set_up(10, 0, loc)
smoke.start()
playsound(loc, 'bamf.ogg', 50, 2)
return
//9-10 Tile Teleport
//Click to to teleport 9-10 tiles in direction facing.
@@ -304,72 +310,73 @@ Useful for copy pasta since I'm lazy.*/
set category = "Ninja"
var/C = 100
if(!ninjacost(C,1))
return
if(ninjacost(C,1))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
var/list/turfs = new/list()
var/turf/picked
var/turf/mobloc = get_turf(loc)
var/safety = 0
switch(dir)
if(NORTH)
//highest Y
//X the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((T.y-mobloc.y)<9 || ((T.x+mobloc.x+1)-(mobloc.x*2))>2) continue
turfs += T
if(SOUTH)
//lowest Y
//X the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((mobloc.y-T.y)<9 || ((T.x+mobloc.x+1)-(mobloc.x*2))>2) continue
turfs += T
if(EAST)
//highest X
//Y the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((T.x-mobloc.x)<9 || ((T.y+mobloc.y+1)-(mobloc.y*2))>2) continue
turfs += T
if(WEST)
//lowest X
//Y the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((mobloc.x-T.x)<9 || ((T.y+mobloc.y+1)-(mobloc.y*2))>2) continue
turfs += T
else
safety = 1
if(turfs.len||safety)//Cancels the teleportation if no valid turf is found. Usually when teleporting near map edge.
picked = pick(turfs)
spawn(0)
playsound(loc, "sparks", 50, 1)
anim(mobloc,'mob.dmi',src,"phaseout")
var/list/turfs = new/list()
var/turf/picked
var/turf/mobloc = get_turf(src.loc)
switch(src.dir)
if(NORTH)
//highest Y
//X the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((T.y-mobloc.y)<9 || ((T.x+mobloc.x+1)-(mobloc.x*2))>2) continue
turfs += T
if(SOUTH)
//lowest Y
//X the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((mobloc.y-T.y)<9 || ((T.x+mobloc.x+1)-(mobloc.x*2))>2) continue
turfs += T
if(EAST)
//highest X
//Y the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((T.x-mobloc.x)<9 || ((T.y+mobloc.y+1)-(mobloc.y*2))>2) continue
turfs += T
if(WEST)
//lowest X
//Y the same
for(var/turf/T in orange(10))
if(T.density) continue
if(T.x>world.maxx || T.x<1) continue
if(T.y>world.maxy || T.y<1) continue
if((mobloc.x-T.x)<9 || ((T.y+mobloc.y+1)-(mobloc.y*2))>2) continue
turfs += T
loc = picked
spawn(0)
S.spark_system.start()
playsound(loc, 'Deconstruct.ogg', 50, 1)
playsound(loc, "sparks", 50, 1)
anim(loc,'mob.dmi',src,"phasein")
spawn(0)//Any living mobs in teleport area are gibbed.
for(var/mob/living/M in picked)
if(M==src) continue
M.gib()
S.charge-=(C*10)
else
return
if(!turfs.len)//Cancels the teleportation if no valid turf is found. Usually when teleporting near map edge.
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return
picked = pick(turfs)
spawn(0)
playsound(src.loc, "sparks", 50, 1)
anim(mobloc,'mob.dmi',src,"phaseout")
src.loc = picked
spawn(0)
src:wear_suit:spark_system.start()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
playsound(src.loc, "sparks", 50, 1)
anim(src.loc,'mob.dmi',src,"phasein")
spawn(0)//Any living mobs in teleport area are gibbed.
for(var/mob/living/M in picked)
if(M==src) continue
M.gib()
src:wear_suit:charge-=(C*10)
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return
//Right Click Teleport
//Right click to teleport somewhere, almost exactly like admin jump to turf.
@@ -379,32 +386,30 @@ Useful for copy pasta since I'm lazy.*/
set category = null//So it does not show up on the panel but can still be right-clicked.
var/C = 200
if(!ninjacost(C,1))
return
if(ninjacost(C,1))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
if(!T.density)
var/turf/mobloc = get_turf(loc)
spawn(0)
playsound(loc, 'sparks4.ogg', 50, 1)
anim(mobloc,'mob.dmi',src,"phaseout")
if(T.density)
src << "\red You cannot teleport into solid walls."
return
loc = T
var/turf/mobloc = get_turf(src.loc)
spawn(0)
S.spark_system.start()
playsound(loc, 'Deconstruct.ogg', 50, 1)
playsound(loc, 'sparks2.ogg', 50, 1)
anim(loc,'mob.dmi',src,"phasein")
spawn(0)
playsound(src.loc, 'sparks4.ogg', 50, 1)
anim(mobloc,'mob.dmi',src,"phaseout")
src.loc = T
spawn(0)
src:wear_suit:spark_system.start()
playsound(src.loc, 'Deconstruct.ogg', 50, 1)
playsound(src.loc, 'sparks2.ogg', 50, 1)
anim(src.loc,'mob.dmi',src,"phasein")
spawn(0)//Any living mobs in teleport area are gibbed.
for(var/mob/living/M in T)
if(M==src) continue
M.gib()
src:wear_suit:charge-=(C*10)
spawn(0)//Any living mobs in teleport area are gibbed.
for(var/mob/living/M in T)
if(M==src) continue
M.gib()
S.charge-=(C*10)
else
src << "\red You cannot teleport into solid walls."
return
//EMP Pulse
//Disables nearby tech equipment.
@@ -414,13 +419,12 @@ Useful for copy pasta since I'm lazy.*/
set category = "Ninja"
var/C = 250
if(!ninjacost(C,1))
return
playsound(src.loc, 'EMPulse.ogg', 60, 2)
empulse(src, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
src:wear_suit:charge-=(C*10)
if(ninjacost(C,1))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
playsound(loc, 'EMPulse.ogg', 60, 2)
empulse(src, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
S.charge-=(C*10)
return
//Summon Energy Blade
//Summons a blade of energy in active hand.
@@ -430,16 +434,17 @@ Useful for copy pasta since I'm lazy.*/
set category = "Ninja"
var/C = 50
if(!ninjacost(C))
return
if(!src.get_active_hand()&&!istype(src.get_inactive_hand(), /obj/item/weapon/blade))
var/obj/item/weapon/blade/W = new()
W.spark_system.start()
playsound(src.loc, "sparks", 50, 1)
src.put_in_hand(W)
src:wear_suit:charge-=(C*10)
if(ninjacost(C))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
if(!get_active_hand()&&!istype(get_inactive_hand(), /obj/item/weapon/blade))
var/obj/item/weapon/blade/W = new()
W.spark_system.start()
playsound(src.loc, "sparks", 50, 1)
put_in_hand(W)
S.charge-=(C*10)
else
src << "\red You cannot summon the blade. Try dropping an item first."
return
//Shoot Ninja Stars
//Shoots ninja stars at random people.
@@ -450,31 +455,31 @@ Useful for copy pasta since I'm lazy.*/
set category = "Ninja"
var/C = 30
if(!ninjacost(C))
return
if(ninjacost(C))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
var/mob/living/target//The point here is to pick a random, living mob in oview to shoot stuff at.
var/targets[]//So yo can shoot while yo throw dawg
targets = new()
for(var/mob/living/M in oview(7))
if(M.stat==2) continue//Doesn't target corpses.
targets.Add(M)
if(targets.len)
target=pick(targets)
var/mob/living/target//The point here is to pick a random, living mob in oview to shoot stuff at.
var/targets[]//So yo can shoot while yo throw dawg
targets = new()
for(var/mob/living/M in oview(7))
if(M.stat==2) continue//Doesn't target corpses.
targets.Add(M)
if(targets.len)
target=pick(targets)
else
return
var/turf/curloc = src.loc
var/atom/targloc = get_turf(target)
if (!targloc || !istype(targloc, /turf) || !curloc)
return
if (targloc == curloc)
return
var/obj/bullet/neurodart/A = new /obj/bullet/neurodart(usr.loc)
A.current = curloc
A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x
src:wear_suit:charge-=(C*10)
A.process()
var/turf/curloc = loc
var/atom/targloc = get_turf(target)
if (!targloc || !istype(targloc, /turf) || !curloc)
return
if (targloc == curloc)
return
var/obj/bullet/neurodart/A = new /obj/bullet/neurodart(loc)
A.current = curloc
A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x
S.charge-=(C*10)
A.process()
else
src << "\red There are no targets in view."
return
//Adrenaline Boost
@@ -485,20 +490,18 @@ Useful for copy pasta since I'm lazy.*/
set desc = "Inject a secret chemical that will counteract all movement-impairing effects."
set category = "Ninja"
if(src.stat==2)
src << "\red You must be <b>alive</b> to do this."
return
if(src:wear_suit:aboost<=0)
src << "\red You do not have any more adrenaline boosters."
return
src.paralysis = 0
src.stunned = 0
src.weakened = 0
spawn(30)
src.say("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!")
spawn(70)
src.reagents.add_reagent("radium", 20)
src << "red You are beginning to feal the after-effects of the injection."
src:wear_suit:aboost--
if(ninjacost(,3))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
//Wouldn't need to track adrenaline boosters if there was a miracle injection to get rid of paralysis and the like instantly.
//For now, adrenaline boosters ARE the miracle injection. Well, radium, really.
paralysis = 0
stunned = 0
weakened = 0
spawn(30)
say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
spawn(70)
S.reagents.reaction(src, 2)
S.reagents.trans_id_to(src, "radium", S.amount_per_transfer_from_this)
src << "\red You are beginning to feal the after-effects of the injection."
S.aboost--
return

View File

@@ -5,26 +5,29 @@ 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.*/
/mob/living/carbon/alien/proc/powerc(X, Y)//Y is optional, checks for weed planting. X can be null.
if(stat)
src << "\green You must be conscious to do this."
return 0
else if(X&&toxloss < X)
src << "\green Not enough plasma stored."
return 0
else if(Y&&(!isturf(src.loc) || istype(src.loc, /turf/space)))
src << "\green Bad place for a garden!"
return 0
else return 1
/mob/living/carbon/alien/humanoid/verb/plant()
set name = "Plant Weeds (100)"
set desc = "Plants some alien weeds"
set category = "Alien"
if(src.stat)
src << "\green You must be conscious to do this."
return
if(!isturf(src.loc) || istype(src.loc, /turf/space))
src << "\green Bad place for garden!"
return
if(src.toxloss < 100)
src << "\green Not enough plasma stored."
return
src.toxloss -= 100
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] has planted some alien weeds!</B>"), 1)
var/obj/alien/weeds/W = new (src.loc)
W.Life()
if(powerc(100,1))
toxloss -= 100
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] has planted some alien weeds!</B>"), 1)
var/obj/alien/weeds/W = new (loc)
W.Life()
return
/mob/living/carbon/alien/humanoid/verb/call_to()
@@ -32,17 +35,11 @@ Doesn't work on other aliens/AI.*/
set desc = "Makes all nearby facehuggers follow you"
set category = "Alien"
if(src.stat)
src << "\green You must be conscious to do this."
return
if(src.toxloss >= 5)
src.toxloss -= 5
if(powerc(5))
toxloss -= 5
for(var/obj/alien/facehugger/F in range(8,src))
F.call_to(src)
emote("roar")
else
src << "\green Not enough plasma stored."
return
/mob/living/carbon/alien/humanoid/verb/whisp(mob/M as mob in oview())
@@ -50,22 +47,13 @@ Doesn't work on other aliens/AI.*/
set desc = "Whisper to someone"
set category = "Alien"
if(src.stat)
src << "\green You must be conscious to do this."
return
var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
if (!msg)
return
if(src.toxloss >= 10)
src.toxloss -= 10
log_say("AlienWhisper: [key_name(src)]->[M.key] : [msg]")
M << "\green You hear a strange, alien voice in your head... \italic [msg]"
src << {"\green You said: "[msg]" to [M]"}
else
src << "\green Not enough plasma stored."
if(powerc(10))
toxloss -= 10
var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
if(msg)
log_say("AlienWhisper: [key_name(src)]->[M.key] : [msg]")
M << "\green You hear a strange, alien voice in your head... \italic [msg]"
src << {"\green You said: "[msg]" to [M]"}
return
/mob/living/carbon/alien/humanoid/verb/transfer_plasma(mob/living/carbon/alien/M as mob in oview())
@@ -73,44 +61,24 @@ Doesn't work on other aliens/AI.*/
set desc = "Transfer Plasma to another alien"
set category = "Alien"
if(!isalien(M))
return
if(src.stat)
src << "\green You must be conscious to do this."
return
if(!src.toxloss)
src << "\green You don't have any plasma."
return
var/amount = input("Amount:", "Transfer Plasma to [M]") as num
if (!amount)
return
if (get_dist(src,M) <= 1)
if(src.toxloss >= amount)
M.toxloss += amount
src.toxloss -= amount
else
src << "\green Not enough plasma."
return
M << "\green [src] has transfered [amount] plasma to you."
src << {"\green You have trasferred [amount] plasma to [M]"}
else
src << "\green You need to be closer."
if(isalien(M))
var/amount = input("Amount:", "Transfer Plasma to [M]") as num
if (amount)
if(powerc(amount))
if (get_dist(src,M) <= 1)
M.toxloss += amount
toxloss -= amount
M << "\green [src] has transfered [amount] plasma to you."
src << {"\green You have trasferred [amount] plasma to [M]"}
else
src << "\green You need to be closer."
return
/*Xenos now have a proc and a verb for drenching stuff in acid. I couldn't get them to work right when combined so this was the next best solution.
The first proc defines the acid throw function while the other two work in the game itself. Probably a good idea to revise this later.
I kind of like the right click only--the window version can get a little confusing. Perhaps something telling the alien they need to right click?
/N*/
/obj/proc/acid()
usr.toxloss -= 200
var/obj/alien/acid/A = new(src.loc)
A.target = src
for(var/mob/M in viewers(src, null))
@@ -122,45 +90,36 @@ I kind of like the right click only--the window version can get a little confusi
set desc = "Drench an object in acid, destroying it over time."
set category = "Alien"
var/obj/A
if(src.stat)
src << "\green You must be conscious to do this."
return
var/list/xeno_target
xeno_target = list("ABORT COMMAND")
for(var/obj/O in view(1))
if(!O.unacidable)
xeno_target.Add(O)
A = input("Corrode which target?", "Targets", A) in xeno_target
if(A == "ABORT COMMAND")
return
if(src.toxloss < 200)
src << "\green Not enough plasma."
return
if(A in view(1))//Another check to see if the item is in range. So the alien does not run off with the window open.
A.acid()
else
src << "\green Target is too far away."
return
if(powerc(200))//Check 1.
var/list/xeno_target
xeno_target = list("Abort Command")
for(var/obj/O in view(1))
if(!O.unacidable)
xeno_target.Add(O)
var/obj/A
A = input("Corrode which target?", "Targets", A) in xeno_target
if(!A == "Abort Command")
if(powerc(200))//Check 2.
if(A in view(1))//Check 3.
toxloss -= 200
A.acid()
else
src << "\green Target is too far away."
return
/mob/living/carbon/alien/humanoid/verb/corrode(obj/O as anything in oview(1)) //If they right click to corrode, an error will flash if its an invalid target./N
set name = "Corrode with Acid (200)"
set desc = "Drench an object in acid, destroying it over time."
set category = "Alien"
if(!istype(O, /obj))
return
if(src.stat)
src << "\green You must be conscious to do this."
return
if(src.toxloss < 200)
src << "\green Not enough plasma."
return
if(O.unacidable) //So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
src << "\green Cannot destroy this object."
return
else
O.acid()
if(istype(O, /obj))
if(powerc(200))
if(!O.unacidable)
toxloss -= 200
O.acid()
else//So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
src << "\green You cannot destroy this object."
return
/mob/living/carbon/alien/humanoid/verb/ventcrawl() // -- TLE
set name = "Crawl through Vent"
@@ -169,61 +128,59 @@ I kind of like the right click only--the window version can get a little confusi
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
// return
if(src.stat)
src << "\green You must be conscious to do this."
return
var/vent_found = 0
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
if(!v.welded)
vent_found = v
if(powerc())
var/vent_found = 0
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
if(!v.welded)
vent_found = v
if(vent_found)
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc == loc)
continue
if(temp_vent.welded)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != loc.z)
continue
if(vent.welded)
continue
var/atom/a = get_turf_loc(vent)
choices.Add(a.loc)
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(loc==startloc)
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection_position]
if(target_vent)
for(var/mob/O in viewers(src, null))
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
var/list/huggers = list()
for(var/obj/alien/facehugger/F in view(3, src))
if(istype(F, /obj/alien/facehugger))
huggers.Add(F)
loc = vent_found
if(!vent_found)
src << "\green You must be standing on or beside an open air vent to enter it."
return
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc == src.loc)
continue
if(temp_vent.welded)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != src.loc.z)
continue
if(vent.welded)
continue
var/atom/a = get_turf_loc(vent)
choices.Add(a.loc)
var/turf/startloc = src.loc
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(src.loc != startloc)
src << "\green You need to remain still while entering a vent."
return
var/obj/machinery/atmospherics/unary/vent_pump/target_vent = vents[selection_position]
if(target_vent)
for(var/mob/O in viewers(src, null))
O.show_message(text("<B>[src] scrambles into the ventillation ducts!</B>"), 1)
var/list/huggers = list()
for(var/obj/alien/facehugger/F in view(3, src))
if(istype(F, /obj/alien/facehugger))
huggers.Add(F)
for(var/obj/alien/facehugger/F in huggers)
F.loc = vent_found
var/travel_time = get_dist(loc, target_vent.loc)
src.loc = vent_found
for(var/obj/alien/facehugger/F in huggers)
F.loc = vent_found
var/travel_time = get_dist(src.loc, target_vent.loc)
spawn(round(travel_time/2))//give sound warning to anyone near the target vent
if(!target_vent.welded)
for(var/mob/O in hearers(target_vent, null))
O.show_message("You hear something crawling trough the ventilation pipes.")
spawn(round(travel_time/2))//give sound warning to anyone near the target vent
if(!target_vent.welded)
for(var/mob/O in hearers(target_vent, null))
O.show_message("You hear something crawling trough the ventilation pipes.")
spawn(travel_time)
if(target_vent.welded)//the vent can be welded while alien scrolled through the list or travelled.
target_vent = vent_found //travel back. No additional time required.
src << "\red The vent you were heading to appears to be welded."
src.loc = target_vent.loc
for(var/obj/alien/facehugger/F in huggers)
F.loc = src.loc
spawn(travel_time)
if(target_vent.welded)//the vent can be welded while alien scrolled through the list or travelled.
target_vent = vent_found //travel back. No additional time required.
src << "\red The vent you were heading to appears to be welded."
loc = target_vent.loc
for(var/obj/alien/facehugger/F in huggers)
F.loc = loc
else
src << "\green You need to remain still while entering a vent."
else
src << "\green You must be standing on or beside an open air vent to enter it."
return

View File

@@ -22,48 +22,33 @@
set desc = "Produce an interal egg sac capable of spawning children"
set category = "Alien"
if(src.stat)
src << "\green You must be conscious to do this."
return
if(!src.toxloss)
src << "\green You don't have any plasma."
return
if(src.toxloss >= 500)
src.toxloss -= 500
src << "\green You begin to evolve."
if(powerc(500))
toxloss -= 500
src << "\green You begin to evolve!"
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] begins to twist and contort!</B>"), 1)
var/mob/living/carbon/alien/humanoid/queen/Q = new (src.loc)
var/mob/living/carbon/alien/humanoid/queen/Q = new (loc)
Q.mind = new//Mind initialize stuff.
Q.mind.current = Q
Q.mind.assigned_role = "Alien"
Q.mind.special_role = "Queen"
Q.mind.key = src.key
if(src.client)
src.client.mob = Q
Q.mind.key = key
if(client)
client.mob = Q
del(src)
else
src << "\green Not enough plasma."
return
/mob/living/carbon/alien/humanoid/drone/verb/resinwall() // -- TLE
set name = "Shape Resin Wall (100)"
set desc = "Produce a wall of resin that blocks entry and line of sight"
set category = "Alien"
if(src.stat)
src << "\green You must be conscious to do this."
return
if(!src.toxloss)
src << "\green You don't have any plasma."
if(src.toxloss >= 100)
src.toxloss -= 100
if(powerc(100))
toxloss -= 100
src << "\green You begin to shape a wall of resin."
for(var/mob/O in viewers(src, null))
O.show_message(text("\red <B>[src] vomits up a thick purple substance and begins to shape it!</B>"), 1)
//var/obj/alien/resin/R = new(src.loc)
new /obj/alien/resin(src.loc)
else
src << "\green Not enough plasma."
new /obj/alien/resin(loc)
return

View File

@@ -165,20 +165,16 @@
set desc = "Makes you invisible for 15 seconds"
set category = "Alien"
if(src.stat)
src << "\green You must be conscious to do this."
return
if(src.toxloss >= 50)
src.toxloss -= 50
src.alien_invis = 1.0
if(powerc(50))
toxloss -= 50
alien_invis = 1.0
src << "\green You are now invisible."
for(var/mob/O in oviewers(src, null))
O.show_message(text("\red <B>[src] fades into the surroundings!</B>"), 1)
spawn(150)
src.alien_invis = 0.0
src << "\green You are no longer invisible."
else
src << "\green Not enough plasma stored"
if(!isnull(src))//Don't want the game to runtime error when the mob no-longer exists.
alien_invis = 0.0
src << "\green You are no longer invisible."
return
/mob/living/carbon/alien/humanoid/hunter/verb/regurgitate()
@@ -186,17 +182,13 @@
set desc = "Empties the contents of your stomach"
set category = "Alien"
if(src.stat)
src << "\green You must be conscious to do this."
return
if(src.stomach_contents.len)
for(var/mob/M in src)
if(M in src.stomach_contents)
src.stomach_contents.Remove(M)
M.loc = src.loc
M.paralysis += 10
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] hurls out the contents of their stomach.</B>"), 1)
if(powerc())
if(stomach_contents.len)
for(var/mob/M in src)
if(M in stomach_contents)
stomach_contents.Remove(M)
M.loc = loc
M.paralysis += 10
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] hurls out the contents of their stomach!</B>"), 1)
return

View File

@@ -166,41 +166,36 @@
set desc = "Spits neurotoxin at someone, paralyzing them for a short time."
set category = "Alien"
if(src.stat)
src << "\green You must be conscious to do this."
return
if(istype(target, /mob/living/carbon/alien))
src << "\green Your allies are not a valid target."
return
if(src.toxloss >= 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]!"
src.toxloss -= 50
var/turf/T = usr.loc
var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
if(powerc(50))
if(!isalien(target))
toxloss -= 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.
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(PROJECTILE_DART, src, src.get_organ_target())
return
if(!istype(U, /turf))
return
if(!U || !T)
return
while(U && !istype(U,/turf))
U = U.loc
if(!istype(T, /turf))
return
if (U == T)
usr.bullet_act(PROJECTILE_DART, src, src.get_organ_target())
return
if(!istype(U, /turf))
return
var/obj/bullet/neurodart/A = new /obj/bullet/neurodart(usr.loc)
var/obj/bullet/neurodart/A = new /obj/bullet/neurodart(usr.loc)
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
A.process()
else
src << "\green Not enough plasma stored."
A.current = U
A.yo = U.y - T.y
A.xo = U.x - T.x
//
A.process()
else
src << "\green Your allies are not a valid target."
return

View File

@@ -646,7 +646,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
if (damage > 8)//Regular humans have a very small chance of weakening an alien.
if (damage > 9||prob(5))//Regular humans have a very small chance of weakening an alien.
if (src.weakened < 10)
src.weakened = rand(1,5)
for(var/mob/O in viewers(M, null))

View File

@@ -167,15 +167,9 @@
set desc = "Plants an egg"
set category = "Alien"
if(src.stat)
src << "You must be concious to do this"
return
if(src.toxloss >= 200)
src.toxloss -= 200
if(powerc(50,1))//Can't plant eggs on spess tiles. That's silly.
toxloss -= 200
for(var/mob/O in viewers(src, null))
O.show_message(text("\green <B>[src] has laid an egg!</B>"), 1)
new /obj/alien/egg(src.loc)
else
src << "\green Not enough plasma stored"
new /obj/alien/egg(loc)
return

View File

@@ -2,47 +2,54 @@
set name = "Crawl through Vent"
set desc = "Enter an air vent and appear at a random one."
set category = "Alien"
// if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
// return
var/vent_found = 0
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
vent_found = 1
if(!vent_found)
src << "You must be standing on or beside an air vent to enter it."
return
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc == src.loc)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != src.loc.z)
continue
var/atom/a = get_turf_loc(vent)
choices.Add(a.loc)
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
var/obj/target_vent = vents[selection_position]
if(target_vent)
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("<B>[] scrambles into the ventillation ducts!</B>", src)
src.loc = target_vent.loc
if(powerc())
var/vent_found = 0
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
vent_found = 1
if(!vent_found)
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
if(temp_vent.loc == loc)
continue
vents.Add(temp_vent)
var/list/choices = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/vent in vents)
if(vent.loc.z != loc.z)
continue
var/atom/a = get_turf_loc(vent)
choices.Add(a.loc)
var/turf/startloc = loc
var/obj/selection = input("Select a destination.", "Duct System") in choices
var/selection_position = choices.Find(selection)
if(loc==startloc)
var/obj/target_vent = vents[selection_position]
if(target_vent)
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("<B>[] scrambles into the ventillation ducts!</B>", src)
loc = target_vent.loc
else
src << "\green You need to remain still while entering a vent."
else
src << "\green You must be standing on or beside an air vent to enter it."
return
/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 (src.layer != TURF_LAYER)
src.layer = TURF_LAYER
if (layer != TURF_LAYER)
layer = TURF_LAYER
src << text("\green You are now hiding.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))
O << text("<B>[] scurries to the ground!</B>", src)
else
src.layer = MOB_LAYER
layer = MOB_LAYER
src << text("\green You have stopped hiding.")
for(var/mob/O in oviewers())
if ((O.client && !( O.blinded )))