Files
Aurora-Old/code/datums/spells/area_teleport.dm
Duck- bb5de59a6e Vamp buffs, isocubes (needs sprite), other stuff
Vamps: Hypnotize now a free power, cooldown increased.  Space bats
nerfed, but ability now summons two as before since they don't kill each
other anymore.  Vampjaunt brought back down to thirty.  Holy water
ignites and burns vamps.

Laserpointer permablinding severely nerfed.  Bad idea in retrospect.

Added things to custom gear prefs.

All energy weapons made more accurate, to compare with bulletweapons
being generally way more deadly.  Snipers/modulasers accuracy buffed, to
account for aiming at a distance being broken.

Isocubes.  They're done but need a sprite.  Pocket dimension that you
suck highly dangerous criminals into.  Spell edits were mostly to
contain wizards and vamps from poofing out, which would cause them to be
permastunned since only getting ejected removes the permastun.
2014-09-14 22:38:22 -04:00

82 lines
2.3 KiB
Plaintext

/obj/effect/proc_holder/spell/targeted/area_teleport
name = "Area teleport"
desc = "This spell teleports you to a type of area of your selection."
var/randomise_selection = 0 //if it lets the usr choose the teleport loc or picks it from the list
var/invocation_area = 1 //if the invocation appends the selected area
/obj/effect/proc_holder/spell/targeted/area_teleport/perform(list/targets, recharge = 1)
var/thearea = before_cast(targets)
if(!thearea || !cast_check(1))
revert_cast()
return
invocation(thearea)
spawn(0)
if(charge_type == "recharge" && recharge)
start_recharge()
cast(targets,thearea)
after_cast(targets)
/obj/effect/proc_holder/spell/targeted/area_teleport/before_cast(list/targets)
var/A = null
if(!randomise_selection)
A = input("Area to teleport to", "Teleport", A) in teleportlocs
else
A = pick(teleportlocs)
var/area/thearea = teleportlocs[A]
return thearea
/obj/effect/proc_holder/spell/targeted/area_teleport/cast(list/targets,area/thearea)
for(var/mob/living/target in targets)
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
if(!L.len)
usr <<"The spell matrix was unable to locate a suitable teleport destination for an unknown reason. Sorry."
return
if(target && target.buckled)
target.buckled.unbuckle()
var/list/tempL = L
var/attempt = null
var/success = 0
while(tempL.len)
attempt = pick(tempL)
success = target.Move(attempt)
if(!success)
tempL.Remove(attempt)
else
break
if(target.weakened > 100)//if you are megastunned by the isocube, there is no escape
target <<"An outside force prevents you from teleporting."
else if(!success)
target.loc = pick(L)
return
/obj/effect/proc_holder/spell/targeted/area_teleport/invocation(area/chosenarea = null)
if(!invocation_area || !chosenarea)
..()
else
switch(invocation_type)
if("shout")
usr.say("[invocation] [uppertext(chosenarea.name)]")
if(usr.gender==MALE)
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
else
playsound(usr.loc, pick('sound/misc/null.ogg','sound/misc/null.ogg'), 100, 1)
if("whisper")
usr.whisper("[invocation] [uppertext(chosenarea.name)]")
return