Skip to content

Commit

Permalink
Fixed PDA messaging.
Browse files Browse the repository at this point in the history
Fixed PDA flashlight.
To clarify, you can still use the PDA when you are stunned/weakened. This was always the case, apparently. You cannot use the PDA when knocked out or dead.
You can now stick an ID card into a PDA without clicking 400 times (click on PDA with card in hand).

Changed how the ninja suit functions in relation to energy. It will now hold a power cell as APCs/Borgs/etc.
Ninjas can now replace their starting power cell (reduced to high capacity/10000) with larger capacities. Drain the cell as normal to do it. On that note, hyper-capacity (30k) cells added to research.
Can now drain energy from a recharger. Much like draining from wire.
Added cooldown to certain ninja abilities. It is a global cooldown; meaning, most abilities will be unusable until it finishes. Usually a second.
Some icon changes for ninjas.


git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1540 316c924e-a436-60f5-8080-3fe189b3f50e
  • Loading branch information
[email protected] committed May 6, 2011
1 parent a20589c commit bbc04ef
Show file tree
Hide file tree
Showing 19 changed files with 328 additions and 248 deletions.
4 changes: 2 additions & 2 deletions code/WorkInProgress/recycling/disposal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,9 @@
overlays = null
if( !(stat & BROKEN) )
if(flush)
overlays += image('disposal.dmi',src,"toilet-handle",,dir)
overlays += image('disposal.dmi',"toilet-handle",,dir)
if( !(stat & NOPOWER) )
overlays += image('disposal.dmi',src,"toilet-ready",,dir)
overlays += image('disposal.dmi',"toilet-ready",,dir)
else
icon_state = "toilet-broken"
mode = 0
Expand Down
6 changes: 3 additions & 3 deletions code/defines/obj/clothing/suit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,14 @@
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/obj/item/weapon/cell/cell//Starts out with a high-capacity cell using new proc.
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 ninja_equipment.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.
var/transfera = 20//How much reagent is transferred.
var/coold = 0//If the suit is on cooldown. Could be useful to attach different cooldowns to abilities I guess. It ticks down every second.
var/datum/effects/system/spark_spread/spark_system
slowdown = 1

Expand Down
8 changes: 7 additions & 1 deletion code/defines/obj/weapon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1446,11 +1446,17 @@ Total SMES charging rate should not exceed total power generation rate, or an ov
g_amt = 60

/obj/item/weapon/cell/super
name = "super-capcity power cell"
name = "super-capacity power cell"
origin_tech = "powerstorage=3"
maxcharge = 20000
g_amt = 70

/obj/item/weapon/cell/hyper
name = "hyper-capacity power cell"
origin_tech = "powerstorage=6"
maxcharge = 30000
g_amt = 80

/*/obj/item/weapon/cell/potato
name = "Potato Battery"
desc = "A rechargable starch based power cell."
Expand Down
147 changes: 73 additions & 74 deletions code/game/gamemodes/extra/ninja_abilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,27 @@ All the procs here assume that the character is wearing the ninja suit if they a
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.
*/

//Cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down.
/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.incorporeal_move)
U << "\red You must be conscious and solid to do this."
return 0
else if(C&&S.charge<C*10)
return 1
else if(C&&S.cell.charge<C*10)
U << "\red Not enough energy."
return 0
return 1
else if(X==1&&S.active)
U << "\red You must deactivate the CLOAK-tech device prior to using this ability."
return 0
return 1
else if(X==2&&S.sbombs<=0)
U << "\red There are no more smoke bombs remaining."
return 0
return 1
else if(X==3&&S.aboost<=0)
U << "\red You do not have any more adrenaline boosters."
return 0
else return 1
return 1
else return (S.coold)//Returns the value of the variable which counts down to zero.

//Smoke
//Summons smoke in radius of user.
Expand All @@ -33,69 +35,31 @@ In the case that they are not, I imagine the game will run-time error like crazy
set desc = "Blind your enemies momentarily with a well-placed smoke bomb."
set category = "Ninja"

