Added bitflags to spells.

Also made construct UI work under the new system.
This commit is contained in:
ComicIronic
2014-11-28 19:26:03 +00:00
parent 90aa65d308
commit 6b4270882a
31 changed files with 68 additions and 105 deletions

View File

@@ -577,8 +577,7 @@
S = D S = D
break break
if(S) if(S)
if(S.cast_check()) S.perform()
S.choose_targets()
if("floor") if("floor")
if(isconstruct(usr)) if(isconstruct(usr))
var/mob/living/simple_animal/construct/builder/C = usr var/mob/living/simple_animal/construct/builder/C = usr
@@ -588,8 +587,7 @@
S = D S = D
break break
if(S) if(S)
if(S.cast_check()) S.perform()
S.choose_targets()
if("soulstone") if("soulstone")
if(isconstruct(usr)) if(isconstruct(usr))
var/mob/living/simple_animal/construct/builder/C = usr var/mob/living/simple_animal/construct/builder/C = usr
@@ -599,8 +597,7 @@
S = D S = D
break break
if(S) if(S)
if(S.cast_check()) S.perform()
S.choose_targets()
if("shell") if("shell")
if(isconstruct(usr)) if(isconstruct(usr))
var/mob/living/simple_animal/construct/builder/C = usr var/mob/living/simple_animal/construct/builder/C = usr
@@ -610,8 +607,7 @@
S = D S = D
break break
if(S) if(S)
if(S.cast_check()) S.perform()
S.choose_targets()
if("pylon") if("pylon")
if(isconstruct(usr)) if(isconstruct(usr))
var/mob/living/simple_animal/construct/builder/C = usr var/mob/living/simple_animal/construct/builder/C = usr
@@ -621,8 +617,7 @@
S = D S = D
break break
if(S) if(S)
if(S.cast_check()) S.perform()
S.choose_targets()
if("shift") if("shift")
if(isconstruct(usr)) if(isconstruct(usr))
var/mob/living/simple_animal/construct/wraith/C = usr var/mob/living/simple_animal/construct/wraith/C = usr
@@ -632,8 +627,7 @@
S = D S = D
break break
if(S) if(S)
if(S.cast_check()) S.perform()
S.choose_targets()
if("juggerwall") if("juggerwall")
if(isconstruct(usr)) if(isconstruct(usr))
var/mob/living/simple_animal/construct/armoured/C = usr var/mob/living/simple_animal/construct/armoured/C = usr
@@ -643,8 +637,7 @@
S = D S = D
break break
if(S) if(S)
if(S.cast_check()) S.perform()
S.choose_targets()
if("rune") if("rune")
if(isconstruct(usr)) if(isconstruct(usr))
var/mob/living/simple_animal/construct/harvester/C = usr var/mob/living/simple_animal/construct/harvester/C = usr

View File

@@ -367,13 +367,11 @@
charge_type = "recharge" charge_type = "recharge"
charge_max = 600 charge_max = 600
clothes_req = 0 spell_flags = INCLUDEUSER
stat_allowed = 0
invocation_type = "none" invocation_type = "none"
range = -1 range = -1
selection_type = "range" selection_type = "range"
compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/monkey) compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
include_user = 1
cast_sound = 'sound/effects/bamf.ogg' cast_sound = 'sound/effects/bamf.ogg'
/atom/movable/spell/targeted/immolate/cast(list/targets) /atom/movable/spell/targeted/immolate/cast(list/targets)

View File

