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

@@ -95,13 +95,13 @@ datum
if(preserve_data) if(preserve_data)
trans_data = current_reagent.data trans_data = current_reagent.data
R.add_reagent(current_reagent.id, amount, trans_data) R.add_reagent(current_reagent.id, amount, trans_data)
src.remove_reagent(current_reagent.id, amount) src.remove_reagent(current_reagent.id, amount, 1)
break break
src.update_total() src.update_total()
R.update_total() R.update_total()
R.handle_reactions() R.handle_reactions()
src.handle_reactions() //src.handle_reactions() Don't need to handle reactions on the source since you're (presumably isolating) and transferring a specific reagent.
return amount return amount
/* /*
@@ -285,7 +285,7 @@ datum
return 1 return 1
remove_reagent(var/reagent, var/amount) remove_reagent(var/reagent, var/amount, var/safety)//Added a safety check for the trans_id_to
if(!isnum(amount)) return 1 if(!isnum(amount)) return 1
@@ -294,7 +294,8 @@ datum
if (R.id == reagent) if (R.id == reagent)
R.volume -= amount R.volume -= amount
update_total() update_total()
handle_reactions() if(!safety)//So it does not handle reactions when it need not to
handle_reactions()
my_atom.on_reagent_change() my_atom.on_reagent_change()
return 0 return 0

View File

@@ -9,6 +9,7 @@ CHAMELEON JUMPSUIT
DEATH COMMANDO GAS MASK DEATH COMMANDO GAS MASK
THERMAL GLASSES THERMAL GLASSES
NINJA SUIT NINJA SUIT
NINJA GLOVES
NINJA MASK NINJA MASK
*/ */
@@ -311,6 +312,8 @@ NINJA MASK
//SPESS NINJA STUFF //SPESS NINJA STUFF
//SUIT
/obj/item/clothing/suit/space/space_ninja/New() /obj/item/clothing/suit/space/space_ninja/New()
..() ..()
src.verbs += /obj/item/clothing/suit/space/space_ninja/proc/init//suit initialize verb src.verbs += /obj/item/clothing/suit/space/space_ninja/proc/init//suit initialize verb
@@ -324,6 +327,8 @@ NINJA MASK
reagents.add_reagent("dexalinp", 80) reagents.add_reagent("dexalinp", 80)
reagents.add_reagent("spaceacillin", 80) reagents.add_reagent("spaceacillin", 80)
reagents.add_reagent("anti_toxin", 80) reagents.add_reagent("anti_toxin", 80)
reagents.add_reagent("radium", 80)
reagents.add_reagent("nutriment", 80)
/obj/item/clothing/suit/space/space_ninja/proc/ntick(var/mob/living/carbon/human/U as mob) /obj/item/clothing/suit/space/space_ninja/proc/ntick(var/mob/living/carbon/human/U as mob)
set hidden = 1 set hidden = 1
@@ -347,7 +352,7 @@ NINJA MASK
if(charge<0) if(charge<0)
charge=0 charge=0
active=0 active=0
sleep(10) sleep(10)//Checks every second.
/obj/item/clothing/suit/space/space_ninja/proc/init() /obj/item/clothing/suit/space/space_ninja/proc/init()
set name = "Initialize Suit" set name = "Initialize Suit"
@@ -558,6 +563,7 @@ NINJA MASK
dat += "<b>Fingerprints</b>: <i>[md5(U.dna.uni_identity)]</i><br>" dat += "<b>Fingerprints</b>: <i>[md5(U.dna.uni_identity)]</i><br>"
dat += "<b>Unique identity</b>: <i>[U.dna.unique_enzymes]</i><br>" dat += "<b>Unique identity</b>: <i>[U.dna.unique_enzymes]</i><br>"
dat += "<h4>Overall Status: [U.stat > 1 ? "dead" : "[U.health]% healthy"]</h4>" dat += "<h4>Overall Status: [U.stat > 1 ? "dead" : "[U.health]% healthy"]</h4>"
dat += "<h4>Nutrition Status: [U.nutrition]</h4>"
dat += "Oxygen loss: [U.oxyloss]" dat += "Oxygen loss: [U.oxyloss]"
dat += " | Toxin levels: [U.toxloss]<br>" dat += " | Toxin levels: [U.toxloss]<br>"
dat += "Burn severity: [U.fireloss]" dat += "Burn severity: [U.fireloss]"
@@ -570,6 +576,7 @@ NINJA MASK
dat += "<li><a href='byond://?src=\ref[src];choice=Dexalin Plus'><img src=sos_2.png> Inject Dexalin Plus: [reagents.get_reagent_amount("dexalinp")/20] left</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=Dexalin Plus'><img src=sos_2.png> Inject Dexalin Plus: [reagents.get_reagent_amount("dexalinp")/20] left</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Tricordazine'><img src=sos_2.png> Inject Tricordazine: [reagents.get_reagent_amount("tricordrazine")/20] left</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=Tricordazine'><img src=sos_2.png> Inject Tricordazine: [reagents.get_reagent_amount("tricordrazine")/20] left</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Spacelin'><img src=sos_2.png> Inject Spacelin: [reagents.get_reagent_amount("spaceacillin")/20] left</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=Spacelin'><img src=sos_2.png> Inject Spacelin: [reagents.get_reagent_amount("spaceacillin")/20] left</a></li>"
dat += "<li><a href='byond://?src=\ref[src];choice=Nutriment'><img src=sos_2.png> Inject Nutriment: [reagents.get_reagent_amount("nutriment")/5] left</a></li>"//Special case since it's so freaking potent.
dat += "</ul>" dat += "</ul>"
if(2) if(2)
dat += "<h4><img src=sos_5.png>Atmospheric Scan:</h4>"//Headers don't need breaks. They are automatically placed. dat += "<h4><img src=sos_5.png>Atmospheric Scan:</h4>"//Headers don't need breaks. They are automatically placed.
@@ -616,7 +623,41 @@ NINJA MASK
dat += "None detected.<br>" dat += "None detected.<br>"
//dat += "<a href='byond://?src=\ref[src];choice=31'> Send Virus</a>" //dat += "<a href='byond://?src=\ref[src];choice=31'> Send Virus</a>"
if(4) if(4)
dat += "<h4><img src=sos_6.png> Other Functions:</h4>" dat += "<h4><img src=sos_6.png> Ninja Manual:</h4>"
dat += "<h5>Who they are:</h5>"
dat += "Space ninjas are a special type of ninja, specifically one of the space-faring type. The vast majority of space ninjas belong to the Spider Clan, a cult-like sect, which has existed for several hundred years. The Spider Clan practice a sort of augmentation of human flesh in order to achieve a more perfect state of being and follow Postmodern Space Bushido. They also kill people for money. Their leaders are chosen from the oldest of the grand-masters, people that have lived a lot longer than any mortal man should.<br>Being a sect of technology-loving fanatics, the Spider Clan have the very best to choose from in terms of hardware--cybernetic implants, exoskeleton rigs, hyper-capacity batteries, and you get the idea. Some believe that much of the Spider Clan equipment is based on reverse-engineered alien technology while others doubt such claims.<br>Whatever the case, their technology is absolutely superb."
dat += "<h5>How they relate to other SS13 organizations:</h5>"
dat += "<ul>"
dat += "<li>*<b>Nanotrasen</b> and the Syndicate are two sides of the same coin and that coin is valuable.</li>"
dat += "<li>*<b>The Space Wizard Federation</b> is a problem, mainly because they are an extremely dangerous group of unpredictable individuals--not to mention the wizards hate technology and are in direct opposition of the Spider Clan. Best avoided or left well-enough alone.</li>"
dat += "<li>*<b>Changeling Hivemind</b>: extremely dangerous and to be killed on sight.</li>"
dat += "<li>*<b>Xeno Hivemind</b>: their skulls make interesting kitchen decorations and are challenging to best, especially in larger nests.</li>"
dat += "</ul>"
dat += "<h5>The reason they (you) are here</h5>:"
dat += "Space ninjas are renowned throughout the known controlled space as fearless spies, infiltrators, and assassins. They are sent on missions of varying nature by Nanotrasen, the Syndicate, and other shady organizations and people. To hire a space ninja means serious business."
dat += "<h5>Their playstyle:</h5>"
dat += "A mix of traitor, changeling, and wizard. Ninjas rely on energy, or electricity to be precise, to keep their suits running (when out of energy, a suit hibernates). Suits gain energy from objects or creatures that contain electrical charge. APCs, cell batteries, SMES batteries, cyborgs, mechs, and exposed wires are currently supported. Through energy ninjas gain access to special powers--while all powers are tied to the ninja suit, the most useful of them are verb activated--to help them in their mission.<br>It is a constant struggle for a ninja to remain hidden long enough to recharge the suit and accomplish their objective; despite their arsenal of abilities, ninjas can die like any other. Unlike wizards, ninjas do not possess good crowd control and are typically forced to play more subdued in order to achieve their goals. Some of their abilities are specifically designed to confuse and disorient others.<br>With that said, it should be perfectly possible to completely flip the fuck out and rampage as a ninja."
dat += "<h5>Their powers:</h5>"
dat += "There are two primary types: powers that are activated through the suit and powers that are activated through the verb panel. Passive powers are always on. Active powers must be turned on and remain active only when there is energy to do so. All verb powers are active and their cost is listed next to them."
dat += "<b>Powers of the suit</b>: cannot be tracked by AI (passive), faster speed (passive), stealth (active), vision switch (passive if toggled), voice masking (passive), SpiderOS (passive if toggled), energy drain (passive if toggled)."
dat += "<ul>"
dat += "<li><i>Voice masking</i> generates a random name the ninja can use over the radio and in-person. Although, the former use is recommended.</li>"
dat += "<li><i>Toggling vision</i> cycles to one of the following: thermal, meson, or darkness vision.</li>"
dat += "<li><i>Stealth</i>, when activated, drains more battery charge and works similarly to a syndicate cloak.</li>"
dat += "<li><i>SpiderOS</i> is a specialized, PDA-like screen that allows for a small variety of functions, such as injecting healing chemicals directly from the suit. You are using it now, if that was not already obvious.</li>"
dat += "</ul>"
dat += "<b>Verbpowers</b>:"
dat += "<ul>"
dat += "<li>*<b>Phase Shift</b> (<i>2000E</i>) and <b>Phase Jaunt</b> (<i>1000E</i>) are unique powers in that they can both be used for defense and offense. Jaunt launches the ninja forward facing up to 10 squares, somewhat randomly selecting the final destination. Shift can only be used on turf in view but is precise (cannot be used on walls). Any living mob in the area teleported to is instantly gibbed.</li>"
dat += "<li>*<b>Energy Blade</b> (<i>500E</i>) is a highly effective weapon. It is summoned directly to the ninja's hand and can also function as an EMAG for certain objects (doors/lockers/etc). It will crit humans in two hits. This item cannot be placed in containers and when dropped or thrown disappears. Having an energy sword drains more power from the battery each tick.</li>"
dat += "<li>*<b>EM Pulse</b> (<i>2500E</i>) is a highly useful ability that will create an electromagnetic shockwave around the ninja, disabling technology whenever possible. If used properly it can render a security force effectively useless. Of course, getting beat up with a toolbox is not accounted for.</li>"
dat += "<li>*<b>Energy Star</b> (<i>300E</i>) is a ninja star made of green energy. It works by picking a random living target within range and can be spammed to great effect in incapacitating foes. (NOTE: this ability is WIP.)</li>"
dat += "<li>*<b>Adrenaline Boost</b> (<i>1 E. Boost/3</i>) recovers the user from stun, weakness, and paralysis. Also injects 15 units of radium into the bloodstream. (NOTE: this ability is WIP but probably finished.)</li>"
dat += "<li>*<b>Smoke Bomb</b> (<i>1 Sm.Bomb/10</i>) is a weak but potentially useful ability. It creates harmful smoke and can be used in tandem with other powers to confuse enemies.</li>"
dat += "<li>*<b>Hacking computer terminals</b>: this power was never finished but in theory, it would have allowed to remotely access computer terminals, provided they were linked to the same power network and were active.</li>"
dat += "</ul>"
dat += "That is all you will need to know. The rest will come with practice and talent. Good luck!"
dat += "<h4>Master /N</h4>"
/* /*
//Sub-menu testing stuff. //Sub-menu testing stuff.
dat += "<li><a href='byond://?src=\ref[src];choice=49'> To sub-menu 49</a></li>" dat += "<li><a href='byond://?src=\ref[src];choice=49'> To sub-menu 49</a></li>"
@@ -684,7 +725,7 @@ NINJA MASK
O << "[usr.name] vanishes into thin air!" O << "[usr.name] vanishes into thin air!"
if("0")//Menus are numbers, see note above. 0 is the hub. if("0")//Menus are numbers, see note above. 0 is the hub.
spideros=0 spideros=0
if("1")//Begin normal menus. if("1")//Begin normal menus 1-9.
spideros=1 spideros=1
if("2") if("2")
spideros=2 spideros=2
@@ -701,32 +742,39 @@ NINJA MASK
spideros=491 */ spideros=491 */
if("Dylovene")//These names really don't matter for specific functions but it's easier to use descriptive names. if("Dylovene")//These names really don't matter for specific functions but it's easier to use descriptive names.
if(!reagents.get_reagent_amount("anti_toxin")) if(!reagents.get_reagent_amount("anti_toxin"))
U << "\red Error: the suit cannot perform this function. Out of reagent." U << "\red Error: the suit cannot perform this function. Out of dylovene."
else else
reagents.reaction(U, 2) reagents.reaction(U, 2)
reagents.trans_id_to(U, "anti_toxin", amount_per_transfer_from_this) reagents.trans_id_to(U, "anti_toxin", amount_per_transfer_from_this)
U << "You feel a tiny prick and a sudden rush of liquid in to your veins." U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Dexalin Plus") if("Dexalin Plus")
if(!reagents.get_reagent_amount("dexalinp")) if(!reagents.get_reagent_amount("dexalinp"))
U << "\red Error: the suit cannot perform this function. Out of reagent." U << "\red Error: the suit cannot perform this function. Out of dexalinp."
else else
reagents.reaction(U, 2) reagents.reaction(U, 2)
reagents.trans_id_to(U, "dexalinp", amount_per_transfer_from_this) reagents.trans_id_to(U, "dexalinp", amount_per_transfer_from_this)
U << "You feel a tiny prick and a sudden rush of liquid in to your veins." U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Tricordazine") if("Tricordazine")
if(!reagents.get_reagent_amount("tricordrazine")) if(!reagents.get_reagent_amount("tricordrazine"))
U << "\red Error: the suit cannot perform this function. Out of reagent." U << "\red Error: the suit cannot perform this function. Out of tricordrazine."
else else
reagents.reaction(U, 2) reagents.reaction(U, 2)
reagents.trans_id_to(U, "tricordrazine", amount_per_transfer_from_this) reagents.trans_id_to(U, "tricordrazine", amount_per_transfer_from_this)
U << "You feel a tiny prick and a sudden rush of liquid in to your veins." U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Spacelin") if("Spacelin")
if(!reagents.get_reagent_amount("spaceacillin")) if(!reagents.get_reagent_amount("spaceacillin"))
U << "\red Error: the suit cannot perform this function. Out of reagent." U << "\red Error: the suit cannot perform this function. Out of spaceacillin."
else else
reagents.reaction(U, 2) reagents.reaction(U, 2)
reagents.trans_id_to(U, "spaceacillin", amount_per_transfer_from_this) reagents.trans_id_to(U, "spaceacillin", amount_per_transfer_from_this)
U << "You feel a tiny prick and a sudden rush of liquid in to your veins." U << "You feel a tiny prick and a sudden rush of liquid in to your veins."
if("Nutriment")
if(!reagents.get_reagent_amount("nutriment"))
U << "\red Error: the suit cannot perform this function. Out of nutriment."
else
reagents.reaction(U, 2)
reagents.trans_id_to(U, "nutriment", 5)
U << "You feel a tiny prick and a sudden rush of substance in to your veins."
else else
/*Leaving this for the messenger because it's an awesome solution. For switch to work, the variable has to be static. /*Leaving this for the messenger because it's an awesome solution. For switch to work, the variable has to be static.

View File

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

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. /*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.*/ 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() /mob/living/carbon/alien/humanoid/verb/plant()
set name = "Plant Weeds (100)" set name = "Plant Weeds (100)"
set desc = "Plants some alien weeds" set desc = "Plants some alien weeds"
set category = "Alien" set category = "Alien"
if(src.stat) if(powerc(100,1))
src << "\green You must be conscious to do this." toxloss -= 100
return for(var/mob/O in viewers(src, null))
if(!isturf(src.loc) || istype(src.loc, /turf/space)) O.show_message(text("\green <B>[src] has planted some alien weeds!</B>"), 1)
src << "\green Bad place for garden!" var/obj/alien/weeds/W = new (loc)
return W.Life()
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()
return return
/mob/living/carbon/alien/humanoid/verb/call_to() /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 desc = "Makes all nearby facehuggers follow you"
set category = "Alien" set category = "Alien"
if(src.stat) if(powerc(5))
src << "\green You must be conscious to do this." toxloss -= 5
return
if(src.toxloss >= 5)
src.toxloss -= 5
for(var/obj/alien/facehugger/F in range(8,src)) for(var/obj/alien/facehugger/F in range(8,src))
F.call_to(src) F.call_to(src)
emote("roar") emote("roar")
else
src << "\green Not enough plasma stored."
return return
/mob/living/carbon/alien/humanoid/verb/whisp(mob/M as mob in oview()) /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 desc = "Whisper to someone"
set category = "Alien" set category = "Alien"
if(src.stat) if(powerc(10))
src << "\green You must be conscious to do this." toxloss -= 10
return var/msg = sanitize(input("Message:", "Alien Whisper") as text|null)
if(msg)
var/msg = sanitize(input("Message:", "Alien Whisper") as text|null) log_say("AlienWhisper: [key_name(src)]->[M.key] : [msg]")
if (!msg) M << "\green You hear a strange, alien voice in your head... \italic [msg]"
return src << {"\green You said: "[msg]" to [M]"}
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."
return return
/mob/living/carbon/alien/humanoid/verb/transfer_plasma(mob/living/carbon/alien/M as mob in oview()) /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 desc = "Transfer Plasma to another alien"
set category = "Alien" set category = "Alien"
if(!isalien(M)) if(isalien(M))
return var/amount = input("Amount:", "Transfer Plasma to [M]") as num
if (amount)
if(src.stat) if(powerc(amount))
src << "\green You must be conscious to do this." if (get_dist(src,M) <= 1)
return M.toxloss += amount
toxloss -= amount
if(!src.toxloss) M << "\green [src] has transfered [amount] plasma to you."
src << "\green You don't have any plasma." src << {"\green You have trasferred [amount] plasma to [M]"}
return else
src << "\green You need to be closer."
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."
return 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. /*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. 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? 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*/ /N*/
/obj/proc/acid() /obj/proc/acid()
usr.toxloss -= 200
var/obj/alien/acid/A = new(src.loc) var/obj/alien/acid/A = new(src.loc)
A.target = src A.target = src
for(var/mob/M in viewers(src, null)) 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 desc = "Drench an object in acid, destroying it over time."
set category = "Alien" set category = "Alien"
var/obj/A if(powerc(200))//Check 1.
if(src.stat) var/list/xeno_target
src << "\green You must be conscious to do this." xeno_target = list("Abort Command")
return for(var/obj/O in view(1))
var/list/xeno_target if(!O.unacidable)
xeno_target = list("ABORT COMMAND") xeno_target.Add(O)
for(var/obj/O in view(1)) var/obj/A
if(!O.unacidable) A = input("Corrode which target?", "Targets", A) in xeno_target
xeno_target.Add(O) if(!A == "Abort Command")
A = input("Corrode which target?", "Targets", A) in xeno_target if(powerc(200))//Check 2.
if(A == "ABORT COMMAND") if(A in view(1))//Check 3.
return toxloss -= 200
if(src.toxloss < 200) A.acid()
src << "\green Not enough plasma." else
return src << "\green Target is too far away."
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. return
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 /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 name = "Corrode with Acid (200)"
set desc = "Drench an object in acid, destroying it over time." set desc = "Drench an object in acid, destroying it over time."
set category = "Alien" set category = "Alien"
if(!istype(O, /obj)) if(istype(O, /obj))
return if(powerc(200))
if(src.stat) if(!O.unacidable)
src << "\green You must be conscious to do this." toxloss -= 200
return O.acid()
if(src.toxloss < 200) else//So the aliens don't destroy energy fields/singularies/other aliens/etc with their acid.
src << "\green Not enough plasma." src << "\green You cannot destroy this object."
return 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()
/mob/living/carbon/alien/humanoid/verb/ventcrawl() // -- TLE /mob/living/carbon/alien/humanoid/verb/ventcrawl() // -- TLE
set name = "Crawl through Vent" 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)) // if(!istype(V,/obj/machinery/atmoalter/siphs/fullairsiphon/air_vent))
// return // return
if(src.stat) if(powerc())
src << "\green You must be conscious to do this." var/vent_found = 0
return for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src))
var/vent_found = 0 if(!v.welded)
for(var/obj/machinery/atmospherics/unary/vent_pump/v in range(1,src)) vent_found = v
if(!v.welded) if(vent_found)
vent_found = v 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) for(var/obj/alien/facehugger/F in huggers)
src << "\green You must be standing on or beside an open air vent to enter it." F.loc = vent_found
return var/travel_time = get_dist(loc, target_vent.loc)
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)
src.loc = vent_found spawn(round(travel_time/2))//give sound warning to anyone near the target vent
for(var/obj/alien/facehugger/F in huggers) if(!target_vent.welded)
F.loc = vent_found for(var/mob/O in hearers(target_vent, null))
var/travel_time = get_dist(src.loc, target_vent.loc) 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 spawn(travel_time)
if(!target_vent.welded) if(target_vent.welded)//the vent can be welded while alien scrolled through the list or travelled.
for(var/mob/O in hearers(target_vent, null)) target_vent = vent_found //travel back. No additional time required.
O.show_message("You hear something crawling trough the ventilation pipes.") src << "\red The vent you were heading to appears to be welded."
loc = target_vent.loc
spawn(travel_time) for(var/obj/alien/facehugger/F in huggers)
if(target_vent.welded)//the vent can be welded while alien scrolled through the list or travelled. F.loc = loc
target_vent = vent_found //travel back. No additional time required. else
src << "\red The vent you were heading to appears to be welded." src << "\green You need to remain still while entering a vent."
src.loc = target_vent.loc else
for(var/obj/alien/facehugger/F in huggers) src << "\green You must be standing on or beside an open air vent to enter it."
F.loc = src.loc return

