mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-30 20:13:08 +00:00
Traps framework complete. Two sample traps. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@885 316c924e-a436-60f5-8080-3fe189b3f50e
61 lines
1.8 KiB
Plaintext
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() |