mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Major Ninja Patch
Re-implemented some things that were removed a while back by somone who had NO idea which way to hold a keyboard. (He made Phase Shift costless by mistake, broke Adrenaline, made EStars cost your entire battery, etc...). Fixed Ninja objective generation (It should actually happen now!). As well as removed my implementation of the Kamikaze mode, as I found there was a better one already implemented. Lastly I fixed the NinjaHud so Vampires and their Thralls now show up properly on his HUD. Totally worth my Christmas Eve.
This commit is contained in:
@@ -65,6 +65,42 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
s_coold = 1
|
||||
return
|
||||
|
||||
//=======//9-8 TILE TELEPORT//=======//
|
||||
//Click to to teleport 9-10 tiles in direction facing.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt()
|
||||
set name = "Phase Jaunt (125E)"
|
||||
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 125
|
||||
if(!ninjacost(C,1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/destination = get_teleport_loc(U.loc,U,9,1,3,1,0,1)
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if(destination&&istype(mobloc, /turf))//The turf check prevents unusual behavior. Like teleporting out of cryo pods, cloners, mechs, etc.
|
||||
spawn(0)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,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)
|
||||
|
||||
spawn(0)
|
||||
destination.kill_creatures(U)//Any living mobs in teleport area are gibbed. Check turf procs for how it does it.
|
||||
s_coold = 1
|
||||
cell.charge-=(C)
|
||||
else
|
||||
U << "\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.
|
||||
@@ -91,7 +127,11 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
playsound(U.loc, 'sound/effects/phasein.ogg', 25, 1)
|
||||
playsound(U.loc, 'sound/effects/sparks2.ogg', 50, 1)
|
||||
anim(U.loc,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
cell.charge-=C
|
||||
|
||||
//spawn(0) // Commented out for now, possible implementation in a later upgrade tree.
|
||||
//T.kill_creatures(U)
|
||||
s_coold = 1
|
||||
cell.charge-=(C*10)
|
||||
else
|
||||
U << "\red You cannot teleport into solid walls or from solid matter"
|
||||
return
|
||||
@@ -105,7 +145,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 1000
|
||||
if(!ninjacost(C,100)) // EMP's now cost 1,000Energy about 30%
|
||||
if(!ninjacost(C, 1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2)
|
||||
empulse(U, 2, 3) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
@@ -122,7 +162,7 @@ Not sure why this would be useful (it's not) but whatever. Ninjas need their smo
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 200
|
||||
if(!ninjacost(C, 1)) //Same spawn cost but higher upkeep cost
|
||||
if(!ninjacost(C, 1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(!kamikaze)
|
||||
if(!U.get_active_hand()&&!istype(U.get_inactive_hand(), /obj/item/weapon/melee/energy/blade))
|
||||
@@ -155,7 +195,7 @@ This could be a lot better but I'm too tired atm.*/
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 500
|
||||
if(!ninjacost(C,1))
|
||||
if(!ninjacost(C, 1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/targets[] = list()//So yo can shoot while yo throw dawg
|
||||
for(var/mob/living/M in oview(loc))
|
||||
@@ -174,7 +214,7 @@ 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.charge-=C// Ninja stars now cost 100 energy, stil la fair chunk to avoid spamming, will run out of power quickly if used 3 or more times
|
||||
cell.charge-=(C)
|
||||
A.process()
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
@@ -215,7 +255,7 @@ Must right click on a mob to activate.*/
|
||||
E.master = U
|
||||
spawn(0)//Parallel processing.
|
||||
E.process(M)
|
||||
cell.charge-=(C) // Nets now cost what should be most of a standard battery, since your taking someone out of the round
|
||||
cell.charge-=(C)
|
||||
else
|
||||
U << "They are already trapped inside an energy net."
|
||||
//else
|
||||
@@ -236,6 +276,7 @@ Movement impairing would indicate drugs and the like.*/
|
||||
//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.
|
||||
U.SetParalysis(0)
|
||||
U.SetStunned(0)
|
||||
U.SetWeakened(0)
|
||||
/*
|
||||
Due to lag, it was possible to adrenaline boost but remain helpless while life.dm resets player stat.
|
||||
|
||||
@@ -398,7 +398,7 @@ ________________________________________________________________________________
|
||||
<li>*<b>Energy Net</b> (<i>5000E</i>) is a non-lethal solution to incapacitating humanoids. The net is made of non-harmful phase energy and will halt movement as long as it remains in effect--it can be destroyed. If the net is not destroyed, after a certain time it will teleport the target to a holding facility for the Spider Clan and then vanish. You will be notified if the net fails or succeeds in capturing a target in this manner. Combine with energy stars or stripping to ensure success. Abduction never looked this leet.</li>
|
||||
<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>
|
||||
<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>
|
||||
<li>*<b><a href='byond://?src=\ref[src];choice=32'>???</a></b>: unleash the <b>True Ultimate Power!</b></li>
|
||||
<li>*<b>???</b>: unleash the <b>True Ultimate Power!</b></li>
|
||||
<h4>IMPORTANT:</h4>
|
||||
<ul>
|
||||
<li>*Make sure to toggle Special Interaction from the Ninja Equipment menu to interact differently with certain objects.</li>
|
||||
@@ -493,8 +493,8 @@ ________________________________________________________________________________
|
||||
return
|
||||
|
||||
if(k_unlock!=7&&href_list["choice"]!="Return")
|
||||
var/u1=text2num(href_list["choice"])
|
||||
var/u2=(u1?abs(abs(k_unlock-u1)-2):1)
|
||||
var/u1=text2num(href_list["choice"]) // Get the number of the choice
|
||||
var/u2=(u1?abs(abs(k_unlock-u1)-2):1) //If u1 is not 0, get the absoloute value of(absoloute value of K_unlock-u1)-2, otherwise return 1
|
||||
k_unlock=(!u2? k_unlock+1:0)
|
||||
if(k_unlock==7)
|
||||
U << "Anonymous Messenger blinks."
|
||||
@@ -577,7 +577,7 @@ ________________________________________________________________________________
|
||||
A << "There are no potential [href_list["name"]=="Phase Shift"?"destinations" : "targets"] in view."
|
||||
|
||||
if("Unlock Kamikaze")
|
||||
if(input(U)=="Divine Wind" && kamikaze_allowed == 1)
|
||||
if(input(U)=="Divine Wind")
|
||||
if( !(U.stat||U.wear_suit!=src||!s_initialized) )
|
||||
if( !(cell.charge<=1||s_busy) )
|
||||
s_busy = 1
|
||||
@@ -604,10 +604,7 @@ ________________________________________________________________________________
|
||||
s_busy = 0
|
||||
return
|
||||
else
|
||||
if(kamikaze_allowed == 0)
|
||||
U << "\red ERROR: FUNCTION DISABLED!"
|
||||
else
|
||||
U << "\red ERROR: WRONG PASSWORD!"
|
||||
U << "\red ERROR: WRONG PASSWORD!"
|
||||
k_unlock = 0
|
||||
spideros = 0
|
||||
s_busy = 0
|
||||
@@ -1220,6 +1217,10 @@ ________________________________________________________________________________
|
||||
U.client.images += image(tempHud,target,"huddeathsquad")
|
||||
if("Ninja")
|
||||
U.client.images += image(tempHud,target,"hudninja")
|
||||
if("Vampire")
|
||||
U.client.images += image(tempHud,target,"vampire")
|
||||
if("VampThrall")
|
||||
U.client.images += image(tempHud,target,"vampthrall")
|
||||
else//If we don't know what role they have but they have one.
|
||||
U.client.images += image(tempHud,target,"hudunknown1")
|
||||
else//If the silicon mob has no law datum, no inherent laws, or a law zero, add them to the hud.
|
||||
@@ -1241,9 +1242,9 @@ ________________________________________________________________________________
|
||||
if(vchange=="New Name")
|
||||
var/chance = rand(1,100)
|
||||
switch(chance)
|
||||
if(1 to 50)//High chance of a regular name.
|
||||
if(1 to 70)//High chance of a regular name.
|
||||
voice = "[rand(0,1)==1?pick(first_names_female):pick(first_names_male)] [pick(last_names)]"
|
||||
if(51 to 80)//Smaller chance of a clown name.
|
||||
if(71 to 80)//Smaller chance of a clown name.
|
||||
voice = "[pick(clown_names)]"
|
||||
if(81 to 90)//Small chance of a wizard name.
|
||||
voice = "[pick(wizard_first)] [pick(wizard_second)]"
|
||||
@@ -1346,7 +1347,7 @@ It is possible to destroy the net by the occupant or someone else.
|
||||
return
|
||||
|
||||
process(var/mob/living/carbon/M as mob)
|
||||
var/check = 60//30 seconds before teleportation. Could be extended I guess. - Extended to one minute
|
||||
var/check = 30//30 seconds before teleportation. Could be extended I guess.
|
||||
var/mob_name = affecting.name//Since they will report as null if terminated before teleport.
|
||||
//The person can still try and attack the net when inside.
|
||||
while(!isnull(M)&&!isnull(src)&&check>0)//While M and net exist, and 60 seconds have not passed.
|
||||
|
||||
@@ -668,6 +668,7 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
|
||||
/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/ninjajaunt
|
||||
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
|
||||
@@ -680,6 +681,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_ninja_verbs()
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjashift
|
||||
verbs -= /obj/item/clothing/suit/space/space_ninja/proc/ninjajaunt
|
||||
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
|
||||
@@ -691,6 +694,9 @@ As such, it's hard-coded for now. No reason for it not to be, really.
|
||||
/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/ninjajaunt
|
||||
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
|
||||
@@ -715,12 +721,16 @@ 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/ninjajaunt
|
||||
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/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 += /obj/item/clothing/suit/space/space_ninja/proc/stealth
|
||||
if(n_gloves)
|
||||
n_gloves.verbs -= /obj/item/clothing/gloves/space_ninja/proc/toggled
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
/datum/game_mode/ninja/post_setup()
|
||||
for(var/datum/mind/ninja in ninjas)
|
||||
if(ninja.current && !(istype(ninja.current,/mob/living/carbon/human))) return 0
|
||||
//forge_ninja_objectives(ninja)
|
||||
forge_ninja_objectives(ninja)
|
||||
var/mob/living/carbon/human/N = ninja.current
|
||||
N.internal = N.s_store
|
||||
N.internals.icon_state = "internal1"
|
||||
|
||||
@@ -94,7 +94,6 @@ var/list/admin_verbs_fun = list(
|
||||
/client/proc/toggle_random_events,
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/editappear,
|
||||
/client/proc/toggle_kamikaze
|
||||
)
|
||||
var/list/admin_verbs_spawn = list(
|
||||
/datum/admins/proc/spawn_atom, /*allows us to spawn instances*/
|
||||
|
||||
@@ -918,19 +918,4 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
config.allow_random_events = 0
|
||||
usr << "Random events disabled"
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled random events.", 1)
|
||||
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
var/global/kamikaze_allowed = 0
|
||||
/client/proc/toggle_kamikaze()
|
||||
|
||||
set category = "Fun"
|
||||
set name = "Toggle Kamikaze"
|
||||
set desc = "Toggles the ability for Ninjas to use Kamikaze mode."
|
||||
|
||||
if (kamikaze_allowed == 0)
|
||||
kamikaze_allowed = 1
|
||||
usr << "Kamikaze mode globally enabled."
|
||||
else
|
||||
kamikaze_allowed = 0
|
||||
usr << "Kamikaze mode globally disabled."
|
||||
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
Reference in New Issue
Block a user