@@ -124,14 +124,11 @@
charge_type = "recharge" charge_type = "recharge"
charge_max = 600 charge_max = 600
clothes_req = 0 spell_flags = Z2NOCAST | INCLUDEUSER
stat_allowed = 0
invocation_type = "none" invocation_type = "none"
range = 1 range = 1
max_targets = 1 max_targets = 1
selection_type = "range" selection_type = "range"
include_user = 1
centcomm_cancast = 0
compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/monkey) compatible_mobs = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
@@ -203,8 +200,7 @@
charge_type = "recharge" charge_type = "recharge"
charge_max = 300 charge_max = 300
clothes_req = 0 spell_flags = 0
stat_allowed = 0
invocation_type = "none" invocation_type = "none"
range = 1 range = 1
max_targets = 1 max_targets = 1
@@ -287,13 +283,11 @@
desc = "Leap great distances!" desc = "Leap great distances!"
panel = "Mutant Powers" panel = "Mutant Powers"
range = -1 range = -1
include_user = 1
charge_type = "recharge" charge_type = "recharge"
charge_max = 60 charge_max = 60
clothes_req = 0 spell_flags = INCLUDEUSER
stat_allowed = 0
invocation_type = "none" invocation_type = "none"
duration = 10 //used for jump distance here duration = 10 //used for jump distance here
@@ -389,12 +383,10 @@
panel = "Mutant Powers" panel = "Mutant Powers"
charge_max = 1800 charge_max = 1800
clothes_req = 0 spell_flags = 0
stat_allowed = 0
invocation_type = "none" invocation_type = "none"
range = 1 range = 1
max_targets = 1 max_targets = 1
include_user = 0
selection_type = "range" selection_type = "range"
compatible_mobs = (/mob/living/carbon/human) compatible_mobs = (/mob/living/carbon/human)

View File

@@ -56,15 +56,13 @@ Obviously, requires DNA2.
name = "Hulk Out" name = "Hulk Out"
panel = "Mutant Powers" panel = "Mutant Powers"
range = -1 range = -1
include_user = 1
charge_type = "recharge" charge_type = "recharge"
charge_max = HULK_COOLDOWN charge_max = HULK_COOLDOWN
duration = HULK_DURATION duration = HULK_DURATION
clothes_req = 0 spell_flags = INCLUDEUSER
stat_allowed = 0
invocation_type = "none" invocation_type = "none"

View File

@@ -33,11 +33,10 @@ var/global/list/boo_phrases_silicon=list(
name = "Boo!" name = "Boo!"
desc = "Fuck with the living." desc = "Fuck with the living."
ghost = 1 spell_flags = STATALLOWED | GHOSTCAST
school = "transmutation" school = "transmutation"
charge_max = 600 charge_max = 600
clothes_req = 0
invocation = "" invocation = ""
invocation_type = "none" invocation_type = "none"
range = 1 // Or maybe 3? range = 1 // Or maybe 3?

View File

@@ -276,6 +276,7 @@
attack_sound = 'sound/weapons/heavysmash.ogg' attack_sound = 'sound/weapons/heavysmash.ogg'
var/energy = 0 var/energy = 0
var/max_energy = 1000 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) /mob/living/simple_animal/construct/behemoth/attackby(var/obj/item/O as obj, var/mob/user as mob)
user.delayNextAttack(8) user.delayNextAttack(8)

View File

@@ -2,21 +2,19 @@
//Should not be used for anything else, you cockwobblers //Should not be used for anything else, you cockwobblers
/atom/movable/spell/aoe_turf //affects all turfs in view or range (depends) /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/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) /atom/movable/spell/aoe_turf/choose_targets(mob/user = usr)
var/list/targets = list() var/list/targets = list()
for(var/turf/target in view_or_range(range,user,selection_type)) 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 in view_or_range(inner_radius,user,selection_type)))
if(target.density && ignore_dense) if(target.density && (spell_flags & IGNOREDENSE))
continue continue
if(istype(target, /turf/space)) if(istype(target, /turf/space) && (spell_flags & IGNORESPACE))
continue continue
else targets += target
targets += target
if(!targets.len) //doesn't waste the spell if(!targets.len) //doesn't waste the spell
return return

View File

@@ -4,7 +4,7 @@
school = "abjuration" school = "abjuration"
charge_max = 20 charge_max = 20
clothes_req = 1 spell_flags = Z2NOCAST | IGNOREDENSE | IGNORESPACE
invocation = "none" invocation = "none"
invocation_type = "none" invocation_type = "none"
range = 7 range = 7
@@ -14,11 +14,6 @@
smoke_spread = 0 smoke_spread = 0
smoke_amt = 1 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) /atom/movable/spell/aoe_turf/blink/cast(var/list/targets, mob/user)
if(!targets.len) if(!targets.len)
return return

