I guess I wasn't as gone as I thought I was. Go figure.

Code cleanup on some ninja+misc stuff.
Slightly faster energy recharge rate for ninjas.
Likely fixed the wizard/nuke operatives/MODE appearing in the Cent Com report.
Added a trio of hidden functions to ninja suit. Use with care!

I'm also removing myself as a committer.
Happy Easter! Peace!

PS: I'll miss you too Microwave :)

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1498 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
noisomehollow@lycos.com
2011-04-25 03:09:18 +00:00
parent 69099b12c7
commit 52093c8a0d
16 changed files with 421 additions and 67 deletions
+1 -1
View File
@@ -185,7 +185,7 @@
var/robot_talk_understand = 0
var/alien_talk_understand = 0
// Ruby mode
//Ninja stuff. Was originally for Ruby Mode but since that didn't go anywhere, I'm hijacking it.
var/incorporeal_move = 0
+2
View File
@@ -62,6 +62,8 @@
heat_transfer_coefficient = 0.05
var/draining = 0
var/candrain = 0
var/mindrain = 200
var/maxdrain = 400
/obj/item/clothing/gloves/stungloves/
name = "Stungloves"
+2
View File
@@ -373,10 +373,12 @@
radiation_protection = 0.75
var/affecting = null
var/active = 0//Stealth off.
var/kamikaze = 0//Kamikaze on or off.
var/charge = 9000.0//Starts at 90% of normal capacity.
var/maxcharge = 30000.0//I want the suit upgradable if the ninja is able to find the parts but for now this'll do.
var/initialize = 0//Suit starts off.
var/spideros = 0//Mode of SpiderOS. This can change so I won't bother listing the modes here (0 is hub). Check clothing.dm for how it all works.
var/unlock = 0
var/sbombs = 10.0//Number of starting ninja smoke bombs.
var/aboost = 3.0//Number of adrenaline boosters.
var/amount_per_transfer_from_this = 20//How much reagent is transferred.
+34 -15
View File
@@ -59,7 +59,7 @@
var/list/dudes = list()
for(var/mob/living/carbon/human/man in world)
if (!man.mind) continue
if (man.mind.special_role == "Syndicate") continue
if (man.mind.assigned_role=="MODE") continue
dudes += man
if (dudes.len==0)
return null
@@ -80,11 +80,14 @@
var/traitor_name
var/prob_right_dude = rand(prob_correct_person_lower, prob_correct_person_higher)
if(prob(prob_right_dude) && ticker.mode == "traitor")
traitor_name = correct_mob:current
if(correct_mob:assigned_role=="MODE")
traitor_name = pick_mob()
else
traitor_name = correct_mob:current
else if(prob(prob_right_dude))
traitor_name = src.pick_mob()
traitor_name = pick_mob()
else
fingerprints = src.pick_fingerprints()
fingerprints = pick_fingerprints()
src.text += "<BR><BR>The <B>[name_1] [name_2]</B> implied an undercover operative was acting on their behalf on the station currently.<BR>"
src.text += "After some investigation, we "
@@ -104,15 +107,21 @@
var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher)
if(prob(prob_right_job) && cult_check_mob(correct_mob))
if (correct_mob)
traitor_job = correct_mob:assigned_role
if(correct_mob:assigned_role=="MODE")
traitor_job = pick(get_all_jobs())
else
traitor_job = correct_mob:assigned_role
else
var/list/job_tmp = get_all_jobs()
job_tmp.Remove("Captain", "Chaplain", "AI", "Cyborg", "Security Officer", "Detective", "Head Of Security", "Head of Personnel", "Chief Engineer", "Research Director", "Chief Medical Officer")
traitor_job = pick(job_tmp)
if(prob(prob_right_dude) && ticker.mode == "cult")
traitor_name = correct_mob:current
if(correct_mob:assigned_role=="MODE")
traitor_name = src.pick_mob()
else
traitor_name = correct_mob:current
else
traitor_name = src.pick_mob()
traitor_name = pick_mob()
src.text += "<BR><BR>It has been brought to our attention that the [name_1] [name_2] have stumbled upon some dark secrets. They apparently want to spread the dangerous knowledge on as many stations as they can.<BR>"
src.text += "Based on our intelligence, we are [prob_right_job]% sure that if true, someone doing the job of [traitor_job] on your station may have been converted "
@@ -129,7 +138,6 @@
if (correct_mob in ucs) return
return 1
/datum/intercept_text/proc/build_rev(correct_mob)
var/name_1 = pick(src.org_names_1)
var/name_2 = pick(src.org_names_2)
@@ -139,13 +147,19 @@
var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher)
if(prob(prob_right_job) && rev_check_mob(correct_mob))
if (correct_mob)
traitor_job = correct_mob:assigned_role
if(correct_mob:assigned_role=="MODE")
traitor_job = pick(get_all_jobs())
else
traitor_job = correct_mob:assigned_role
else
var/list/job_tmp = get_all_jobs()
job_tmp.Remove("Captain", "AI", "Cyborg", "Security Officer", "Detective", "Head Of Security", "Head of Personnel", "Chief Engineer", "Research Director", "Warden", "Chief Medical Officer")
job_tmp.Remove("Captain", "AI", "Cyborg", "Security Officer", "Detective", "Head Of Security", "Head of Personnel", "Chief Engineer", "Research Director", "Warden", "Chief Medical Officer", "MODE")
traitor_job = pick(job_tmp)
if(prob(prob_right_dude) && ticker.mode == "revolution")
traitor_name = correct_mob:current
if(correct_mob:assigned_role=="MODE")
traitor_name = src.pick_mob()
else
traitor_name = correct_mob:current
else
traitor_name = src.pick_mob()
@@ -194,12 +208,17 @@
var/prob_right_job = rand(prob_correct_job_lower, prob_correct_job_higher)
if(prob(prob_right_job))
if(correct_mob)
changeling_job = correct_mob:assigned_role
if(correct_mob:assigned_role=="MODE")
changeling_job = pick(get_all_jobs())
else
changeling_job = correct_mob:assigned_role
else
var/list/job_tmp = get_all_jobs()
changeling_job = pick(job_tmp)
changeling_job = pick(get_all_jobs())
if(prob(prob_right_dude) && ticker.mode == "changeling")
changeling_name = correct_mob:current
if(correct_mob:assigned_role=="MODE")
changeling_name = correct_mob:current
else
changeling_name = src.pick_mob()
else
changeling_name = src.pick_mob()
+1 -1
View File
@@ -325,7 +325,7 @@
var/maxcapacity = 0
var/totaldrain = 0
while(G.candrain&&cell.charge>0&&!maxcapacity)
drain = rand(100,300)
drain = rand(G.mindrain,G.maxdrain)
if(cell.charge<drain)
drain = cell.charge
if(S.charge+drain>S.maxcharge)
+145 -26
View File
@@ -337,19 +337,26 @@ NINJA MASK
spawn while(initialize&&charge>=0)//Suit on and has power.
if(!initialize) return//When turned off the proc stops.
var/A = 5//Energy cost each tick.
if(istype(U.get_active_hand(), /obj/item/weapon/blade))//Sword check.
if(charge<=0)//If no charge left.
U.drop_item()//Sword is dropped from active hand (and deleted).
else A += 20//Otherwise, more energy consumption.
else if(istype(U.get_inactive_hand(), /obj/item/weapon/blade))
if(charge<=0)
U.swap_hand()//swap hand
U.drop_item()//drop sword
else A += 20
if(active)
A += 25
if(!kamikaze)
if(istype(U.get_active_hand(), /obj/item/weapon/blade))//Sword check.
if(charge<=0)//If no charge left.
U.drop_item()//Sword is dropped from active hand (and deleted).
else A += 20//Otherwise, more energy consumption.
else if(istype(U.get_inactive_hand(), /obj/item/weapon/blade))
if(charge<=0)
U.swap_hand()//swap hand
U.drop_item()//drop sword
else A += 20
if(active)
A += 25
else
A = 100
charge-=A
if(charge<0)
if(kamikaze)
U.say("I DIE TO LIVE AGAIN!")
U.death()
return
charge=0
active=0
sleep(10)//Checks every second.
@@ -361,6 +368,7 @@ NINJA MASK
if(usr.mind&&usr.mind.special_role=="Space Ninja"&&usr:wear_suit==src&&!src.initialize)
var/mob/living/carbon/human/U = usr
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/init
U << "\blue Now initializing..."
sleep(40)
if(U.mind.assigned_role=="Mime")
@@ -390,6 +398,7 @@ NINJA MASK
U.shoes:canremove=1
U.gloves:canremove=1
canremove=1
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
return
U << "\blue Linking neural-net interface...\nPattern \green <B>GREEN</B>\blue, continuing operation."
sleep(40)
@@ -412,7 +421,6 @@ NINJA MASK
U.mind.special_verbs += /mob/proc/ninjapulse
U.mind.special_verbs += /mob/proc/ninjablade
U.mind.special_verbs += /mob/proc/ninjastar
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/init
verbs += /obj/item/clothing/suit/space/space_ninja/proc/deinit
verbs += /obj/item/clothing/suit/space/space_ninja/proc/spideros
U.gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/drain_wire
@@ -445,8 +453,22 @@ NINJA MASK
return
var/mob/living/carbon/human/U = usr
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
U << "\blue Now de-initializing..."
if(kamikaze)
U << "\blue Disengaging mode...\n\black<b>CODE NAME</b>: \red <b>KAMIKAZE</b>"
U.verbs -= /mob/proc/ninjaslayer
U.verbs -= /mob/proc/ninjawalk
U.verbs -= /mob/proc/ninjamirage
U.mind.special_verbs -= /mob/proc/ninjaslayer
U.mind.special_verbs -= /mob/proc/ninjawalk
U.mind.special_verbs -= /mob/proc/ninjamirage
kamikaze = 0
unlock = 0
U.incorporeal_move = 0
U.density = 1
icon_state = "s-ninja"
spideros = 0
sleep(40)
U.verbs -= /mob/proc/ninjashift
U.verbs -= /mob/proc/ninjajaunt
@@ -491,15 +513,17 @@ NINJA MASK
U.shoes:canremove=1
U.shoes:slowdown++
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja))
U.gloves.icon_state = "s-ninja"
U.gloves.item_state = "s-ninja"
U.gloves:canremove=1
U.gloves:candrain=0
U.gloves:draining=0
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/drain_wire
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
U.update_clothing()
canremove=1
U << "\blue Unsecuring external locking mechanism...\nNeural-net abolished.\nOperation status: <B>FINISHED</B>."
verbs += /obj/item/clothing/suit/space/space_ninja/proc/init
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/deinit
initialize=0
affecting=null
slowdown=1
@@ -539,7 +563,7 @@ NINJA MASK
Sub-menu 1 of sub-menu 2(of menu 2) would be 221. Sub-menu 5 of sub-menu 2(of menu 2) would be 225. Menu 0 is a special case (it's the menu hub); you are free to use menus 1-9
to create your own data paths.
The Return button, when used, simply removes the final number and navigates to the menu prior. Menu 334, the fourth sub-menu of sub-menu
3, in menu 3, would navigate to sub menu 3 in menu 3. Or 33. Currently, only up to 6 digits are supported but this can be easily changed.
3, in menu 3, would navigate to sub menu 3 in menu 3. Or 33.
It is possible to go to a different menu/sub-menu from anywhere. When creating new menus don't forget to add them to Topic proc or else the game
will interpret you using the messenger function (the else clause in the switch).
Other buttons and functions should be named according to what they do.*/
@@ -608,6 +632,8 @@ NINJA MASK
dat += "Temperature: [round(environment.temperature-T0C)]&deg;C"
if(3)
if(unlock==7)
dat += "<a href='byond://?src=\ref[src];choice=32'><img src=sos_1.png> Hidden Menu</a>"
dat += "<h4><img src=sos_12.png> Anonymous Messenger:</h4>"//Anonymous because the receiver will not know the sender's identity.
dat += "<h4><img src=sos_6.png> Detected PDAs:</h4>"
dat += "<ul>"
@@ -621,7 +647,14 @@ NINJA MASK
dat += "</ul>"
if (count == 0)
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(32)
dat += "<h4><img src=sos_1.png> Hidden Menu:</h4>"
dat += "Please input password: "
dat += "<a href='byond://?src=\ref[src];choice=Unlock Kamikaze'><b>HERE</b></a><br>"
dat += "<br>"
dat += "Remember, you will not be able to recharge energy during this function. If energy runs out, the suit will auto self-destruct.<br>"
dat += "Use with caution. De-initialize the suit when energy is low."
if(4)
dat += "<h4><img src=sos_6.png> Ninja Manual:</h4>"
dat += "<h5>Who they are:</h5>"
@@ -649,12 +682,12 @@ NINJA MASK
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>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). You may also use it to cut through walls and disabled doors. Experiment! The blade 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>Energy Star</b> (<i>300E</i>) is a ninja star made of green energy AND coated in poison. It works by picking a random living target within range and can be spammed to great effect in incapacitating foes. Just remember that the poison used is also used by the Xeno Hivemind (and will have no effect on them).</li>"
dat += "<li>*<b>Adrenaline Boost</b> (<i>1 E. Boost/3</i>) recovers the user from stun, weakness, and paralysis. Also injects 20 units of radium into the bloodstream.</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 += "<li>*<b>???</b>: unleash the <b>True Ultimate Power!</b></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>"
@@ -695,6 +728,37 @@ NINJA MASK
U << browse(null, "window=spideros")//Closes the window.
return
switch(unlock)//To unlock Kamikaze mode. Irrelevant elsewhere.
if(0)
if(href_list["choice"]=="Stealth"&&spideros==0) unlock++
if(1)
if(href_list["choice"]=="2"&&spideros==0) unlock++
else if(href_list["choice"]=="Return")
else unlock=0
if(2)
if(href_list["choice"]=="3"&&spideros==0) unlock++
else if(href_list["choice"]=="Return")
else unlock=0
if(3)
if(href_list["choice"]=="Stealth"&&spideros==0) unlock++
else if(href_list["choice"]=="Return")
else unlock=0
if(4)
if(href_list["choice"]=="1"&&spideros==0) unlock++
else if(href_list["choice"]=="Return")
else unlock=0
if(5)
if(href_list["choice"]=="1"&&spideros==0) unlock++
else if(href_list["choice"]=="Return")
else unlock=0
if(6)
if(href_list["choice"]=="4"&&spideros==0) unlock++
else if(href_list["choice"]=="Return")
else unlock=0
if(7)//once unlocked, stays unlocked until deactivated.
else
unlock = 0
switch(href_list["choice"])
if("Close")
U << browse(null, "window=spideros")
@@ -731,6 +795,8 @@ NINJA MASK
spideros=2
if("3")
spideros=3
if("32")
spideros=32
if("4")
spideros=4
/*Sub-menu testing stuff.
@@ -740,6 +806,53 @@ NINJA MASK
spideros=49
if("491")
spideros=491 */
if("Unlock Kamikaze")
if(input(U)=="Divine Wind")
if( !(U.stat||U.wear_suit!=src||!initialize) )
U << "\blue Engaging mode...\n\black<b>CODE NAME</b>: \red <b>KAMIKAZE</b>"
sleep(40)
U << "\blue Re-routing power nodes... \nUnlocking limiter..."
sleep(40)
U << "\blue Power nodes re-routed. \nLimiter unlocked."
sleep(10)
U << "\red Do or Die, <b>LET'S ROCK!!</b>"
if(verbs.Find(/obj/item/clothing/suit/space/space_ninja/proc/deinit))//To prevent engaging kamikaze and de-initializing at the same time.
kamikaze = 1
active = 0
icon_state = "s-ninjak"
if(istype(U.gloves, /obj/item/clothing/gloves/space_ninja))
U.gloves.icon_state = "s-ninjak"
U.gloves.item_state = "s-ninjak"
U.gloves:candrain = 0
U.gloves:draining = 0
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/drain_wire
U.gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
U.update_clothing()
U.verbs -= /mob/proc/ninjashift
U.verbs -= /mob/proc/ninjajaunt
U.verbs -= /mob/proc/ninjapulse
U.verbs -= /mob/proc/ninjastar
U.mind.special_verbs -= /mob/proc/ninjashift
U.mind.special_verbs -= /mob/proc/ninjajaunt
U.mind.special_verbs -= /mob/proc/ninjapulse
U.mind.special_verbs -= /mob/proc/ninjastar
U.verbs += /mob/proc/ninjaslayer
U.verbs += /mob/proc/ninjawalk
U.verbs += /mob/proc/ninjamirage
U.mind.special_verbs += /mob/proc/ninjaslayer
U.mind.special_verbs += /mob/proc/ninjawalk
U.mind.special_verbs += /mob/proc/ninjamirage
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/spideros
U.ninjablade()
else
U << "Nevermind, you cheater."
U << browse(null, "window=spideros")
return
else
U << "\red ERROR: WRONG PASSWORD!"
unlock = 0
spideros = 0
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"))
U << "\red Error: the suit cannot perform this function. Out of dylovene."
@@ -807,6 +920,7 @@ NINJA MASK
U.show_message("\blue Virus sent!", 1)
P.silent = 1
P.ttone = "silence" */
spideros()//Refreshes the screen by calling it again (which replaces current screen with new screen).
return
@@ -815,12 +929,15 @@ NINJA MASK
..()
if(initialize)
usr << "All systems operational. Current energy capacity: <B>[src.charge]</B>."
if(active)
usr << "The CLOAK-tech device is <B>active</B>."
if(!kamikaze)
if(active)
usr << "The CLOAK-tech device is <B>active</B>."
else
usr << "The CLOAK-tech device is <B>inactive</B>."
else
usr << "The CLOAK-tech device is <B>inactive</B>."
usr << "There are <B>[src.sbombs]</B> smoke bombs remaining."
usr << "There are <B>[src.aboost]</B> adrenaline injectors remaining."
usr << "\red KAMIKAZE MODE ENGAGED!"
usr << "There are <B>[sbombs]</B> smoke bombs remaining."
usr << "There are <B>[aboost]</B> adrenaline boosters remaining."
//GLOVES
/obj/item/clothing/gloves/space_ninja/proc/toggled()
@@ -861,11 +978,13 @@ NINJA MASK
//A lot of this comes from the powersink code.
var/mob/living/carbon/human/U = usr
var/obj/item/clothing/suit/space/space_ninja/S = U.wear_suit
var/obj/item/clothing/gloves/space_ninja/G = U.gloves
var/drain = 0
var/maxcapacity = 0
var/totaldrain = 0
var/datum/powernet/PN = attached.get_powernet()
while(candrain&&!maxcapacity&&!isnull(attached))
var/drain = rand(50,100)
drain = (round((rand(G.mindrain,G.maxdrain))/2))
var/drained = 0
if(PN&&do_after(U,10))
drained = min (drain, PN.avail)
+191 -16
View File
@@ -171,7 +171,7 @@ Useful for copy pasta since I'm lazy.*/
message_admins("\blue [key_name_admin(usr)] has spawned a CentCom strike squad.", 1)
log_admin("[key_name(usr)] used Spawn Death Squad.")
//SPACE NINJAS
//SPACE NINJAS=============================
/client/proc/space_ninja()
set category = "Fun"
@@ -257,18 +257,18 @@ Useful for copy pasta since I'm lazy.*/
log_admin("[admin_name] used Spawn Space Ninja.")
//SPACE NINJA ABILITIES
//ABILITIES=============================
/*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(var/C as num,var/X as num)
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."
if(U.stat||U.incorporeal_move)
U << "\red You must be conscious and solid to do this."
return 0
else if(C&&S.charge<C*10)
U << "\red Not enough energy."
@@ -316,7 +316,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
var/turf/picked
var/turf/mobloc = get_turf(loc)
var/safety = 0
switch(dir)
switch(dir)//This can be done better but really isn't worth it in my opinion.
if(NORTH)
//highest Y
//X the same
@@ -355,7 +355,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
turfs += T
else
safety = 1
if(turfs.len||safety)//Cancels the teleportation if no valid turf is found. Usually when teleporting near map edge.
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)
@@ -436,14 +436,24 @@ In the case that they are not, I imagine the game will run-time error like crazy
var/C = 50
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()
if(!S.kamikaze)
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 can only summon one blade. Try dropping an item first."
else//Else you can run around with TWO energy blades. I don't know why you'd want to but cool factor remains.
if(!get_active_hand())
var/obj/item/weapon/blade/W = new()
put_in_hand(W)
if(!get_inactive_hand())
var/obj/item/weapon/blade/W = new()
put_in_inactive_hand(W)
S.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
@@ -457,14 +467,13 @@ In the case that they are not, I imagine the game will run-time error like crazy
var/C = 30
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=pick(targets)//The point here is to pick a random, living mob in oview to shoot stuff at.
var/turf/curloc = loc
var/atom/targloc = get_turf(target)
@@ -504,4 +513,170 @@ In the case that they are not, I imagine the game will run-time error like crazy
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
//KAMIKAZE=============================
//Or otherwise known as anime mode. Which also happens to be ridiculously powerful.
//Allows for incorporeal movement.
//Also makes you move like you're on crack.
/mob/proc/ninjawalk()
set name = "Shadow Walk"
set desc = "Combines the VOID-shift and CLOAK-tech devices to freely move between solid matter. Toggle on or off."
set category = "Ninja"
if(!usr.incorporeal_move)
incorporeal_move = 1
density = 0
src << "\blue You will now phase through solid matter."
else
incorporeal_move = 0
density = 1
src << "\blue You will no-longer phase through solid matter."
return
/*
Added click-spam protection of 1 second.
Allows to gib up to five squares in a straight line. Seriously.*/
/mob/proc/ninjaslayer()
set name = "Phase Slayer"
set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line."
set category = "Ninja"
if(ninjacost())
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
var/locx
var/locy
var/turf/mobloc = get_turf(loc)
var/safety = 0
switch(dir)
if(NORTH)
locx = mobloc.x
locy = (mobloc.y+5)
if(locy>world.maxy)
safety = 1
if(SOUTH)
locx = mobloc.x
locy = (mobloc.y-5)
if(locy<1)
safety = 1
if(EAST)
locy = mobloc.y
locx = (mobloc.x+5)
if(locx>world.maxx)
safety = 1
if(WEST)
locy = mobloc.y
locx = (mobloc.x-5)
if(locx<1)
safety = 1
else safety = 1
if(!safety)//Cancels the teleportation if no valid turf is found. Usually when teleporting near map edge.
say("Ai Satsugai!")
verbs -= /mob/proc/ninjaslayer
var/turf/picked = locate(locx,locy,mobloc.z)
spawn(0)
playsound(loc, "sparks", 50, 1)
anim(mobloc,'mob.dmi',src,"phaseout")
spawn(0)
for(var/turf/T in getline(mobloc, picked))
spawn(0)
for(var/mob/living/M in T)
if(M==src) continue
spawn(0)
M.gib()
if(T==mobloc||T==picked) continue
spawn(0)
anim(T,'mob.dmi',src,"phasein")
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(10)
verbs += /mob/proc/ninjaslayer
else
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return
//Appear behind a randomly chosen mob while a few decoy teleports appear.
//This is so anime it hurts. But that's the point.
/mob/proc/ninjamirage()
set name = "Spider Mirage"
set desc = "Utilizes the internal VOID-shift device to create decoys and teleport behind a random target."
set category = "Ninja"
if(ninjacost())//Simply checks for stat.
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
var/targets[]
targets = new()
for(var/mob/living/M in oview(6))
if(M.stat==2) continue//Doesn't target corpses.
targets.Add(M)
if(targets.len)
var/mob/living/target=pick(targets)
var/locx
var/locy
var/turf/mobloc = get_turf(target.loc)
var/safety = 0
switch(target.dir)
if(NORTH)
locx = mobloc.x
locy = (mobloc.y-1)
if(locy<1)
safety = 1
if(SOUTH)
locx = mobloc.x
locy = (mobloc.y+1)
if(locy>world.maxy)
safety = 1
if(EAST)
locy = mobloc.y
locx = (mobloc.x-1)
if(locx<1)
safety = 1
if(WEST)
locy = mobloc.y
locx = (mobloc.x+1)
if(locx>world.maxx)
safety = 1
else safety=1
if(!safety)
say("Kumo no Shinkiro!")
verbs -= /mob/proc/ninjamirage
var/turf/picked = locate(locx,locy,mobloc.z)
spawn(0)
playsound(loc, "sparks", 50, 1)
anim(mobloc,'mob.dmi',src,"phaseout")
spawn(0)
var/limit = 4
for(var/turf/T in oview(5))
if(prob(20))
spawn(0)
anim(T,'mob.dmi',src,"phasein")
limit--
if(limit<=0) break
loc = picked
dir = target.dir
spawn(0)
S.spark_system.start()
playsound(loc, 'Deconstruct.ogg', 50, 1)
playsound(loc, "sparks", 50, 1)
anim(loc,'mob.dmi',src,"phasein")
spawn(10)
verbs += /mob/proc/ninjamirage
else
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
else
src << "\red There are no targets in view."
return
@@ -609,7 +609,7 @@
var/maxcapacity = 0
var/totaldrain = 0
while(G.candrain&&cell.charge>0&&!maxcapacity)
drain = rand(100,300)
drain = rand(G.mindrain,G.maxdrain)
if(cell.charge<drain)
drain = cell.charge
if(S.charge+drain>S.maxcharge)
+42 -5
View File
@@ -1658,12 +1658,49 @@
return
if (!( src.mob ))
return
if (src.mob.stat == 2)
if (src.mob.stat==2)
return
if (src.mob.incorporeal_move)
src.mob.dir = direct
src.mob.loc = get_step(src.mob, direct)
//return src.mob.Move(get_step(src.mob,direct))
if (mob.incorporeal_move)//For Ninja crazy porting powers. Moves either 1 or 2 tiles.
var/turf/mobloc = get_turf(mob.loc)
if(prob(50))
var/locx
var/locy
switch(direct)
if(NORTH)
locx = mobloc.x
locy = (mobloc.y+2)
if(locy>world.maxy)
return
if(SOUTH)
locx = mobloc.x
locy = (mobloc.y-2)
if(locy<1)
return
if(EAST)
locy = mobloc.y
locx = (mobloc.x+2)
if(locx>world.maxx)
return
if(WEST)
locy = mobloc.y
locx = (mobloc.x-2)
if(locx<1)
return
else
return
mob.loc = locate(locx,locy,mobloc.z)
spawn(0)
var/limit = 2//For only two trailing shadows.
for(var/turf/T in getline(mobloc, mob.loc))
spawn(0)
anim(T,'mob.dmi',mob,"shadow")
limit--
if(limit<=0) break
else
spawn(0)
anim(mobloc,'mob.dmi',mob,"shadow")
mob.loc = get_step(mob, direct)
mob.dir = direct
return
if(istype(src.mob, /mob/living/silicon/ai))
return AIMove(n,direct,src.mob)
+1 -1
View File
@@ -468,7 +468,7 @@
var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
while(G.candrain&&cell.charge>0&&!maxcapacity)
drain = rand(100,300)
drain = rand(G.mindrain,G.maxdrain)
if(cell.charge<drain)
drain = cell.charge
if(S.charge+drain>S.maxcharge)
+1 -1
View File
@@ -197,7 +197,7 @@
var/datum/effects/system/spark_spread/spark_system = new /datum/effects/system/spark_spread()
spark_system.set_up(5, 0, src.loc)
while(G.candrain&&charge>0&&!maxcapacity)
drain = rand(100,300)
drain = rand(G.mindrain,G.maxdrain)
if(charge<drain)
drain = charge
if(S.charge+drain>S.maxcharge)