/obj/spell/blink name = "Blink" desc = "This spell randomly teleports you a short distance." school = "abjuration" recharge = 20 clothes_req = 1 invocation = "none" invocation_type = "none" range = -1 //can affect only the user by default, but with var editing can be a teleport other spell var/outer_teleport_radius = 6 //the radius of the area in which it picks turfs to teleport to var/inner_teleport_radius = 0 //so with var fuckery you can have it teleport in a ring, not in a circle 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 blink", "ABRAKADABRA") as mob in view(usr,range) else M = usr invocation() var/list/turfs = new/list() for(var/turf/T in orange(M,outer_teleport_radius)) if(T in orange(M,inner_teleport_radius)) continue if(istype(T,/turf/space)) continue if(T.density) continue if(T.x>world.maxx-outer_teleport_radius || T.xworld.maxy-outer_teleport_radius || T.y