View File

@@ -4,7 +4,7 @@
school = "transmutation" school = "transmutation"
charge_max = 600 charge_max = 600
clothes_req = 0 spell_flags = 0
invocation = "DIRI CEL" invocation = "DIRI CEL"
invocation_type = "whisper" invocation_type = "whisper"
range = 0 range = 0

View File

@@ -6,7 +6,7 @@
school = "conjuration" school = "conjuration"
charge_max = 600 charge_max = 600
clothes_req = 0 spell_flags = 0
invocation = "none" invocation = "none"
invocation_type = "none" invocation_type = "none"
range = 0 range = 0
@@ -22,12 +22,11 @@
desc = "This spell constructs a cult floor" desc = "This spell constructs a cult floor"
charge_max = 20 charge_max = 20
clothes_req = 0 spell_flags = Z2NOCAST
invocation = "none" invocation = "none"
invocation_type = "none" invocation_type = "none"
range = 0 range = 0
summon_type = list(/turf/simulated/floor/engine/cult) 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) /atom/movable/spell/aoe_turf/conjure/floor/conjure_animation(var/atom/movable/overlay/animation, var/turf/target)
animation.icon_state = "cultfloor" animation.icon_state = "cultfloor"
@@ -40,12 +39,11 @@
desc = "This spell constructs a cult wall" desc = "This spell constructs a cult wall"
charge_max = 100 charge_max = 100
clothes_req = 0 spell_flags = Z2NOCAST
invocation = "none" invocation = "none"
invocation_type = "none" invocation_type = "none"
range = 0 range = 0
summon_type = list(/turf/simulated/wall/cult) 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) /atom/movable/spell/aoe_turf/conjure/wall/conjure_animation(var/atom/movable/overlay/animation, var/turf/target)
animation.icon_state = "cultwall" animation.icon_state = "cultwall"
@@ -58,11 +56,10 @@
desc = "This spell constructs a reinforced metal wall" desc = "This spell constructs a reinforced metal wall"
charge_max = 300 charge_max = 300
clothes_req = 0 spell_flags = Z2NOCAST
invocation = "none" invocation = "none"
invocation_type = "none" invocation_type = "none"
range = 0 range = 0
centcomm_cancast = 0 //Stop crashing the server by spawning turfs on transit tiles
cast_delay = 50 cast_delay = 50
summon_type = list(/turf/simulated/wall/r_wall) 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" desc = "This spell reaches into Nar-Sie's realm, summoning one of the legendary fragments across time and space"
charge_max = 3000 charge_max = 3000
clothes_req = 0 spell_flags = 0
invocation = "none" invocation = "none"
invocation_type = "none" invocation_type = "none"
range = 0 range = 0
@@ -84,7 +81,7 @@
desc = "This spell conjures a fragile crystal from Nar-Sie's realm. Makes for a convenient light source." desc = "This spell conjures a fragile crystal from Nar-Sie's realm. Makes for a convenient light source."
charge_max = 200 charge_max = 200
clothes_req = 0 spell_flags = 0
invocation = "none" invocation = "none"
invocation_type = "none" invocation_type = "none"
range = 0 range = 0
@@ -105,7 +102,7 @@
desc = "Allows you to pull up a shield to protect yourself and allies from incoming threats" desc = "Allows you to pull up a shield to protect yourself and allies from incoming threats"
charge_max = 300 charge_max = 300
clothes_req = 0 spell_flags = 0
invocation = "none" invocation = "none"
invocation_type = "none" invocation_type = "none"
range = 0 range = 0

View File

@@ -4,7 +4,7 @@
summon_type = list(/obj/effect/forcefield) summon_type = list(/obj/effect/forcefield)
duration = 300 duration = 300
charge_max = 100 charge_max = 100
clothes_req = 0 spell_flags = 0
range = 0 range = 0
cast_sound = null cast_sound = null

View File

