mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 14:08:44 +01:00
Merge pull request #6319 from PsiOmegaDelta/IAmNinja
Ninjas can now phase jaunt.
This commit is contained in:
@@ -14,12 +14,12 @@ 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.
|
||||
s_cooldown ticks off each second based on the suit recharge proc, in seconds. Default of 1 seconds. Some abilities have no cool down.
|
||||
*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(C = 0,X = 0)
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjacost(C = 0, X = 0)
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if( (U.stat||U.incorporeal_move)&&X!=3 )//Will not return if user is using an adrenaline booster since you can use them when stat==1.
|
||||
U << "\red You must be conscious and solid to do this."//It's not a problem of stat==2 since the ninja will explode anyway if they die.
|
||||
return 1
|
||||
else if(C&&cell.charge<C*10)
|
||||
else if(C&&cell.charge < C*10)
|
||||
U << "\red Not enough energy."
|
||||
return 1
|
||||
switch(X)
|
||||
@@ -33,7 +33,10 @@ s_cooldown ticks off each second based on the suit recharge proc, in seconds. De
|
||||
if(a_boost<=0)
|
||||
U << "\red You do not have any more adrenaline boosters."
|
||||
return 1
|
||||
return (s_coold)//Returns the value of the variable which counts down to zero.
|
||||
if(s_coold)
|
||||
return s_coold
|
||||
cell.use(C*10)
|
||||
return 0
|
||||
|
||||
//=======//TELEPORT GRAB CHECK//=======//
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/handle_teleport_grab(turf/T, mob/living/U)
|
||||
@@ -66,7 +69,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
return
|
||||
|
||||
|
||||
//=======//RIGHT CLICK TELEPORT//=======//
|
||||
//=======//PHASE SHIFT//=======//
|
||||
//Right click to teleport somewhere, almost exactly like admin jump to turf.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjashift(turf/T in oview())
|
||||
set name = "Phase Shift (400E)"
|
||||
@@ -83,9 +86,9 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
playsound(U.loc, 'sound/effects/sparks4.ogg', 50, 1)
|
||||
anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
cell.use(C*10)
|
||||
handle_teleport_grab(T, U)
|
||||
U.loc = T
|
||||
s_coold = 1
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
@@ -96,6 +99,14 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
U << "\red You cannot teleport into solid walls or from solid matter."
|
||||
return
|
||||
|
||||
//=======//PHASE JAUNT//=======//
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt()
|
||||
set name = "Phase Jaunt (250E)"
|
||||
set desc = "Utilizes the internal VOID-shift device to rapidly transit to a random destination straight ahead."
|
||||
set category = "Ninja Ability"
|
||||
|
||||
straight_phase()
|
||||
|
||||
//=======//EM PULSE//=======//
|
||||
//Disables nearby tech equipment.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
|
||||
@@ -110,7 +121,6 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2)
|
||||
empulse(U, 2, 3) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
s_coold = 2
|
||||
cell.use(C*10)
|
||||
return
|
||||
|
||||
//=======//ENERGY BLADE//=======//
|
||||
@@ -130,7 +140,6 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
U.put_in_hands(W)
|
||||
cell.use(C*10)
|
||||
else
|
||||
U << "\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.
|
||||
@@ -174,7 +183,6 @@ This could be a lot better but I'm too tired atm.*/
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
cell.use(C*10)
|
||||
A.process()
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
@@ -211,7 +219,6 @@ Must right click on a mob to activate.*/
|
||||
E.master = U
|
||||
spawn(0)//Parallel processing.
|
||||
E.process(M)
|
||||
cell.use(C*10) // Nets now cost what should be most of a standard battery, since your taking someone out of the round
|
||||
else
|
||||
U << "They are already trapped inside an energy net."
|
||||
else
|
||||
@@ -282,36 +289,9 @@ Or otherwise known as anime mode. Which also happens to be ridiculously powerful
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost())
|
||||
if(straight_phase(1, 5, 5, 0))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/destination = get_teleport_loc(U.loc,U,5)
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if(destination&&istype(mobloc, /turf))
|
||||
U.say("Ai Satsugai!")
|
||||
spawn(0)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,U,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
spawn(0)
|
||||
for(var/turf/T in getline(mobloc, destination))
|
||||
spawn(0)
|
||||
T.kill_creatures(U)
|
||||
if(T==mobloc||T==destination) continue
|
||||
spawn(0)
|
||||
anim(T,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
|
||||
handle_teleport_grab(destination, U)
|
||||
U.loc = destination
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
s_coold = 1
|
||||
else
|
||||
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
return
|
||||
U.say("Ai Satsugai!")
|
||||
|
||||
//=======//TELEPORT BEHIND MOB//=======//
|
||||
/*Appear behind a randomly chosen mob while a few decoy teleports appear.
|
||||
@@ -388,3 +368,37 @@ This is so anime it hurts. But that's the point.*/
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
return
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/straight_phase(var/slay = 0, var/min_range=5, var/max_range = 9, var/cost = 25)
|
||||
if(!ninjacost(cost,1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/destination = get_teleport_loc(U.loc,U, rand(min_range, max_range))
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if(destination && istype(mobloc, /turf))
|
||||
spawn(0)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,U,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
if(slay)
|
||||
spawn(0)
|
||||
for(var/turf/T in getline(mobloc, destination))
|
||||
spawn(0)
|
||||
T.kill_creatures(U)
|
||||
if(T==mobloc||T==destination) continue
|
||||
spawn(0)
|
||||
anim(T,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
|
||||
handle_teleport_grab(destination, U)
|
||||
U.loc = destination
|
||||
s_coold = slay
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
return 1
|
||||
else
|
||||
U << "\red The VOID-shift device is malfunctioning, <B>teleportation failed</B>."
|
||||
return 0
|
||||
|
||||
@@ -639,54 +639,66 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
playsound(loc, 'sound/effects/stealthoff.ogg', 75, 1)
|
||||
|
||||
//=======//GENERIC VERB MODIFIERS//=======//
|
||||
var/list/ninja_verbs_default = list(
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjashift,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
|
||||
)
|
||||
|
||||
var/list/ninja_verbs_kamikaze = list(
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjawalk,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
|
||||
)
|
||||
|
||||
var/list/ninja_verbs_equip = list(
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/deinit,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/spideros,
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
)
|
||||
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_equip_verbs()
|
||||
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
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
verbs |= ninja_verbs_equip
|
||||
|
||||
n_gloves.verbs += /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
|
||||
s_initialized = 1
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_equip_verbs()
|
||||
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
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
verbs -= ninja_verbs_equip
|
||||
|
||||
if(n_gloves)
|
||||
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
|
||||
s_initialized = 0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_ninja_verbs()
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjablade
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
|
||||
verbs |= ninja_verbs_default
|
||||
|
||||
s_initialized=1
|
||||
slowdown=0
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_ninja_verbs()
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjaboost
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjablade
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
|
||||
//verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
|
||||
verbs -= ninja_verbs_default
|
||||
|
||||
//=======//KAMIKAZE VERBS//=======//
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/grant_kamikaze(mob/living/carbon/U)
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjanet
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
|
||||
verbs -= ninja_verbs_default
|
||||
verbs |= ninja_verbs_kamikaze
|
||||
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
|
||||
@@ -707,12 +719,8 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/remove_kamikaze(mob/living/carbon/U)
|
||||
if(kamikaze)
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjapulse
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/ninjastar
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjawalk
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjamirage
|
||||
verbs -= ninja_verbs_kamikaze
|
||||
verbs += ninja_verbs_default
|
||||
|
||||
verbs += /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
if(n_gloves)
|
||||
|
||||
Reference in New Issue
Block a user