Files
Polaris/code/game/gamemodes/technomancer/spells/blink.dm
Neerti 8d37a86ba5 Technomancer Tweaks
Cost for various spells and equipment adjusted greatly.  In general, things are cheaper, and everything should now be in multiples of 25, so no points are wasted.
The default jumpsuit for Technomancers is now heavily insulated, protecting them from tasers, batons, and perhaps unfortunate lightning strikes.
Instability between 31 and 50 made less harsh.
Wards made with a scepter of enhancement will break the cloak of anyone invisible that it can see.
Fire aura buffed, increased rate of heating as well as temperature cap for both non-scepter and scepter effects.
Reflect spell made more forgiving for the Technomancer, lasting longer before expiring.
Projectile spells should be able to hit people more reliably.
2016-09-18 20:48:01 -04:00

71 lines
2.2 KiB
Plaintext

/datum/technomancer/spell/blink
name = "Blink"
desc = "Force the target to teleport a short distance away. This target could be anything from something lying on the ground, to someone trying to \
fight you, or even yourself. Using this on someone next to you makes their potential distance after teleportation greater."
enhancement_desc = "Blink distance is increased greatly."
cost = 50
obj_path = /obj/item/weapon/spell/blink
category = UTILITY_SPELLS
/obj/item/weapon/spell/blink
name = "blink"
desc = "Teleports you or someone else a short distance away."
icon_state = "blink"
cast_methods = CAST_RANGED | CAST_MELEE | CAST_USE
aspect = ASPECT_TELE
/proc/safe_blink(atom/movable/AM, var/range = 3)
if(AM.anchored || !AM.loc)
return
var/turf/starting = get_turf(AM)
var/list/targets = list()
valid_turfs:
for(var/turf/simulated/T in range(AM, range))
if(T.density || istype(T, /turf/simulated/mineral)) //Don't blink to vacuum or a wall
continue
for(var/atom/movable/stuff in T.contents)
if(stuff.density)
continue valid_turfs
targets.Add(T)
if(!targets.len)
return
var/turf/simulated/destination = null
destination = pick(targets)
if(destination)
if(ismob(AM))
var/mob/living/L = AM
if(L.buckled)
L.buckled.unbuckle_mob()
AM.forceMove(destination)
AM.visible_message("<span class='notice'>\The [AM] vanishes!</span>")
AM << "<span class='notice'>You suddenly appear somewhere else!</span>"
new /obj/effect/effect/sparks(destination)
new /obj/effect/effect/sparks(starting)
return
/obj/item/weapon/spell/blink/on_ranged_cast(atom/hit_atom, mob/user)
if(istype(hit_atom, /atom/movable))
var/atom/movable/AM = hit_atom
if(check_for_scepter())
safe_blink(user, 6)
else
safe_blink(AM, 3)
/obj/item/weapon/spell/blink/on_use_cast(mob/user)
if(check_for_scepter())
safe_blink(user, 10)
else
safe_blink(user, 6)
/obj/item/weapon/spell/blink/on_melee_cast(atom/hit_atom, mob/living/user, def_zone)
if(istype(hit_atom, /atom/movable))
var/atom/movable/AM = hit_atom
visible_message("<span class='danger'>\The [user] reaches out towards \the [AM] with a glowing hand.</span>")
if(check_for_scepter())
safe_blink(user, 10)
else
safe_blink(AM, 6)