@@ -7,11 +7,10 @@
charge_type = "charges" charge_type = "charges"
charge_max = 1 charge_max = 1
school = "conjuration" school = "conjuration"
clothes_req = 1 spell_flags = Z2NOCAST
invocation = "NO F'AT C'HX" invocation = "NO F'AT C'HX"
invocation_type = "shout" invocation_type = "shout"
range = 0 range = 0
summon_type = list(/obj/structure/stool/bed/chair/vehicle/wizmobile) summon_type = list(/obj/structure/stool/bed/chair/vehicle/wizmobile)
duration = 0 duration = 0
centcomm_cancast = 0 //Stop people from getting to centcomm

View File

@@ -2,7 +2,7 @@
name = "Disable Tech" name = "Disable Tech"
desc = "This spell disables all weapons, cameras and most other technology in range." desc = "This spell disables all weapons, cameras and most other technology in range."
charge_max = 400 charge_max = 400
clothes_req = 1 spell_flags = NEEDSCLOTHES
invocation = "NEC CANTIO" invocation = "NEC CANTIO"
invocation_type = "shout" invocation_type = "shout"
selection_type = "range" selection_type = "range"

View File

@@ -4,7 +4,7 @@
school = "transmutation" school = "transmutation"
charge_max = 100 charge_max = 100
clothes_req = 0 spell_flags = 0
invocation = "AULIE OXIN FIERA" invocation = "AULIE OXIN FIERA"
invocation_type = "whisper" invocation_type = "whisper"
range = 3 range = 3

View File

@@ -4,7 +4,7 @@
school = "conjuration" school = "conjuration"
charge_max = 120 charge_max = 120
clothes_req = 0 spell_flags = 0
invocation = "none" invocation = "none"
invocation_type = "none" invocation_type = "none"
range = 1 range = 1

View File

@@ -13,7 +13,7 @@
school = "conjuration" school = "conjuration"
charge_max = 1200 charge_max = 1200
clothes_req = 1 spell_flags = NEEDSCLOTHES
invocation = "NOUK FHUNMM SACP RISSKA" invocation = "NOUK FHUNMM SACP RISSKA"
invocation_type = "shout" invocation_type = "shout"
range = 1 range = 1
@@ -26,7 +26,7 @@
school = "conjuration" school = "conjuration"
charge_max = 1200 charge_max = 1200
clothes_req = 0 spell_flags = 0
invocation = "IA IA" invocation = "IA IA"
invocation_type = "shout" invocation_type = "shout"
summon_amt = 10 summon_amt = 10

View File

@@ -4,7 +4,7 @@
school = "abjuration" school = "abjuration"
charge_max = 600 charge_max = 600
clothes_req = 1 spell_flags = NEEDSCLOTHES
invocation = "SCYAR NILA" invocation = "SCYAR NILA"
invocation_type = "shout" invocation_type = "shout"
cooldown_min = 200 //100 deciseconds reduction per rank cooldown_min = 200 //100 deciseconds reduction per rank

View File

@@ -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_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/holder_var_amount = 20 //same. The amount adjusted with the mob's var when the spell is used
var/spell_flags var/spell_flags = NEEDSCLOTHES
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/invocation = "HURP DURP" //what is uttered when the wizard casts the spell 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/invocation_type = "none" //can be none, whisper, shout, and emote
var/range = 7 //the range of the spell; outer radius for aoe spells 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>" user << "<span class='warning'>You shouldn't have this spell! Something's wrong.</span>"
return 0 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 return 0
if(istype(user, /mob/living/simple_animal)) 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 if(!src.check_charge(skipcharge, user)) //sees if we can cast based on charges alone
return 0 return 0
if(!ghost) if(!(spell_flags & GHOSTCAST))
if(user.stat && !stat_allowed) if(user.stat && !(spell_flags & STATALLOWED))
usr << "Not when you're incapacitated." usr << "Not when you're incapacitated."
return 0 return 0
@@ -214,7 +210,7 @@ var/list/spells = typesof(/atom/movable/spell) //needed for the badmin verb for
return 0 return 0
var/atom/movable/spell/noclothes/spell = locate() in user.spell_list 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()) if(!user.wearing_wiz_garb())
return 0 return 0
@@ -302,6 +298,7 @@ var/list/spells = typesof(/atom/movable/spell) //needed for the badmin verb for
charge_counter = charge_max charge_counter = charge_max
var/temp = "" var/temp = ""
name = initial(name)
switch(level_max["speed"] - spell_levels["speed"]) switch(level_max["speed"] - spell_levels["speed"])
if(3) if(3)
temp = "You have improved [name] into Efficient [name]." temp = "You have improved [name] into Efficient [name]."

