mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-25 01:22:24 +00:00
Adds ability to sort the spells section of the catalog into categories. The categories available are 'All', 'Offensive', 'Defensive', 'Utility', and 'Support'. Removes preset section on catalog as it was unused. Projectile spells now have a sound when fired. Haste lasts five seconds instead of three. Repel Missiles lasts for five minutes instead of two. All healing spells work five times as fast, healing in five seconds instead of twenty five seconds. The amount of instability and healing done has been multiplied to remain consistent. Passwall can now be used on more than just walls, if there's something dense on the same tile. Force Missile is now 25% cheaper to cast, and has a cooldown of .5 seconds instead of one second, and does 5 more damage. Beam's damage is increased by 10, and energy cost decreased by 25%. Lightning's warm-up time is now one second instead of two. Overload now costs 10% of total energy instead of 15%, and damage scaled with 4% of their current energy reserves, and 5% with the Scepter, instead of 3%/4%. Additionally, instability per shot is lowered to 12 from 15. Track now costs 25 points instead of 30 in the catalog, because roundness. Fire Aura should look more impressive without a Scepter. Fixes bug where shooting Lightning made you motionless for twenty seconds.
77 lines
2.3 KiB
Plaintext
77 lines
2.3 KiB
Plaintext
/datum/technomancer/spell/track
|
|
name = "Track"
|
|
desc = "Acts as directional guidance towards an object that belongs to you or your team. It can also point towards your allies. \
|
|
Wonderful if you're worried someone will steal your valuables, like a certain shiny Scepter..."
|
|
enhancement_desc = "You will be able to track most other entities in addition to your belongings and allies."
|
|
cost = 25
|
|
obj_path = /obj/item/weapon/spell/track
|
|
ability_icon_state = "tech_track"
|
|
category = UTILITY_SPELLS
|
|
|
|
// This stores a ref to all important items that belong to a Technomancer, in case of theft. Used by the spell below.
|
|
// I feel dirty for adding yet another global list used by one thing, but the only alternative is to loop through world, and yeahhh.
|
|
var/list/technomancer_belongings = list()
|
|
|
|
/obj/item/weapon/spell/track
|
|
name = "track"
|
|
icon_state = "track"
|
|
desc = "Never lose your stuff again!"
|
|
cast_methods = CAST_USE
|
|
aspect = ASPECT_TELE
|
|
var/atom/movable/tracked = null // The thing to point towards.
|
|
var/tracking = 0 // If one, points towards tracked.
|
|
|
|
/obj/item/weapon/spell/track/Destroy()
|
|
tracked = null
|
|
tracking = 0
|
|
|
|
/obj/item/weapon/spell/track/on_use_cast(mob/user)
|
|
if(tracking)
|
|
tracking = 0
|
|
user << "<span class='notice'>You stop tracking for \the [tracked]'s whereabouts.</span>"
|
|
tracked = null
|
|
return
|
|
|
|
var/can_track_non_allies = 0
|
|
var/list/object_choices = technomancer_belongings.Copy()
|
|
if(check_for_scepter())
|
|
can_track_non_allies = 1
|
|
var/list/mob_choices = list()
|
|
for(var/mob/living/L in mob_list)
|
|
if(!is_ally(L) && !can_track_non_allies)
|
|
continue
|
|
if(L == user)
|
|
continue
|
|
mob_choices += L
|
|
var/choice = input(user,"Decide what or who to track.","Tracking") as null|anything in object_choices + mob_choices
|
|
if(choice)
|
|
tracked = choice
|
|
tracking = 1
|
|
track()
|
|
|
|
/obj/item/weapon/spell/track/proc/track()
|
|
if(!tracking)
|
|
icon_state = "track"
|
|
return
|
|
|
|
if(!tracked)
|
|
icon_state = "track_unknown"
|
|
|
|
if(tracked.z != owner.z)
|
|
icon_state = "track_unknown"
|
|
|
|
else
|
|
set_dir(get_dir(src,get_turf(tracked)))
|
|
|
|
switch(get_dist(src,get_turf(tracked)))
|
|
if(0)
|
|
icon_state = "track_direct"
|
|
if(1 to 8)
|
|
icon_state = "track_close"
|
|
if(9 to 16)
|
|
icon_state = "track_medium"
|
|
if(16 to INFINITY)
|
|
icon_state = "track_far"
|
|
|
|
spawn(5)
|
|
.() |