if(ninjacost(,2))
if(!ninjacost(,2))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
S.sbombs--
src << "\blue There are <B>[S.sbombs]</B> smoke bombs remaining."
var/datum/effects/system/bad_smoke_spread/smoke = new /datum/effects/system/bad_smoke_spread()
smoke.set_up(10, 0, loc)
smoke.start()
playsound(loc, 'bamf.ogg', 50, 2)
S.coold = 1
return

//9-10 Tile Teleport
//Click to to teleport 9-10 tiles in direction facing.
/mob/proc/ninjajaunt()
set name = "Phase Jaunt"
set name = "Phase Jaunt (10E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
set category = "Ninja"

var/C = 100
if(ninjacost(C,1))
if(!ninjacost(C,1))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
var/list/turfs = new/list()
var/turf/picked
var/turf/mobloc = get_turf(loc)
var/safety = 0
/* switch(dir)//This can be done better but really isn't worth it in my opinion.
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*/
var/locx
var/locy
switch(dir)//Gets rectengular range for target.
Expand Down Expand Up @@ -151,20 +115,21 @@ In the case that they are not, I imagine the game will run-time error like crazy
for(var/mob/living/M in picked)
if(M==src) continue
M.gib()
S.charge-=(C*10)
S.coold = 1
S.cell.charge-=(C*10)
else
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return

//Right Click Teleport
//Right click to teleport somewhere, almost exactly like admin jump to turf.
/mob/proc/ninjashift(var/turf/T in oview())
set name = "Phase Shift"
set name = "Phase Shift (20E)"
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a destination in view."
set category = null//So it does not show up on the panel but can still be right-clicked.

var/C = 200
if(ninjacost(C,1))
if(!ninjacost(C,1))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
if(!T.density)
var/turf/mobloc = get_turf(loc)
Expand All @@ -184,43 +149,45 @@ In the case that they are not, I imagine the game will run-time error like crazy
for(var/mob/living/M in T)
if(M==src) continue
M.gib()
S.charge-=(C*10)
S.coold = 1
S.cell.charge-=(C*10)
else
src << "\red You cannot teleport into solid walls."
return

//EMP Pulse
//Disables nearby tech equipment.
/mob/proc/ninjapulse()
set name = "EM Burst"
set name = "EM Burst (25E)"
set desc = "Disable any nearby technology with a electro-magnetic pulse."
set category = "Ninja"