View File

@@ -4,7 +4,7 @@
school = "evocation" school = "evocation"
charge_max = 500 charge_max = 500
clothes_req = 1 spell_flags = NEEDSCLOTHES
invocation = "ARSE NATH" invocation = "ARSE NATH"
invocation_type = "shout" invocation_type = "shout"
range = 1 range = 1

View File

@@ -4,11 +4,10 @@
school = "evocation" school = "evocation"
charge_max = 600 charge_max = 600
clothes_req = 1 spell_flags = NEEDSCLOTHES
invocation = "EI NATH" invocation = "EI NATH"
invocation_type = "shout" invocation_type = "shout"
range = 1 range = 1
include_user = 0
cooldown_min = 200 //100 deciseconds reduction per rank cooldown_min = 200 //100 deciseconds reduction per rank
sparks_spread = 1 sparks_spread = 1

View File

@@ -4,13 +4,11 @@
school = "transmutation" school = "transmutation"
charge_max = 300 charge_max = 300
clothes_req = 1 spell_flags = Z2NOCAST | NEEDSCLOTHES | INCLUDEUSER
invocation = "none" invocation = "none"
invocation_type = "none" invocation_type = "none"
range = -1 range = -1
cooldown_min = 100 //50 deciseconds reduction per rank cooldown_min = 100 //50 deciseconds reduction per rank
include_user = 1
centcomm_cancast = 0 //Prevent people from getting to centcomm
duration = 50 //in deciseconds duration = 50 //in deciseconds
/atom/movable/spell/targeted/ethereal_jaunt/cast(list/targets) //magnets, so mostly hardcoded /atom/movable/spell/targeted/ethereal_jaunt/cast(list/targets) //magnets, so mostly hardcoded

View File

@@ -4,7 +4,7 @@
school = "transmutation" school = "transmutation"
charge_max = 600 charge_max = 600
clothes_req = 1 spell_flags = NEEDSCLOTHES
range = 2 range = 2
invocation = "STAUN EI" invocation = "STAUN EI"
invocation_type = "shout" invocation_type = "shout"

View File

@@ -40,13 +40,11 @@ code\game\dna\genes\goon_powers.dm
school = "transmutation" school = "transmutation"
charge_max = 400 charge_max = 400
clothes_req = 1 spell_flags = Z2NOCAST | NEEDSCLOTHES | INCLUDEUSER
invocation = "BIRUZ BENNAR" invocation = "BIRUZ BENNAR"
invocation_type = "shout" invocation_type = "shout"
message = "\blue You feel strong! You feel a pressure building behind your eyes!" message = "\blue You feel strong! You feel a pressure building behind your eyes!"
range = -1 range = -1
include_user = 1
centcomm_cancast = 0
mutations = list(M_LASER, M_HULK) mutations = list(M_LASER, M_HULK)
duration = 300 duration = 300

View File

@@ -5,12 +5,10 @@
charge_type = "recharge" charge_type = "recharge"
charge_max = 150 charge_max = 150
charge_counter = 0 charge_counter = 0
clothes_req = 0 spell_flags = 0
stat_allowed = 0
invocation = "KN'A FTAGHU, PUCK 'BTHNK!" invocation = "KN'A FTAGHU, PUCK 'BTHNK!"
invocation_type = "shout" invocation_type = "shout"
range = 7 range = 7
include_user = 0
max_targets = 1 max_targets = 1
cooldown_min = 30 //30 deciseconds reduction per rank cooldown_min = 30 //30 deciseconds reduction per rank
selection_type = "range" selection_type = "range"

View File

@@ -4,7 +4,7 @@
school = "transmutation" school = "transmutation"
charge_max = 600 charge_max = 600
clothes_req = 0 spell_flags = 0
invocation = "GIN'YU CAPAN" invocation = "GIN'YU CAPAN"
invocation_type = "whisper" invocation_type = "whisper"
max_targets = 1 max_targets = 1

