mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Removes Space Ninjas
This commit is contained in:
@@ -1,447 +0,0 @@
|
||||
/*
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
+++++++++++++++++++++++++++++++++// //++++++++++++++++++++++++++++++++++
|
||||
==================================SPACE NINJA ABILITIES====================================
|
||||
___________________________________________________________________________________________
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*/
|
||||
|
||||
//=======//SAFETY CHECK//=======//
|
||||
/*
|
||||
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.
|
||||
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)
|
||||
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(cell.charge<C)
|
||||
U << "\red Not enough energy."
|
||||
return 1
|
||||
switch(X)
|
||||
if(1)
|
||||
cancel_stealth()//Get rid of it.
|
||||
if(2)
|
||||
if(s_bombs<=0)
|
||||
U << "\red There are no more smoke bombs remaining."
|
||||
return 1
|
||||
if(3)
|
||||
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.
|
||||
|
||||
//=======//TELEPORT GRAB CHECK//=======//
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/handle_teleport_grab(turf/T, mob/living/U)
|
||||
if(istype(U.get_active_hand(),/obj/item/weapon/grab))//Handles grabbed persons.
|
||||
var/obj/item/weapon/grab/G = U.get_active_hand()
|
||||
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
|
||||
if(istype(U.get_inactive_hand(),/obj/item/weapon/grab))
|
||||
var/obj/item/weapon/grab/G = U.get_inactive_hand()
|
||||
G.affecting.loc = locate(T.x+rand(-1,1),T.y+rand(-1,1),T.z)//variation of position.
|
||||
return
|
||||
|
||||
//=======//SMOKE//=======//
|
||||
/*Summons smoke in radius of user.
|
||||
Not sure why this would be useful (it's not) but whatever. Ninjas need their smoke bombs.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjasmoke()
|
||||
set name = "Smoke Bomb"
|
||||
set desc = "Blind your enemies momentarily with a well-placed smoke bomb."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0//Will not see it when right clicking.
|
||||
|
||||
if(!ninjacost(,2))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
U << "\blue There are <B>[s_bombs]</B> smoke bombs remaining."
|
||||
var/datum/effect/effect/system/bad_smoke_spread/smoke = new /datum/effect/effect/system/bad_smoke_spread()
|
||||
smoke.set_up(10, 0, U.loc)
|
||||
smoke.start()
|
||||
playsound(U.loc, 'sound/effects/bamf.ogg', 50, 2)
|
||||
s_bombs--
|
||||
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 (750E)"
|
||||
set desc = "Utilizes the internal VOID-shift device to rapidly transit in direction facing."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 750
|
||||
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(mobloc.loc.name != "\improper SpiderClan Outpost")
|
||||
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>."
|
||||
else
|
||||
U<< "\red Your <b>NINJA HONOR</b> prevents you from teleporting here!"
|
||||
return
|
||||
|
||||
|
||||
|
||||
//=======//RIGHT CLICK TELEPORT//=======//
|
||||
//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 (1500E)"
|
||||
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.
|
||||
set src = usr.contents//Fixes verbs not attaching properly for objects. Praise the DM reference guide!
|
||||
|
||||
var/C = 1500
|
||||
if(!ninjacost(C,1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/turf/mobloc = get_turf(U.loc)//To make sure that certain things work properly below.
|
||||
if(mobloc.loc.name != "\improper SpiderClan Outpost")
|
||||
if((!T.density)&&istype(mobloc, /turf))
|
||||
spawn(0)
|
||||
playsound(U.loc, 'sound/effects/sparks4.ogg', 50, 1)
|
||||
anim(mobloc,src,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
handle_teleport_grab(T, U)
|
||||
U.loc = T
|
||||
|
||||
spawn(0)
|
||||
spark_system.start()
|
||||
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)
|
||||
|
||||
//spawn(0) // Commented out for now, possible implementation in a later upgrade tree.
|
||||
//T.kill_creatures(U)
|
||||
s_coold = 1
|
||||
cell.charge-=(C)
|
||||
else
|
||||
U << "\red You cannot teleport into solid walls or from solid matter"
|
||||
else
|
||||
U<< "\red Your <b>NINJA HONOR</b> prevents you from teleporting here!"
|
||||
return
|
||||
|
||||
//=======//EM PULSE//=======//
|
||||
//Disables nearby tech equipment.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjapulse()
|
||||
set name = "EM Burst (2,000E)"
|
||||
set desc = "Disable any nearby technology with a electro-magnetic pulse."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 2000
|
||||
if(!ninjacost(C, 1))
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
playsound(U.loc, 'sound/effects/EMPulse.ogg', 60, 2)
|
||||
emp_proof = 1 // This is a pretty crappy workaround, but the alternative was creating a special EMPulse proc just for Ninjas that doesn't trigger the act on their suits. - Dave
|
||||
empulse(U, 4, 6) //Procs sure are nice. Slightly weaker than wizard's disable tch.
|
||||
s_coold = 2
|
||||
cell.charge-=(C)
|
||||
|
||||
spawn(3)
|
||||
emp_proof = 0
|
||||
return
|
||||
|
||||
//=======//ENERGY BLADE//=======//
|
||||
//Summons a blade of energy in active hand.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjablade()
|
||||
set name = "Energy Blade (500E)"
|
||||
set desc = "Create a focused beam of energy in your active hand."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 500
|
||||
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))
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
U.put_in_hands(W)
|
||||
cell.charge-=C
|
||||
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.
|
||||
if(!U.get_active_hand())
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
U.put_in_hands(W)
|
||||
if(!U.get_inactive_hand())
|
||||
var/obj/item/weapon/melee/energy/blade/W = new()
|
||||
U.put_in_inactive_hand(W)
|
||||
spark_system.start()
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
s_coold = 1
|
||||
return
|
||||
|
||||
//=======//NINJA STARS//=======//
|
||||
/*Shoots ninja stars at random people.
|
||||
This could be a lot better but I'm too tired atm.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjastar()
|
||||
set name = "Energy Star (500E)"
|
||||
set desc = "Launches an energy star at a random living target."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/C = 500
|
||||
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))
|
||||
if(M.stat) continue//Doesn't target corpses or paralyzed persons.
|
||||
targets.Add(M)
|
||||
if(targets.len)
|
||||
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 = U.loc
|
||||
var/atom/targloc = get_turf(target)
|
||||
if (!targloc || !istype(targloc, /turf) || !curloc)
|
||||
return
|
||||
if (targloc == curloc)
|
||||
return
|
||||
var/obj/item/projectile/energy/dart/A = new /obj/item/projectile/energy/dart(U.loc)
|
||||
A.current = curloc
|
||||
A.yo = targloc.y - curloc.y
|
||||
A.xo = targloc.x - curloc.x
|
||||
cell.charge-=(C)
|
||||
A.process()
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
return
|
||||
|
||||
//=======//ENERGY NET//=======//
|
||||
/*Allows the ninja to capture people, I guess.
|
||||
Must right click on a mob to activate.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjanet(mob/living/carbon/M in oview())//Only living carbon mobs.
|
||||
set name = "Energy Net (2,500E)"
|
||||
set desc = "Captures a fallen opponent in a net of energy. Will teleport them to a holding facility after 30 seconds."
|
||||
set category = null
|
||||
set src = usr.contents
|
||||
|
||||
var/C = 2500
|
||||
if(!ninjacost(C,1)&&iscarbon(M)) // Nets now cost 8,000
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(M.client)//Monkeys without a client can still step_to() and bypass the net. Also, netting inactive people is lame.
|
||||
//if(M)//DEBUG
|
||||
if(!locate(/obj/effect/energy_net) in M.loc)//Check if they are already being affected by an energy net.
|
||||
for(var/turf/T in getline(U.loc, M.loc))
|
||||
if(T.density)//Don't want them shooting nets through walls. It's kind of cheesy.
|
||||
U << "You may not use an energy net through solid obstacles!"
|
||||
return
|
||||
spawn(0)
|
||||
U.Beam(M,"n_beam",,15)
|
||||
M.anchored = 1//Anchors them so they can't move.
|
||||
var/obj/effect/stop/S
|
||||
S = new /obj/effect/stop
|
||||
S.victim = M
|
||||
S.loc = M.loc
|
||||
|
||||
var/obj/effect/energy_net/E = new /obj/effect/energy_net(M.loc)
|
||||
E.layer = M.layer+1//To have it appear one layer above the mob.
|
||||
for(var/mob/O in viewers(U, 3))
|
||||
O.show_message(text("\red [] caught [] with an energy net!", U, M), 1)
|
||||
E.affecting = M
|
||||
E.master = U
|
||||
spawn(0)//Parallel processing.
|
||||
E.process(M)
|
||||
cell.charge-=(C)
|
||||
else
|
||||
U << "They are already trapped inside an energy net."
|
||||
else
|
||||
U << "They will bring no honor to your Clan!"
|
||||
return
|
||||
|
||||
//=======//ADRENALINE BOOST//=======//
|
||||
/*Wakes the user so they are able to do their thing. Also injects a decent dose of uranium.
|
||||
Movement impairing would indicate drugs and the like.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaboost()
|
||||
set name = "Adrenaline Boost"
|
||||
set desc = "Inject a secret chemical that will counteract all movement-impairing effect."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost(,3))//Have to make sure stat is not counted for this ability.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
//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, uranium, 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.
|
||||
This lead to me and others spamming adrenaline boosters because they failed to kick in on time.
|
||||
It's technically possible to come back from crit with this but it is very temporary.
|
||||
Life.dm will kick the player back into unconsciosness the next process loop.
|
||||
*/
|
||||
U.stat = 0//At least now you should be able to teleport away or shoot ninja stars.
|
||||
if(U.said_last_words)
|
||||
U.said_last_words=0
|
||||
spawn(30)//Slight delay so the enemy does not immedietly know the ability was used. Due to lag, this often came before waking up.
|
||||
U.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"))
|
||||
spawn(70)
|
||||
reagents.reaction(U, 2)
|
||||
reagents.trans_id_to(U, "uranium", a_transfer)
|
||||
U << "\red You are beginning to feel the after-effect of the injection."
|
||||
a_boost--
|
||||
s_coold = 3
|
||||
return
|
||||
|
||||
/*
|
||||
===================================================================================
|
||||
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<KAMIKAZE MODE>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
|
||||
===================================================================================
|
||||
Or otherwise known as anime mode. Which also happens to be ridiculously powerful.
|
||||
*/
|
||||
|
||||
//=======//NINJA MOVEMENT//=======//
|
||||
//Also makes you move like you're on crack.
|
||||
/obj/item/clothing/suit/space/space_ninja/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 Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
if(!U.incorporeal_move)
|
||||
U.incorporeal_move = 2
|
||||
U << "\blue You will now phase through solid matter."
|
||||
else
|
||||
U.incorporeal_move = 0
|
||||
U << "\blue You will no-longer phase through solid matter."
|
||||
return
|
||||
|
||||
//=======//5 TILE TELEPORT/GIB//=======//
|
||||
//Allows to gib up to five squares in a straight line. Seriously.
|
||||
/obj/item/clothing/suit/space/space_ninja/proc/ninjaslayer()
|
||||
set name = "Phase Slayer"
|
||||
set desc = "Utilizes the internal VOID-shift device to mutilate creatures in a straight line."
|
||||
set category = "Ninja Ability"
|
||||
set popup_menu = 0
|
||||
if(!ninjacost())
|
||||
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
|
||||
|
||||
//=======//TELEPORT BEHIND MOB//=======//
|
||||
/*Appear behind a randomly chosen mob while a few decoy teleports appear.
|
||||
This is so anime it hurts. But that's the point.*/
|
||||
/obj/item/clothing/suit/space/space_ninja/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 Ability"
|
||||
set popup_menu = 0
|
||||
|
||||
if(!ninjacost())//Simply checks for stat.
|
||||
var/mob/living/carbon/human/U = affecting
|
||||
var/targets[]
|
||||
targets = new()
|
||||
for(var/mob/living/M in oview(6))
|
||||
if(M.stat) continue//Doesn't target corpses or paralyzed people.
|
||||
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&&istype(mobloc, /turf))
|
||||
U.say("Kumo no Shinkiro!")
|
||||
var/turf/picked = locate(locx,locy,mobloc.z)
|
||||
spawn(0)
|
||||
playsound(U.loc, "sparks", 50, 1)
|
||||
anim(mobloc,U,'icons/mob/mob.dmi',,"phaseout",,U.dir)
|
||||
|
||||
spawn(0)
|
||||
var/limit = 4
|
||||
for(var/turf/T in oview(5))
|
||||
if(prob(20))
|
||||
spawn(0)
|
||||
anim(T,U,'icons/mob/mob.dmi',,"phasein",,U.dir)
|
||||
limit--
|
||||
if(limit<=0) break
|
||||
|
||||
handle_teleport_grab(picked, U)
|
||||
U.loc = picked
|
||||
U.dir = target.dir
|
||||
|
||||
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>."
|
||||
else
|
||||
U << "\red There are no targets in view."
|
||||
return
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1321,21 +1321,7 @@ datum
|
||||
|
||||
|
||||
check_completion()
|
||||
if(!ishuman(owner.current))
|
||||
return 0
|
||||
if(!owner.current || owner.current.stat == 2)
|
||||
return 0
|
||||
if(!(istype(owner.current:wear_suit, /obj/item/clothing/suit/space/space_ninja)&&owner.current:wear_suit:s_initialized))
|
||||
return 0
|
||||
var/current_amount
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = owner.current:wear_suit
|
||||
if(!S.stored_research.len)
|
||||
return 0
|
||||
else
|
||||
for(var/datum/tech/current_data in S.stored_research)
|
||||
if(current_data.level>1) current_amount+=(current_data.level-1)
|
||||
if(current_amount<target_amount) return 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
debrain//I want braaaainssss
|
||||
@@ -1414,34 +1400,7 @@ datum
|
||||
|
||||
|
||||
check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
|
||||
var/captured_amount = 0
|
||||
var/area/ninja/holding/A = locate()
|
||||
for(var/mob/living/carbon/human/M in A)//Humans.
|
||||
if(M.stat==2)//Dead folks are worth less.
|
||||
captured_amount+=0.5
|
||||
continue
|
||||
captured_amount+=1
|
||||
for(var/mob/living/carbon/monkey/M in A)//Monkeys are almost worthless, you failure.
|
||||
captured_amount+=0.1
|
||||
for(var/mob/living/carbon/alien/larva/M in A)//Larva are important for research.
|
||||
if(M.stat==2)
|
||||
captured_amount+=0.5
|
||||
continue
|
||||
captured_amount+=1
|
||||
for(var/mob/living/carbon/alien/humanoid/M in A)//Aliens are worth twice as much as humans.
|
||||
if(istype(M, /mob/living/carbon/alien/humanoid/queen))//Queens are worth three times as much as humans.
|
||||
if(M.stat==2)
|
||||
captured_amount+=1.5
|
||||
else
|
||||
captured_amount+=3
|
||||
continue
|
||||
if(M.stat==2)
|
||||
captured_amount+=1
|
||||
continue
|
||||
captured_amount+=2
|
||||
if(captured_amount<target_amount)
|
||||
return 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
datum/objective/silence
|
||||
explanation_text = "Do not allow anyone to escape the station. Only allow the shuttle to be called when everyone is dead and your story is the only one left."
|
||||
|
||||
@@ -1,182 +0,0 @@
|
||||
/datum/game_mode/var/list/datum/mind/ninjas = list()
|
||||
// Keep in mind ninja-procs that aren't here will be where the event's defined
|
||||
/datum/game_mode/ninja
|
||||
name = "ninja"
|
||||
config_tag = "ninja"
|
||||
required_players = 10 //Can be adjusted later, should suffice for now.
|
||||
required_players_secret = 10
|
||||
required_enemies = 1
|
||||
recommended_enemies = 1
|
||||
var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
|
||||
var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
|
||||
var/finished = 0
|
||||
|
||||
/datum/game_mode/ninja/announce()
|
||||
world << "<B>The current game mode is Ninja!</B>"
|
||||
|
||||
/datum/game_mode/ninja/can_start()
|
||||
if(!..())
|
||||
return 0
|
||||
var/list/datum/mind/possible_ninjas = get_players_for_role(BE_NINJA)
|
||||
if(possible_ninjas.len==0)
|
||||
return 0
|
||||
var/datum/mind/ninja = pick(possible_ninjas)
|
||||
ninjas += ninja
|
||||
modePlayer += ninja
|
||||
ninja.assigned_role = "MODE" //So they aren't chosen for other jobs.
|
||||
ninja.special_role = "Ninja"
|
||||
ninja.original = ninja.current
|
||||
if(ninjastart.len == 0)
|
||||
ninja.current << "<B>\red A proper starting location for you could not be found, please report this bug!</B>"
|
||||
ninja.current << "<B>\red Attempting to place at a carpspawn.</B>"
|
||||
for(var/obj/effect/landmark/L in landmarks_list)
|
||||
if(L.name == "carpspawn")
|
||||
ninjastart.Add(L)
|
||||
if(ninjastart.len == 0 && latejoin.len > 0)
|
||||
ninja.current << "<B>\red Still no spawneable locations could be found. Defaulting to latejoin.</B>"
|
||||
return 1
|
||||
else if (ninjastart.len == 0)
|
||||
ninja.current << "<B>\red Still no spawneable locations could be found. Aborting.</B>"
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/datum/game_mode/ninja/pre_setup()
|
||||
for(var/datum/mind/ninja in ninjas)
|
||||
ninja.current << browse(null, "window=playersetup")
|
||||
ninja.current = create_space_ninja(pick(ninjastart.len ? ninjastart : latejoin))
|
||||
ninja.current.ckey = ninja.key
|
||||
return 1
|
||||
|
||||
/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)
|
||||
var/mob/living/carbon/human/N = ninja.current
|
||||
N.internal = N.s_store
|
||||
N.internals.icon_state = "internal1"
|
||||
if(N.wear_suit && istype(N.wear_suit,/obj/item/clothing/suit/space/space_ninja))
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = N.wear_suit
|
||||
S:randomize_param()
|
||||
spawn (rand(waittime_l, waittime_h))
|
||||
send_intercept()
|
||||
return ..()
|
||||
|
||||
/datum/game_mode/ninja/check_finished()
|
||||
if(config.continous_rounds)
|
||||
return ..()
|
||||
var/ninjas_alive = 0
|
||||
for(var/datum/mind/ninja in ninjas)
|
||||
if(!istype(ninja.current,/mob/living/carbon/human))
|
||||
continue
|
||||
if(ninja.current.stat==2)
|
||||
continue
|
||||
ninjas_alive++
|
||||
if (ninjas_alive)
|
||||
return ..()
|
||||
else
|
||||
finished = 1
|
||||
return 1
|
||||
|
||||
/datum/game_mode/ninja/proc/forge_ninja_objectives(var/datum/mind/ninja)
|
||||
var/objective_list[] = list(1,2,3,4,5)
|
||||
for(var/i=rand(2,4),i>0,i--)
|
||||
switch(pick(objective_list))
|
||||
if(1)//Kill
|
||||
var/datum/objective/assassinate/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja_objective.target = ninja_objective.find_target()
|
||||
if(ninja_objective.target != "Free Objective")
|
||||
ninja.objectives += ninja_objective
|
||||
else
|
||||
i++
|
||||
objective_list -= 1 // No more than one kill objective
|
||||
if(2)//Steal
|
||||
var/datum/objective/steal/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja_objective.target = ninja_objective.find_target()
|
||||
ninja.objectives += ninja_objective
|
||||
if(3)//Protect
|
||||
var/datum/objective/protect/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja_objective.target = ninja_objective.find_target()
|
||||
if(ninja_objective.target != "Free Objective")
|
||||
ninja.objectives += ninja_objective
|
||||
else
|
||||
i++
|
||||
objective_list -= 3
|
||||
if(4)//Download
|
||||
var/datum/objective/download/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja_objective.gen_amount_goal()
|
||||
ninja.objectives += ninja_objective
|
||||
objective_list -= 4
|
||||
if(5)//Harm
|
||||
var/datum/objective/harm/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja_objective.target = ninja_objective.find_target()
|
||||
if(ninja_objective.target != "Free Objective")
|
||||
ninja.objectives += ninja_objective
|
||||
else
|
||||
i++
|
||||
objective_list -= 5
|
||||
|
||||
var/datum/objective/survive/ninja_objective = new
|
||||
ninja_objective.owner = ninja
|
||||
ninja.objectives += ninja_objective
|
||||
ninja.current.mind = ninja
|
||||
|
||||
var/directive = generate_ninja_directive("heel")//Only hired by antags, not NT
|
||||
ninja.current << "You are an elite mercenary assassin of the Spider Clan, [ninja.current.real_name]. You have a variety of abilities at your disposal, thanks to your nano-enhanced cyber armor.\nYour current directive is: \red <B>[directive]</B>\n \blue Try your best to adhere to this."
|
||||
ninja.store_memory("<B>Directive:</B> \red [directive]<br>")
|
||||
|
||||
var/obj_count = 1
|
||||
ninja.current << "\blue Your current objectives:"
|
||||
for(var/datum/objective/objective in ninja.objectives)
|
||||
ninja.current << "<B>Objective #[obj_count]</B>: [objective.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
/datum/game_mode/proc/auto_declare_completion_ninja()
|
||||
if(ninjas.len)
|
||||
var/text = "<FONT size = 2><B>The ninjas were:</B></FONT>"
|
||||
for(var/datum/mind/ninja in ninjas)
|
||||
var/ninjawin = 1
|
||||
|
||||
text += "<br>[ninja.key] was [ninja.name] ("
|
||||
if(ninja.current)
|
||||
if(ninja.current.stat == DEAD)
|
||||
text += "died"
|
||||
else
|
||||
text += "survived"
|
||||
if(ninja.current.real_name != ninja.name)
|
||||
text += " as [ninja.current.real_name]"
|
||||
else
|
||||
text += "body destroyed"
|
||||
text += ")"
|
||||
|
||||
if(ninja.objectives.len)//If the ninja had no objectives, don't need to process this.
|
||||
var/count = 1
|
||||
for(var/datum/objective/objective in ninja.objectives)
|
||||
if(objective.check_completion())
|
||||
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='green'><B>Success!</B></font>"
|
||||
feedback_add_details("traitor_objective","[objective.type]|SUCCESS")
|
||||
else
|
||||
text += "<br><B>Objective #[count]</B>: [objective.explanation_text] <font color='red'>Fail.</font>"
|
||||
feedback_add_details("traitor_objective","[objective.type]|FAIL")
|
||||
ninjawin = 0
|
||||
count++
|
||||
|
||||
var/special_role_text
|
||||
if(ninja.special_role)
|
||||
special_role_text = lowertext(ninja.special_role)
|
||||
else
|
||||
special_role_text = "antagonist"
|
||||
|
||||
if(ninjawin)
|
||||
text += "<br><font color='green'><B>The [special_role_text] was successful!</B></font>"
|
||||
feedback_add_details("traitor_success","SUCCESS")
|
||||
else
|
||||
text += "<br><font color='red'><B>The [special_role_text] has failed!</B></font>"
|
||||
feedback_add_details("traitor_success","FAIL")
|
||||
|
||||
world << text
|
||||
return 1
|
||||
@@ -663,21 +663,7 @@ datum/objective/download
|
||||
|
||||
|
||||
check_completion()
|
||||
if(!ishuman(owner.current))
|
||||
return 0
|
||||
if(!owner.current || owner.current.stat == DEAD)
|
||||
return 0
|
||||
if(!(istype(owner.current:wear_suit, /obj/item/clothing/suit/space/space_ninja)&&owner.current:wear_suit:s_initialized))
|
||||
return 0
|
||||
var/current_amount
|
||||
var/obj/item/clothing/suit/space/space_ninja/S = owner.current:wear_suit
|
||||
if(!S.stored_research.len)
|
||||
return 0
|
||||
else
|
||||
for(var/datum/tech/current_data in S.stored_research)
|
||||
if(current_data.level>1) current_amount+=(current_data.level-1)
|
||||
if(current_amount<target_amount) return 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
@@ -689,34 +675,8 @@ datum/objective/capture
|
||||
|
||||
|
||||
check_completion()//Basically runs through all the mobs in the area to determine how much they are worth.
|
||||
var/captured_amount = 0
|
||||
var/area/ninja/holding/A = locate()
|
||||
for(var/mob/living/carbon/human/M in A)//Humans.
|
||||
if(M.stat == DEAD)//Dead folks are worth less.
|
||||
captured_amount+=0.5
|
||||
continue
|
||||
captured_amount+=1
|
||||
for(var/mob/living/carbon/monkey/M in A)//Monkeys are almost worthless, you failure.
|
||||
captured_amount+=0.1
|
||||
for(var/mob/living/carbon/alien/larva/M in A)//Larva are important for research.
|
||||
if(M.stat == DEAD)
|
||||
captured_amount+=0.5
|
||||
continue
|
||||
captured_amount+=1
|
||||
for(var/mob/living/carbon/alien/humanoid/M in A)//Aliens are worth twice as much as humans.
|
||||
if(istype(M, /mob/living/carbon/alien/humanoid/queen))//Queens are worth three times as much as humans.
|
||||
if(M.stat == DEAD)
|
||||
captured_amount+=1.5
|
||||
else
|
||||
captured_amount+=3
|
||||
continue
|
||||
if(M.stat == DEAD)
|
||||
captured_amount+=1
|
||||
continue
|
||||
captured_amount+=2
|
||||
if(captured_amount<target_amount)
|
||||
return 0
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user