Files
Polaris/code/game/gamemodes/technomancer/spells/warp_strike.dm
Neerti 515ba0677a Maybe Perhaps Last Major Technomancer PR
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.
2016-08-19 19:21:55 -04:00

78 lines
2.4 KiB
Plaintext

/datum/technomancer/spell/warp_strike
name = "Warp Strike"
desc = "Teleports you next to your target, and attacks them with whatever is in your off-hand, spell or object."
cost = 200
obj_path = /obj/item/weapon/spell/warp_strike
ability_icon_state = "tech_warpstrike"
category = OFFENSIVE_SPELLS
/obj/item/weapon/spell/warp_strike
name = "warp strike"
desc = "The answer to the problem of bringing a knife to a gun fight."
icon_state = "warp_strike"
cast_methods = CAST_RANGED
aspect = ASPECT_TELE
var/datum/effect/effect/system/spark_spread/sparks
/obj/item/weapon/spell/warp_strike/New()
..()
sparks = PoolOrNew(/datum/effect/effect/system/spark_spread)
sparks.set_up(5, 0, src)
sparks.attach(loc)
/obj/item/weapon/spell/warp_strike/on_ranged_cast(atom/hit_atom, mob/user)
var/turf/T = get_turf(hit_atom)
if(T)
//First, we handle who to teleport to.
user.setClickCooldown(5)
var/mob/living/chosen_target = targeting_assist(T,5) //The person who's about to get attacked.
if(!chosen_target)
return 0
//Now we handle picking a place for the user to teleport to.
var/list/tele_target_candidates = view(get_turf(chosen_target), 1)
var/list/valid_tele_targets = list()
var/turf/tele_target = null
for(var/turf/checked_turf in tele_target_candidates)
if(!checked_turf.check_density())
valid_tele_targets.Add(checked_turf)
tele_target = pick(valid_tele_targets)
//Pay for our teleport.
if(!pay_energy(2000) || !tele_target)
return 0
//Teleporting time.
user.forceMove(tele_target)
var/new_dir = get_dir(user, chosen_target)
user.dir = new_dir
sparks.start()
owner.adjust_instability(12)
//Finally, we handle striking the victim with whatever's in the user's offhand.
var/obj/item/I = user.get_inactive_hand()
// List of items we don't want used, for balance reasons or to avoid infinite loops.
var/list/blacklisted_items = list(
/obj/item/weapon/gun,
/obj/item/weapon/spell/warp_strike,
/obj/item/weapon/spell/targeting_matrix
)
if(I)
if(is_path_in_list(I.type, blacklisted_items))
user << "<span class='danger'>You can't use \the [I] while warping!</span>"
return
if(istype(I, /obj/item/weapon))
var/obj/item/weapon/W = I
W.attack(chosen_target, user)
W.afterattack(chosen_target, user)
else
I.attack(chosen_target, user)
I.afterattack(chosen_target, user)
else
chosen_target.attack_hand(user)