Files
Aurora.3/code/datums/spells/teleport.dm
uporotiy da422ec0f2 Spells update. I'm still waiting for that emp_act(), muskets, so I can finish the base spells.
Traps framework complete. Two sample traps.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@885 316c924e-a436-60f5-8080-3fe189b3f50e
2011-01-17 15:07:30 +00:00

61 lines
1.8 KiB
Plaintext

/obj/spell/teleport
name = "Teleport"
desc = "This spell teleports you to a type of area of your selection."
school = "abjuration"
recharge = 600
clothes_req = 1
invocation = "SCYAR NILA"
invocation_type = "none" //hardcoded into the spell due to its specifics
range = -1 //can affect only the user by default, but with var editing can be a teleport other spell
var/smoke_spread = 1 //if set to 0, no smoke spreads when teleporting
/obj/spell/blink/Click()
..()
if(!cast_check())
return
var/mob/M
if(range>=0)
M = input("Choose whom to teleport", "ABRAKADABRA") as mob in view(usr,range)
else
M = usr
invocation()
var/A
A = input("Area to jump to", "BOOYEA", A) in teleportlocs
var/area/thearea = teleportlocs[A]
usr.say("[invocation] [uppertext(A)]")
if(usr.gender=="male")
playsound(usr.loc, pick('vs_chant_conj_hm.wav','vs_chant_conj_lm.wav','vs_chant_ench_hm.wav','vs_chant_ench_lm.wav','vs_chant_evoc_hm.wav','vs_chant_evoc_lm.wav','vs_chant_illu_hm.wav','vs_chant_illu_lm.wav','vs_chant_necr_hm.wav','vs_chant_necr_lm.wav'), 100, 1)
else
playsound(usr.loc, pick('vs_chant_conj_hf.wav','vs_chant_conj_lf.wav','vs_chant_ench_hf.wav','vs_chant_ench_lf.wav','vs_chant_evoc_hf.wav','vs_chant_evoc_lf.wav','vs_chant_illu_hf.wav','vs_chant_illu_lf.wav','vs_chant_necr_hf.wav','vs_chant_necr_lf.wav'), 100, 1)
var/datum/effects/system/harmless_smoke_spread/smoke = new /datum/effects/system/harmless_smoke_spread()
if(smoke_spread)
smoke.set_up(5, 0, usr.loc)
smoke.attach(usr)
smoke.start()
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
if(!T.density)
var/clear = 1
for(var/obj/O in T)
if(O.density)
clear = 0
break
if(clear)
L+=T
M.loc = pick(L)
if(smoke_spread)
smoke.start()