mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 02:16:05 +00:00
Added bitflags to spells.
Also made construct UI work under the new system.
This commit is contained in:
@@ -577,8 +577,7 @@
|
||||
S = D
|
||||
break
|
||||
if(S)
|
||||
if(S.cast_check())
|
||||
S.choose_targets()
|
||||
S.perform()
|
||||
if("floor")
|
||||
if(isconstruct(usr))
|
||||
var/mob/living/simple_animal/construct/builder/C = usr
|
||||
@@ -588,8 +587,7 @@
|
||||
S = D
|
||||
break
|
||||
if(S)
|
||||
if(S.cast_check())
|
||||
S.choose_targets()
|
||||
S.perform()
|
||||
if("soulstone")
|
||||
if(isconstruct(usr))
|
||||
var/mob/living/simple_animal/construct/builder/C = usr
|
||||
@@ -599,8 +597,7 @@
|
||||
S = D
|
||||
break
|
||||
if(S)
|
||||
if(S.cast_check())
|
||||
S.choose_targets()
|
||||
S.perform()
|
||||
if("shell")
|
||||
if(isconstruct(usr))
|
||||
var/mob/living/simple_animal/construct/builder/C = usr
|
||||
@@ -610,8 +607,7 @@
|
||||
S = D
|
||||
break
|
||||
if(S)
|
||||
if(S.cast_check())
|
||||
S.choose_targets()
|
||||
S.perform()
|
||||
if("pylon")
|
||||
if(isconstruct(usr))
|
||||
var/mob/living/simple_animal/construct/builder/C = usr
|
||||
@@ -621,8 +617,7 @@
|
||||
S = D
|
||||
break
|
||||
if(S)
|
||||
if(S.cast_check())
|
||||
S.choose_targets()
|
||||
S.perform()
|
||||
if("shift")
|
||||
if(isconstruct(usr))
|
||||
var/mob/living/simple_animal/construct/wraith/C = usr
|
||||
@@ -632,8 +627,7 @@
|
||||
S = D
|
||||
break
|
||||
if(S)
|
||||
if(S.cast_check())
|
||||
S.choose_targets()
|
||||
S.perform()
|
||||
if("juggerwall")
|
||||
if(isconstruct(usr))
|
||||
var/mob/living/simple_animal/construct/armoured/C = usr
|
||||
@@ -643,8 +637,7 @@
|
||||
S = D
|
||||
break
|
||||
if(S)
|
||||
if(S.cast_check())
|
||||
S.choose_targets()
|
||||
S.perform()
|
||||
if("rune")
|
||||
if(isconstruct(usr))
|
||||
var/mob/living/simple_animal/construct/harvester/C = usr
|
||||
|
||||
@@ -367,13 +367,11 @@
|
||||
charge_type = "recharge"
|
||||
charge_max = 600
|
||||
|
||||
clothes_req = 0
|
||||
stat_allowed = 0
|
||||
spell_flags = INCLUDEUSER
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
selection_type = "range"
|
||||
compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
include_user = 1
|
||||
cast_sound = 'sound/effects/bamf.ogg'
|
||||
|
||||
/atom/movable/spell/targeted/immolate/cast(list/targets)
|
||||
|
||||
@@ -124,14 +124,11 @@
|
||||
charge_type = "recharge"
|
||||
charge_max = 600
|
||||
|
||||
clothes_req = 0
|
||||
stat_allowed = 0
|
||||
spell_flags = Z2NOCAST | INCLUDEUSER
|
||||
invocation_type = "none"
|
||||
range = 1
|
||||
max_targets = 1
|
||||
selection_type = "range"
|
||||
include_user = 1
|
||||
centcomm_cancast = 0
|
||||
|
||||
compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
|
||||
|
||||
@@ -203,8 +200,7 @@
|
||||
charge_type = "recharge"
|
||||
charge_max = 300
|
||||
|
||||
clothes_req = 0
|
||||
stat_allowed = 0
|
||||
spell_flags = 0
|
||||
invocation_type = "none"
|
||||
range = 1
|
||||
max_targets = 1
|
||||
@@ -287,13 +283,11 @@
|
||||
desc = "Leap great distances!"
|
||||
panel = "Mutant Powers"
|
||||
range = -1
|
||||
include_user = 1
|
||||
|
||||
charge_type = "recharge"
|
||||
charge_max = 60
|
||||
|
||||
clothes_req = 0
|
||||
stat_allowed = 0
|
||||
spell_flags = INCLUDEUSER
|
||||
invocation_type = "none"
|
||||
|
||||
duration = 10 //used for jump distance here
|
||||
@@ -389,12 +383,10 @@
|
||||
panel = "Mutant Powers"
|
||||
charge_max = 1800
|
||||
|
||||
clothes_req = 0
|
||||
stat_allowed = 0
|
||||
spell_flags = 0
|
||||
invocation_type = "none"
|
||||
range = 1
|
||||
max_targets = 1
|
||||
include_user = 0
|
||||
selection_type = "range"
|
||||
compatible_mobs = (/mob/living/carbon/human)
|
||||
|
||||
|
||||
@@ -56,15 +56,13 @@ Obviously, requires DNA2.
|
||||
name = "Hulk Out"
|
||||
panel = "Mutant Powers"
|
||||
range = -1
|
||||
include_user = 1
|
||||
|
||||
charge_type = "recharge"
|
||||
charge_max = HULK_COOLDOWN
|
||||
|
||||
duration = HULK_DURATION
|
||||
|
||||
clothes_req = 0
|
||||
stat_allowed = 0
|
||||
spell_flags = INCLUDEUSER
|
||||
|
||||
invocation_type = "none"
|
||||
|
||||
|
||||
@@ -33,11 +33,10 @@ var/global/list/boo_phrases_silicon=list(
|
||||
name = "Boo!"
|
||||
desc = "Fuck with the living."
|
||||
|
||||
ghost = 1
|
||||
spell_flags = STATALLOWED | GHOSTCAST
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 600
|
||||
clothes_req = 0
|
||||
invocation = ""
|
||||
invocation_type = "none"
|
||||
range = 1 // Or maybe 3?
|
||||
|
||||
@@ -276,6 +276,7 @@
|
||||
attack_sound = 'sound/weapons/heavysmash.ogg'
|
||||
var/energy = 0
|
||||
var/max_energy = 1000
|
||||
construct_spells = list(/atom/movable/spell/aoe_turf/conjure/forcewall/lesser)
|
||||
|
||||
/mob/living/simple_animal/construct/behemoth/attackby(var/obj/item/O as obj, var/mob/user as mob)
|
||||
user.delayNextAttack(8)
|
||||
|
||||
@@ -2,21 +2,19 @@
|
||||
//Should not be used for anything else, you cockwobblers
|
||||
|
||||
/atom/movable/spell/aoe_turf //affects all turfs in view or range (depends)
|
||||
spell_flags = IGNOREDENSE
|
||||
var/inner_radius = -1 //for all your ring spell needs
|
||||
var/ignore_dense = 1 //if set to 1, stops dense turfs from being targets
|
||||
var/ignore_space = 0
|
||||
|
||||
/atom/movable/spell/aoe_turf/choose_targets(mob/user = usr)
|
||||
var/list/targets = list()
|
||||
|
||||
for(var/turf/target in view_or_range(range,user,selection_type))
|
||||
if(!(target in view_or_range(inner_radius,user,selection_type)))
|
||||
if(target.density && ignore_dense)
|
||||
if(target.density && (spell_flags & IGNOREDENSE))
|
||||
continue
|
||||
if(istype(target, /turf/space))
|
||||
if(istype(target, /turf/space) && (spell_flags & IGNORESPACE))
|
||||
continue
|
||||
else
|
||||
targets += target
|
||||
targets += target
|
||||
|
||||
if(!targets.len) //doesn't waste the spell
|
||||
return
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
school = "abjuration"
|
||||
charge_max = 20
|
||||
clothes_req = 1
|
||||
spell_flags = Z2NOCAST | IGNOREDENSE | IGNORESPACE
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 7
|
||||
@@ -14,11 +14,6 @@
|
||||
smoke_spread = 0
|
||||
smoke_amt = 1
|
||||
|
||||
ignore_space = 1 //whether it includes space tiles in possible teleport locations
|
||||
ignore_dense = 1
|
||||
|
||||
centcomm_cancast = 0 //prevent people from getting to centcomm
|
||||
|
||||
/atom/movable/spell/aoe_turf/blink/cast(var/list/targets, mob/user)
|
||||
if(!targets.len)
|
||||
return
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 600
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
invocation = "DIRI CEL"
|
||||
invocation_type = "whisper"
|
||||
range = 0
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 600
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
@@ -22,12 +22,11 @@
|
||||
desc = "This spell constructs a cult floor"
|
||||
|
||||
charge_max = 20
|
||||
clothes_req = 0
|
||||
spell_flags = Z2NOCAST
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
summon_type = list(/turf/simulated/floor/engine/cult)
|
||||
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
|
||||
/atom/movable/spell/aoe_turf/conjure/floor/conjure_animation(var/atom/movable/overlay/animation, var/turf/target)
|
||||
animation.icon_state = "cultfloor"
|
||||
@@ -40,12 +39,11 @@
|
||||
desc = "This spell constructs a cult wall"
|
||||
|
||||
charge_max = 100
|
||||
clothes_req = 0
|
||||
spell_flags = Z2NOCAST
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
summon_type = list(/turf/simulated/wall/cult)
|
||||
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
|
||||
/atom/movable/spell/aoe_turf/conjure/wall/conjure_animation(var/atom/movable/overlay/animation, var/turf/target)
|
||||
animation.icon_state = "cultwall"
|
||||
@@ -58,11 +56,10 @@
|
||||
desc = "This spell constructs a reinforced metal wall"
|
||||
|
||||
charge_max = 300
|
||||
clothes_req = 0
|
||||
spell_flags = Z2NOCAST
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
|
||||
cast_delay = 50
|
||||
|
||||
summon_type = list(/turf/simulated/wall/r_wall)
|
||||
@@ -72,7 +69,7 @@
|
||||
desc = "This spell reaches into Nar-Sie's realm, summoning one of the legendary fragments across time and space"
|
||||
|
||||
charge_max = 3000
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
@@ -84,7 +81,7 @@
|
||||
desc = "This spell conjures a fragile crystal from Nar-Sie's realm. Makes for a convenient light source."
|
||||
|
||||
charge_max = 200
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
@@ -105,7 +102,7 @@
|
||||
desc = "Allows you to pull up a shield to protect yourself and allies from incoming threats"
|
||||
|
||||
charge_max = 300
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 0
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
summon_type = list(/obj/effect/forcefield)
|
||||
duration = 300
|
||||
charge_max = 100
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
range = 0
|
||||
cast_sound = null
|
||||
|
||||
|
||||
@@ -7,11 +7,10 @@
|
||||
charge_type = "charges"
|
||||
charge_max = 1
|
||||
school = "conjuration"
|
||||
clothes_req = 1
|
||||
spell_flags = Z2NOCAST
|
||||
invocation = "NO F'AT C'HX"
|
||||
invocation_type = "shout"
|
||||
range = 0
|
||||
|
||||
summon_type = list(/obj/structure/stool/bed/chair/vehicle/wizmobile)
|
||||
duration = 0
|
||||
centcomm_cancast = 0 //Stop people from getting to centcomm
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "Disable Tech"
|
||||
desc = "This spell disables all weapons, cameras and most other technology in range."
|
||||
charge_max = 400
|
||||
clothes_req = 1
|
||||
spell_flags = NEEDSCLOTHES
|
||||
invocation = "NEC CANTIO"
|
||||
invocation_type = "shout"
|
||||
selection_type = "range"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 100
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
invocation = "AULIE OXIN FIERA"
|
||||
invocation_type = "whisper"
|
||||
range = 3
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 120
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = 1
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 1200
|
||||
clothes_req = 1
|
||||
spell_flags = NEEDSCLOTHES
|
||||
invocation = "NOUK FHUNMM SACP RISSKA"
|
||||
invocation_type = "shout"
|
||||
range = 1
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
school = "conjuration"
|
||||
charge_max = 1200
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
invocation = "IA IA"
|
||||
invocation_type = "shout"
|
||||
summon_amt = 10
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
school = "abjuration"
|
||||
charge_max = 600
|
||||
clothes_req = 1
|
||||
spell_flags = NEEDSCLOTHES
|
||||
invocation = "SCYAR NILA"
|
||||
invocation_type = "shout"
|
||||
cooldown_min = 200 //100 deciseconds reduction per rank
|
||||
|
||||
@@ -16,11 +16,7 @@ var/list/spells = typesof(/atom/movable/spell) //needed for the badmin verb for
|
||||
var/holder_var_type = "bruteloss" //only used if charge_type equals to "holder_var"
|
||||
var/holder_var_amount = 20 //same. The amount adjusted with the mob's var when the spell is used
|
||||
|
||||
var/spell_flags
|
||||
var/ghost = 0 // Skip life check.
|
||||
var/clothes_req = 1 //see if it requires clothes
|
||||
var/human_req = 0 //spell can only be cast by humans
|
||||
var/stat_allowed = 0 //see if it requires being conscious/alive, need to set to 1 for ghostpells
|
||||
var/spell_flags = NEEDSCLOTHES
|
||||
var/invocation = "HURP DURP" //what is uttered when the wizard casts the spell
|
||||
var/invocation_type = "none" //can be none, whisper, shout, and emote
|
||||
var/range = 7 //the range of the spell; outer radius for aoe spells
|
||||
@@ -191,7 +187,7 @@ var/list/spells = typesof(/atom/movable/spell) //needed for the badmin verb for
|
||||
user << "<span class='warning'>You shouldn't have this spell! Something's wrong.</span>"
|
||||
return 0
|
||||
|
||||
if(user.z == 2 && !centcomm_cancast) //Certain spells are not allowed on the centcomm zlevel
|
||||
if(user.z == 2 && spell_flags & Z2NOCAST) //Certain spells are not allowed on the centcomm zlevel
|
||||
return 0
|
||||
|
||||
if(istype(user, /mob/living/simple_animal))
|
||||
@@ -203,8 +199,8 @@ var/list/spells = typesof(/atom/movable/spell) //needed for the badmin verb for
|
||||
if(!src.check_charge(skipcharge, user)) //sees if we can cast based on charges alone
|
||||
return 0
|
||||
|
||||
if(!ghost)
|
||||
if(user.stat && !stat_allowed)
|
||||
if(!(spell_flags & GHOSTCAST))
|
||||
if(user.stat && !(spell_flags & STATALLOWED))
|
||||
usr << "Not when you're incapacitated."
|
||||
return 0
|
||||
|
||||
@@ -214,7 +210,7 @@ var/list/spells = typesof(/atom/movable/spell) //needed for the badmin verb for
|
||||
return 0
|
||||
|
||||
var/atom/movable/spell/noclothes/spell = locate() in user.spell_list
|
||||
if(clothes_req && !(spell && istype(spell)))//clothes check
|
||||
if((spell_flags & NEEDSCLOTHES) && !(spell && istype(spell)))//clothes check
|
||||
if(!user.wearing_wiz_garb())
|
||||
return 0
|
||||
|
||||
@@ -302,6 +298,7 @@ var/list/spells = typesof(/atom/movable/spell) //needed for the badmin verb for
|
||||
charge_counter = charge_max
|
||||
|
||||
var/temp = ""
|
||||
name = initial(name)
|
||||
switch(level_max["speed"] - spell_levels["speed"])
|
||||
if(3)
|
||||
temp = "You have improved [name] into Efficient [name]."
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
school = "evocation"
|
||||
charge_max = 500
|
||||
clothes_req = 1
|
||||
spell_flags = NEEDSCLOTHES
|
||||
invocation = "ARSE NATH"
|
||||
invocation_type = "shout"
|
||||
range = 1
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
|
||||
school = "evocation"
|
||||
charge_max = 600
|
||||
clothes_req = 1
|
||||
spell_flags = NEEDSCLOTHES
|
||||
invocation = "EI NATH"
|
||||
invocation_type = "shout"
|
||||
range = 1
|
||||
include_user = 0
|
||||
cooldown_min = 200 //100 deciseconds reduction per rank
|
||||
|
||||
sparks_spread = 1
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 300
|
||||
clothes_req = 1
|
||||
spell_flags = Z2NOCAST | NEEDSCLOTHES | INCLUDEUSER
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
cooldown_min = 100 //50 deciseconds reduction per rank
|
||||
include_user = 1
|
||||
centcomm_cancast = 0 //Prevent people from getting to centcomm
|
||||
duration = 50 //in deciseconds
|
||||
|
||||
/atom/movable/spell/targeted/ethereal_jaunt/cast(list/targets) //magnets, so mostly hardcoded
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 600
|
||||
clothes_req = 1
|
||||
spell_flags = NEEDSCLOTHES
|
||||
range = 2
|
||||
invocation = "STAUN EI"
|
||||
invocation_type = "shout"
|
||||
|
||||
@@ -40,13 +40,11 @@ code\game\dna\genes\goon_powers.dm
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 400
|
||||
clothes_req = 1
|
||||
spell_flags = Z2NOCAST | NEEDSCLOTHES | INCLUDEUSER
|
||||
invocation = "BIRUZ BENNAR"
|
||||
invocation_type = "shout"
|
||||
message = "\blue You feel strong! You feel a pressure building behind your eyes!"
|
||||
range = -1
|
||||
include_user = 1
|
||||
centcomm_cancast = 0
|
||||
|
||||
mutations = list(M_LASER, M_HULK)
|
||||
duration = 300
|
||||
|
||||
@@ -5,12 +5,10 @@
|
||||
charge_type = "recharge"
|
||||
charge_max = 150
|
||||
charge_counter = 0
|
||||
clothes_req = 0
|
||||
stat_allowed = 0
|
||||
spell_flags = 0
|
||||
invocation = "KN'A FTAGHU, PUCK 'BTHNK!"
|
||||
invocation_type = "shout"
|
||||
range = 7
|
||||
include_user = 0
|
||||
max_targets = 1
|
||||
cooldown_min = 30 //30 deciseconds reduction per rank
|
||||
selection_type = "range"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 600
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
invocation = "GIN'YU CAPAN"
|
||||
invocation_type = "whisper"
|
||||
max_targets = 1
|
||||
|
||||
@@ -6,12 +6,13 @@
|
||||
|
||||
school = "evocation"
|
||||
charge_max = 100
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
invocation = "ONI SOMA"
|
||||
invocation_type = "shout"
|
||||
range = 20
|
||||
cooldown_min = 20 //10 deciseconds reduction per rank
|
||||
include_user = 0
|
||||
|
||||
spell_flags = 0
|
||||
|
||||
duration = 200
|
||||
proj_step_delay = 1
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
school = "evocation"
|
||||
charge_max = 150
|
||||
clothes_req = 1
|
||||
spell_flags = NEEDSCLOTHES
|
||||
invocation = "FORTI GY AMA"
|
||||
invocation_type = "shout"
|
||||
range = 7
|
||||
|
||||
@@ -4,13 +4,11 @@
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 200
|
||||
clothes_req = 0
|
||||
spell_flags = Z2NOCAST | INCLUDEUSER
|
||||
invocation = "none"
|
||||
invocation_type = "none"
|
||||
range = -1
|
||||
include_user = 1
|
||||
duration = 50 //in deciseconds
|
||||
centcomm_cancast = 0 //Stop people from getting to centcom
|
||||
|
||||
/atom/movable/spell/targeted/ethereal_jaunt/shift/jaunt_disappear(var/atom/movable/overlay/animation, var/mob/living/target)
|
||||
animation.icon_state = "phase_shift"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
school = "transmutation"
|
||||
charge_max = 300
|
||||
clothes_req = 0
|
||||
spell_flags = 0
|
||||
invocation = "DII ODA BAJI"
|
||||
invocation_type = "whisper"
|
||||
message = "\blue You suddenly feel completely overwhelmed!"
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
|
||||
/atom/movable/spell/targeted //can mean aoe for mobs (limited/unlimited number) or one target mob
|
||||
var/max_targets = 1 //leave 0 for unlimited targets in range, more for limited number of casts (can all target one guy, depends on target_ignore_prev) in range
|
||||
var/selectable = 0 //can the targets be chosen?
|
||||
var/target_ignore_prev = 1 //only important if max_targets > 1, affects if the spell can be cast multiple times at one person from one cast
|
||||
var/include_user = 0 //if it includes usr in the target list
|
||||
|
||||
|
||||
var/amt_weakened = 0
|
||||
@@ -35,13 +33,13 @@
|
||||
for(var/mob/living/target in view_or_range(range, user, selection_type))
|
||||
targets += target
|
||||
if(1) //single target can be picked
|
||||
if(range < 0 && include_user)
|
||||
if(range < 0 && spell_flags & INCLUDEUSER)
|
||||
targets += user
|
||||
else
|
||||
var/possible_targets = list()
|
||||
|
||||
for(var/mob/living/M in view_or_range(range, user, selection_type))
|
||||
if(!include_user && user == M)
|
||||
if(!(spell_flags & INCLUDEUSER) && user == M)
|
||||
continue
|
||||
possible_targets += M
|
||||
|
||||
@@ -55,7 +53,7 @@
|
||||
for(var/mob/living/target in view_or_range(range, user, selection_type))
|
||||
possible_targets += target
|
||||
|
||||
if(selectable)
|
||||
if(spell_flags & SELECTABLE)
|
||||
for(var/i = 1; i<=max_targets, i++)
|
||||
var/mob/M = input("Choose the target for the spell.", "Targeting") as mob in possible_targets
|
||||
if(M in view_or_range(range, user, selection_type))
|
||||
@@ -72,7 +70,7 @@
|
||||
else
|
||||
targets += pick(possible_targets)
|
||||
|
||||
if(!include_user && (user in targets))
|
||||
if(!(spell_flags & INCLUDEUSER) && (user in targets))
|
||||
targets -= user
|
||||
|
||||
if(compatible_mobs.len)
|
||||
|
||||
@@ -1063,6 +1063,12 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse
|
||||
#define GHOSTCAST 1
|
||||
#define NEEDSCLOTHES 2
|
||||
#define NEEDSHUMAN 4
|
||||
#define Z2CAST 8
|
||||
#define Z2NOCAST 8
|
||||
#define STATALLOWED 16
|
||||
|
||||
//The following flags only affect different types of spell, and therefore overlap
|
||||
//Targeted spells
|
||||
#define INCLUDEUSER 32
|
||||
#define SELECTABLE 64
|
||||
//AOE spells
|
||||
#define IGNOREDENSE 32
|
||||
#define IGNORESPACE 64
|
||||
|
||||
Reference in New Issue
Block a user