Fixed Issue 897

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4654 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
giacomand@gmail.com
2012-09-08 07:04:22 +00:00
parent b89d4dd88a
commit 4595e70d27
10 changed files with 20 additions and 16 deletions

View File

@@ -144,7 +144,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if(overlay)
for(var/atom/target in targets)
var/location
if(istype(target,/mob))
if(istype(target,/mob/living))
location = target.loc
else if(istype(target,/turf))
location = target
@@ -159,11 +159,11 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
/obj/effect/proc_holder/spell/proc/after_cast(list/targets)
for(var/atom/target in targets)
var/location
if(istype(target,/mob))
if(istype(target,/mob/living))
location = target.loc
else if(istype(target,/turf))
location = target
if(istype(target,/mob) && message)
if(istype(target,/mob/living) && message)
target << text("[message]")
if(sparks_spread)
var/datum/effect/effect/system/spark_spread/sparks = new /datum/effect/effect/system/spark_spread()
@@ -235,9 +235,13 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin
if(range < 0)
targets += user
else
var/possible_targets = view_or_range(range, user, selection_type)
if(!include_user && user in possible_targets)
possible_targets -= user
var/possible_targets = list()
for(var/mob/living/M in view_or_range(range, user, selection_type))
if(!include_user && user == M)
continue
possible_targets += M
targets += input("Choose the target for the spell.", "Targeting") as mob in possible_targets
else
var/list/possible_targets = list()

View File

@@ -30,7 +30,7 @@
return thearea
/obj/effect/proc_holder/spell/targeted/area_teleport/cast(list/targets,area/thearea)
for(var/mob/target in targets)
for(var/mob/living/target in targets)
var/list/L = list()
for(var/turf/T in get_area_turfs(thearea.type))
if(!T.density)

View File

@@ -7,7 +7,7 @@
/obj/effect/proc_holder/spell/targeted/emplosion/cast(list/targets)
for(var/mob/target in targets)
for(var/mob/living/target in targets)
empulse(target.loc, emp_heavy, emp_light)
return

View File

@@ -15,7 +15,7 @@
var/jaunt_duration = 50 //in deciseconds
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets) //magnets, so mostly hardcoded
for(var/mob/target in targets)
for(var/mob/living/target in targets)
spawn(0)
var/mobloc = get_turf(target.loc)
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt( mobloc )

View File

@@ -9,7 +9,7 @@
/obj/effect/proc_holder/spell/targeted/explosion/cast(list/targets)
for(var/mob/target in targets)
for(var/mob/living/target in targets)
explosion(target.loc,ex_severe,ex_heavy,ex_light,ex_flash)
return

View File

@@ -17,7 +17,7 @@
/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets)
for(var/mob/target in targets)
for(var/mob/living/target in targets)
for(var/x in mutations)
target.mutations.Add(x)
target.disabilities |= disabilities

View File

@@ -31,7 +31,7 @@ Also, you never added distance checking after target is selected. I've went ahea
user << "Too many minds! You're not a hive damnit!"//Whaa...aat?
return
var/mob/target = targets[1]
var/mob/living/target = targets[1]
if(!(target in oview(range)))//If they are not in overview after selection. Do note that !() is necessary for in to work because ! takes precedence over it.
user << "They are too far away!"
@@ -53,7 +53,7 @@ Also, you never added distance checking after target is selected. I've went ahea
user << "Their mind is resisting your spell."
return
var/mob/victim = target//The target of the spell whos body will be transferred to.
var/mob/living/victim = target//The target of the spell whos body will be transferred to.
var/mob/caster = user//The wizard/whomever doing the body transferring.
//SPELL LOSS BEGIN

View File

@@ -23,7 +23,7 @@
/obj/effect/proc_holder/spell/targeted/projectile/cast(list/targets, mob/user = usr)
for(var/mob/target in targets)
for(var/mob/living/target in targets)
spawn(0)
var/obj/effect/proc_holder/spell/targeted/projectile
if(istext(proj_type))

View File

@@ -19,7 +19,7 @@
..()
/obj/effect/proc_holder/spell/targeted/trigger/cast(list/targets)
for(var/mob/target in targets)
for(var/mob/living/target in targets)
for(var/obj/effect/proc_holder/spell/spell in contents)
spell.perform(list(target),0)
for(var/obj/effect/proc_holder/spell/spell in linked_spells)

View File

@@ -9,7 +9,7 @@
var/include_dense = 0 //whether it includes dense tiles in possible teleport locations
/obj/effect/proc_holder/spell/targeted/turf_teleport/cast(list/targets)
for(var/mob/target in targets)
for(var/mob/living/target in targets)
var/list/turfs = new/list()
for(var/turf/T in range(target,outer_tele_radius))
if(T in range(target,inner_tele_radius)) continue