var/C = 250
if(ninjacost(C,1))
if(!ninjacost(C,1))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
playsound(loc, 'EMPulse.ogg', 60, 2)
empulse(src, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
S.charge-=(C*10)
S.coold = 2
S.cell.charge-=(C*10)
return

//Summon Energy Blade
//Summons a blade of energy in active hand.
/mob/proc/ninjablade()
set name = "Energy Blade"
set name = "Energy Blade (5E)"
set desc = "Create a focused beam of energy in your active hand."
set category = "Ninja"

var/C = 50
if(ninjacost(C))
if(!ninjacost(C))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
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(loc, "sparks", 50, 1)
put_in_hand(W)
S.charge-=(C*10)
S.cell.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.
Expand All @@ -232,18 +199,19 @@ In the case that they are not, I imagine the game will run-time error like crazy
put_in_inactive_hand(W)
S.spark_system.start()
playsound(loc, "sparks", 50, 1)
S.coold = 1
return

//Shoot Ninja Stars
//Shoots ninja stars at random people.
//This could be a lot better but I'm too tired atm.
/mob/proc/ninjastar()
set name = "Energy Star"
set name = "Energy Star (3E)"
set desc = "Launches an energy star at a random living target."
set category = "Ninja"

var/C = 30
if(ninjacost(C))
if(!ninjacost(C))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
var/targets[]//So yo can shoot while yo throw dawg
targets = new()
Expand All @@ -263,12 +231,25 @@ In the case that they are not, I imagine the game will run-time error like crazy
A.current = curloc
A.yo = targloc.y - curloc.y
A.xo = targloc.x - curloc.x
S.charge-=(C*10)
S.cell.charge-=(C*10)
A.process()
else
src << "\red There are no targets in view."
return
/*
//Energy Net
//Allows the ninja to capture people, I guess.
/mob/proc/ninjanet()
set name = "Energy Net"
set desc = "Captures a fallen opponent in a net of energy."
set category = "Ninja"
var/C = 200
if(!ninjacost(C))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
S.cell.charge-=(C*10)
return
*/
//Adrenaline Boost
//Wakes the user so they are able to do their thing. Also injects a decent dose of radium.
//Movement impairing would indicate drugs and the like.
Expand All @@ -277,7 +258,7 @@ In the case that they are not, I imagine the game will run-time error like crazy
set desc = "Inject a secret chemical that will counteract all movement-impairing effects."
set category = "Ninja"

if(ninjacost(,3))
if(!ninjacost(,3))
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
//Wouldn't need to track adrenaline boosters if there was a miracle injection to get rid of paralysis and the like instantly.
//For now, adrenaline boosters ARE the miracle injection. Well, radium, really.
Expand All @@ -288,11 +269,13 @@ In the case that they are not, I imagine the game will run-time error like crazy
say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
spawn(70)
S.reagents.reaction(src, 2)
S.reagents.trans_id_to(src, "radium", S.amount_per_transfer_from_this)
S.reagents.trans_id_to(src, "radium", S.transfera)
src << "\red You are beginning to feal the after-effects of the injection."
S.aboost--
S.coold = 3
return


//KAMIKAZE=============================
//Or otherwise known as anime mode. Which also happens to be ridiculously powerful.

Expand Down Expand Up @@ -321,7 +304,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/
set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line."
set category = "Ninja"

if(ninjacost())
if(!ninjacost())
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
var/locx
var/locy
Expand Down Expand Up @@ -352,7 +335,6 @@ Allows to gib up to five squares in a straight line. Seriously.*/
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)
Expand All @@ -376,8 +358,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/
playsound(loc, 'Deconstruct.ogg', 50, 1)
playsound(loc, "sparks", 50, 1)
anim(loc,'mob.dmi',src,"phasein")
spawn(10)
verbs += /mob/proc/ninjaslayer
S.coold = 1
else
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
return
Expand All @@ -389,7 +370,7 @@ Allows to gib up to five squares in a straight line. Seriously.*/
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.
if(!ninjacost())//Simply checks for stat.
var/obj/item/clothing/suit/space/space_ninja/S = src:wear_suit
var/targets[]
targets = new()
Expand Down Expand Up @@ -427,7 +408,6 @@ Allows to gib up to five squares in a straight line. Seriously.*/

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)
Expand All @@ -450,11 +430,30 @@ Allows to gib up to five squares in a straight line. Seriously.*/
playsound(loc, 'Deconstruct.ogg', 50, 1)
playsound(loc, "sparks", 50, 1)
anim(loc,'mob.dmi',src,"phasein")

spawn(10)
verbs += /mob/proc/ninjamirage
S.coold = 1
else
src << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
else
src << "\red There are no targets in view."
return
return

/*
/mob/verb/TestNinjaShadow()
set name = "Test Ninja Ability"
set category = "Ninja"
if(client)
var/safety = 4
for(var/turf/T in oview(5))
if(prob(20))
var/current_clone = image('mob.dmi',T,"s-ninja",dir)
safety--
spawn(0)
src << current_clone
spawn(300)
del(current_clone)
spawn while(!isnull(current_clone))
step_to(current_clone,src,1)
sleep(5)
if(safety<=0) break
return */
Loading

0 comments on commit bbc04ef

Please sign in to comment.