diff --git a/code/defines/mob/mob.dm b/code/defines/mob/mob.dm
index 5ed9b0f2013..16b5039c4ea 100644
--- a/code/defines/mob/mob.dm
+++ b/code/defines/mob/mob.dm
@@ -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
diff --git a/code/defines/obj/clothing/gloves.dm b/code/defines/obj/clothing/gloves.dm
index ba28ae362c7..708bf87accc 100644
--- a/code/defines/obj/clothing/gloves.dm
+++ b/code/defines/obj/clothing/gloves.dm
@@ -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"
diff --git a/code/defines/obj/clothing/suit.dm b/code/defines/obj/clothing/suit.dm
index 0f9c76c90e6..150afb5b8ae 100644
--- a/code/defines/obj/clothing/suit.dm
+++ b/code/defines/obj/clothing/suit.dm
@@ -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.
diff --git a/code/game/gamemodes/intercept_report.dm b/code/game/gamemodes/intercept_report.dm
index 524c444d6ee..f761cc692be 100644
--- a/code/game/gamemodes/intercept_report.dm
+++ b/code/game/gamemodes/intercept_report.dm
@@ -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 += "
The [name_1] [name_2] implied an undercover operative was acting on their behalf on the station currently.
"
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 += "
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.
"
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()
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index acbf441d826..bf25abfb2c3 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -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.chargeS.maxcharge)
diff --git a/code/game/objects/items/clothing.dm b/code/game/objects/items/clothing.dm
index 1e9b121be86..8f172080bfd 100644
--- a/code/game/objects/items/clothing.dm
+++ b/code/game/objects/items/clothing.dm
@@ -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 GREEN\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\blackCODE NAME: \red KAMIKAZE"
+ 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: FINISHED."
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)]°C"
if(3)
+ if(unlock==7)
+ dat += "
Hidden Menu"
dat += "
Anonymous Messenger:
"//Anonymous because the receiver will not know the sender's identity.
dat += "
Detected PDAs:
"
dat += ""
@@ -621,7 +647,14 @@ NINJA MASK
dat += "
"
if (count == 0)
dat += "None detected.
"
- //dat += " Send Virus"
+ //dat += " Send Virus
+ if(32)
+ dat += "
Hidden Menu:
"
+ dat += "Please input password: "
+ dat += "HERE
"
+ dat += "
"
+ dat += "Remember, you will not be able to recharge energy during this function. If energy runs out, the suit will auto self-destruct.
"
+ dat += "Use with caution. De-initialize the suit when energy is low."
if(4)
dat += "
Ninja Manual:
"
dat += "Who they are:
"
@@ -649,12 +682,12 @@ NINJA MASK
dat += "Verbpowers:"
dat += ""
dat += "- *Phase Shift (2000E) and Phase Jaunt (1000E) 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.
"
- dat += "- *Energy Blade (500E) 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.
"
+ dat += "- *Energy Blade (500E) 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.
"
dat += "- *EM Pulse (2500E) 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.
"
- dat += "- *Energy Star (300E) 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.)
"
- dat += "- *Adrenaline Boost (1 E. Boost/3) 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.)
"
+ dat += "- *Energy Star (300E) 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).
"
+ dat += "- *Adrenaline Boost (1 E. Boost/3) recovers the user from stun, weakness, and paralysis. Also injects 20 units of radium into the bloodstream.
"
dat += "- *Smoke Bomb (1 Sm.Bomb/10) is a weak but potentially useful ability. It creates harmful smoke and can be used in tandem with other powers to confuse enemies.
"
- dat += "- *Hacking computer terminals: 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.
"
+ dat += "- *???: unleash the True Ultimate Power!
"
dat += "
"
dat += "That is all you will need to know. The rest will come with practice and talent. Good luck!"
dat += "Master /N
"
@@ -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\blackCODE NAME: \red KAMIKAZE"
+ 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, LET'S ROCK!!"
+ 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: [src.charge]."
- if(active)
- usr << "The CLOAK-tech device is active."
+ if(!kamikaze)
+ if(active)
+ usr << "The CLOAK-tech device is active."
+ else
+ usr << "The CLOAK-tech device is inactive."
else
- usr << "The CLOAK-tech device is inactive."
- usr << "There are [src.sbombs] smoke bombs remaining."
- usr << "There are [src.aboost] adrenaline injectors remaining."
+ usr << "\red KAMIKAZE MODE ENGAGED!"
+ usr << "There are [sbombs] smoke bombs remaining."
+ usr << "There are [aboost] 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)
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index 4a2b2e91474..c26389ee6b7 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -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.chargeworld.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, teleportation failed."
+ 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, teleportation failed."
+ else
+ src << "\red There are no targets in view."
return
\ No newline at end of file
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index e5dc5667739..8f0c2e42aa7 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -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.chargeS.maxcharge)
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index 0d4b27b5f2b..59cd75f4416 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -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)
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index af46e903617..4e7b2c9058d 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -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.chargeS.maxcharge)
diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm
index a12e2f1752d..ccdbe340639 100644
--- a/code/modules/power/smes.dm
+++ b/code/modules/power/smes.dm
@@ -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(chargeS.maxcharge)
diff --git a/icons/mob/hands.dmi b/icons/mob/hands.dmi
index d1f53b80cd9..75c7a511bd5 100644
Binary files a/icons/mob/hands.dmi and b/icons/mob/hands.dmi differ
diff --git a/icons/mob/mob.dmi b/icons/mob/mob.dmi
index 23ea4516e01..11ebd5e6315 100644
Binary files a/icons/mob/mob.dmi and b/icons/mob/mob.dmi differ
diff --git a/icons/mob/suit.dmi b/icons/mob/suit.dmi
index 8a843a98d18..79c1693a587 100644
Binary files a/icons/mob/suit.dmi and b/icons/mob/suit.dmi differ
diff --git a/icons/obj/clothing/gloves.dmi b/icons/obj/clothing/gloves.dmi
index 114a343de0b..4d40ca7f27e 100644
Binary files a/icons/obj/clothing/gloves.dmi and b/icons/obj/clothing/gloves.dmi differ
diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi
index c2dc0f0b041..424fa4318b4 100644
Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