View File

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

View File

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

View File

@@ -166,41 +166,36 @@
set desc = "Spits neurotoxin at someone, paralyzing them for a short time." set desc = "Spits neurotoxin at someone, paralyzing them for a short time."
set category = "Alien" set category = "Alien"
if(src.stat) if(powerc(50))
src << "\green You must be conscious to do this." if(!isalien(target))
return toxloss -= 50
if(istype(target, /mob/living/carbon/alien)) src << "\green You spit neurotoxin at [target]."
src << "\green Your allies are not a valid target." for(var/mob/O in oviewers())
return if ((O.client && !( O.blinded )))
if(src.toxloss >= 50) O << "\red [src] spits neurotoxin at [target]!"
src << "\green You spit neurotoxin at [target]." //I'm not motivated enough to revise this. Prjectile code in general needs update.
for(var/mob/O in oviewers()) var/turf/T = loc
if ((O.client && !( O.blinded ))) var/turf/U = (istype(target, /atom/movable) ? target.loc : target)
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(!U || !T) if(!U || !T)
return return
while(U && !istype(U,/turf)) while(U && !istype(U,/turf))
U = U.loc U = U.loc
if(!istype(T, /turf)) if(!istype(T, /turf))
return return
if (U == T) if (U == T)
usr.bullet_act(PROJECTILE_DART, src, src.get_organ_target()) usr.bullet_act(PROJECTILE_DART, src, src.get_organ_target())
return return
if(!istype(U, /turf)) if(!istype(U, /turf))
return 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.current = U
A.yo = U.y - T.y A.yo = U.y - T.y
A.xo = U.x - T.x A.xo = U.x - T.x
//
A.process() A.process()
else
else src << "\green Your allies are not a valid target."
src << "\green Not enough plasma stored."
return return

View File

@@ -646,7 +646,7 @@
for(var/mob/O in viewers(src, null)) for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded ))) if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1) 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) if (src.weakened < 10)
src.weakened = rand(1,5) src.weakened = rand(1,5)
for(var/mob/O in viewers(M, null)) for(var/mob/O in viewers(M, null))

View File

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

View File

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