Files
Polaris/code/modules/spells/aoe_turf/aoe_turf.dm
PsiOmegaDelta 616b4b60e4 Magical fixes.
The wizard den is no longer pitch black.
Fixes targeted spells using the wrong caster/source.
Adds some missing checks using the caster source above.
Re-logging should no longer cause a loss of spell UI icons.
Mind transfer should no longer cause unintended spell loss.
2015-07-21 11:34:25 +02:00

25 lines
857 B
Plaintext

/*
Aoe turf spells target a ring of tiles around the user
This ring has an outer radius (range) and an inner radius (inner_radius)
Aoe turf spells have two useful flags: IGNOREDENSE and IGNORESPACE. These are explained in setup.dm
*/
/spell/aoe_turf //affects all turfs in view or range (depends)
spell_flags = IGNOREDENSE
var/inner_radius = -1 //for all your ring spell needs
/spell/aoe_turf/choose_targets(mob/user = usr)
var/list/targets = list()
for(var/turf/target in view_or_range(range, holder, selection_type))
if(!(target in view_or_range(inner_radius, holder, selection_type)))
if(target.density && (spell_flags & IGNOREDENSE))
continue
if(istype(target, /turf/space) && (spell_flags & IGNORESPACE))
continue
targets += target
if(!targets.len) //doesn't waste the spell
return
return targets