View File

@@ -6,12 +6,13 @@
school = "evocation" school = "evocation"
charge_max = 100 charge_max = 100
clothes_req = 0 spell_flags = 0
invocation = "ONI SOMA" invocation = "ONI SOMA"
invocation_type = "shout" invocation_type = "shout"
range = 20 range = 20
cooldown_min = 20 //10 deciseconds reduction per rank cooldown_min = 20 //10 deciseconds reduction per rank
include_user = 0
spell_flags = 0
duration = 200 duration = 200
proj_step_delay = 1 proj_step_delay = 1

View File

@@ -4,7 +4,7 @@
school = "evocation" school = "evocation"
charge_max = 150 charge_max = 150
clothes_req = 1 spell_flags = NEEDSCLOTHES
invocation = "FORTI GY AMA" invocation = "FORTI GY AMA"
invocation_type = "shout" invocation_type = "shout"
range = 7 range = 7

View File

@@ -4,13 +4,11 @@
school = "transmutation" school = "transmutation"
charge_max = 200 charge_max = 200
clothes_req = 0 spell_flags = Z2NOCAST | INCLUDEUSER
invocation = "none" invocation = "none"
invocation_type = "none" invocation_type = "none"
range = -1 range = -1
include_user = 1
duration = 50 //in deciseconds 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) /atom/movable/spell/targeted/ethereal_jaunt/shift/jaunt_disappear(var/atom/movable/overlay/animation, var/mob/living/target)
animation.icon_state = "phase_shift" animation.icon_state = "phase_shift"

View File

@@ -4,7 +4,7 @@
school = "transmutation" school = "transmutation"
charge_max = 300 charge_max = 300
clothes_req = 0 spell_flags = 0
invocation = "DII ODA BAJI" invocation = "DII ODA BAJI"
invocation_type = "whisper" invocation_type = "whisper"
message = "\blue You suddenly feel completely overwhelmed!" message = "\blue You suddenly feel completely overwhelmed!"

View File

@@ -4,9 +4,7 @@
/atom/movable/spell/targeted //can mean aoe for mobs (limited/unlimited number) or one target mob /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/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/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 var/amt_weakened = 0
@@ -35,13 +33,13 @@
for(var/mob/living/target in view_or_range(range, user, selection_type)) for(var/mob/living/target in view_or_range(range, user, selection_type))
targets += target targets += target
if(1) //single target can be picked if(1) //single target can be picked
if(range < 0 && include_user) if(range < 0 && spell_flags & INCLUDEUSER)
targets += user targets += user
else else
var/possible_targets = list() var/possible_targets = list()
for(var/mob/living/M in view_or_range(range, user, selection_type)) 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 continue
possible_targets += M possible_targets += M
@@ -55,7 +53,7 @@
for(var/mob/living/target in view_or_range(range, user, selection_type)) for(var/mob/living/target in view_or_range(range, user, selection_type))
possible_targets += target possible_targets += target
if(selectable) if(spell_flags & SELECTABLE)
for(var/i = 1; i<=max_targets, i++) for(var/i = 1; i<=max_targets, i++)
var/mob/M = input("Choose the target for the spell.", "Targeting") as mob in possible_targets 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)) if(M in view_or_range(range, user, selection_type))
@@ -72,7 +70,7 @@
else else
targets += pick(possible_targets) targets += pick(possible_targets)
if(!include_user && (user in targets)) if(!(spell_flags & INCLUDEUSER) && (user in targets))
targets -= user targets -= user
if(compatible_mobs.len) if(compatible_mobs.len)

View File

@@ -1063,6 +1063,12 @@ var/list/RESTRICTED_CAMERA_NETWORKS = list( //Those networks can only be accesse
#define GHOSTCAST 1 #define GHOSTCAST 1
#define NEEDSCLOTHES 2 #define NEEDSCLOTHES 2
#define NEEDSHUMAN 4 #define NEEDSHUMAN 4
#define Z2CAST 8 #define Z2NOCAST 8
#define STATALLOWED 16 #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