File standardisation (#13131)

* Adds the check components

* Adds in trailing newlines

* Converts all CRLF to LF

* Post merge EOF

* Post merge line endings

* Final commit
This commit is contained in:
AffectedArc07
2020-03-17 22:08:51 +00:00
committed by GitHub
parent ec19ea3d2d
commit 04ba5c1cc9
1451 changed files with 183694 additions and 183593 deletions
+98 -98
View File
@@ -1,98 +1,98 @@
/obj/effect/proc_holder/spell/targeted/area_teleport
name = "Area teleport"
desc = "This spell teleports you to a type of area of your selection."
nonabstract_req = 1
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
var/sound1 = 'sound/weapons/zapbang.ogg'
var/sound2 = 'sound/weapons/zapbang.ogg'
/obj/effect/proc_holder/spell/targeted/area_teleport/perform(list/targets, recharge = 1, mob/living/user = usr)
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) as null|anything in teleportlocs
else
A = pick(teleportlocs)
if(!A)
return
var/area/thearea = teleportlocs[A]
if(thearea.tele_proof && !istype(thearea, /area/wizard_station))
to_chat(usr, "A mysterious force disrupts your arcane spell matrix, and you remain where you are.")
return
return thearea
/obj/effect/proc_holder/spell/targeted/area_teleport/cast(list/targets,area/thearea,mob/living/user = usr)
playsound(get_turf(user), sound1, 50,1)
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)
to_chat(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_mob(target, force = TRUE)
if(target && target.has_buckled_mobs())
target.unbuckle_all_mobs(force = TRUE)
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(!success)
target.forceMove(pick(L))
playsound(get_turf(user), sound2, 50,1)
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
/obj/effect/proc_holder/spell/targeted/area_teleport
name = "Area teleport"
desc = "This spell teleports you to a type of area of your selection."
nonabstract_req = 1
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
var/sound1 = 'sound/weapons/zapbang.ogg'
var/sound2 = 'sound/weapons/zapbang.ogg'
/obj/effect/proc_holder/spell/targeted/area_teleport/perform(list/targets, recharge = 1, mob/living/user = usr)
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) as null|anything in teleportlocs
else
A = pick(teleportlocs)
if(!A)
return
var/area/thearea = teleportlocs[A]
if(thearea.tele_proof && !istype(thearea, /area/wizard_station))
to_chat(usr, "A mysterious force disrupts your arcane spell matrix, and you remain where you are.")
return
return thearea
/obj/effect/proc_holder/spell/targeted/area_teleport/cast(list/targets,area/thearea,mob/living/user = usr)
playsound(get_turf(user), sound1, 50,1)
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)
to_chat(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_mob(target, force = TRUE)
if(target && target.has_buckled_mobs())
target.unbuckle_all_mobs(force = TRUE)
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(!success)
target.forceMove(pick(L))
playsound(get_turf(user), sound2, 50,1)
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
+1 -1
View File
@@ -61,4 +61,4 @@
genemutcheck(src, COMICBLOCK, null, MUTCHK_FORCED)
if(!(iswizard(src) || (mind && mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE))) //Mutations are permanent on non-wizards. Can still be removed by genetics fuckery but not mutadone.
dna.default_blocks.Add(CLUMSYBLOCK)
dna.default_blocks.Add(COMICBLOCK)
dna.default_blocks.Add(COMICBLOCK)
+70 -70
View File
@@ -1,70 +1,70 @@
/obj/effect/proc_holder/spell/aoe_turf/conjure
name = "Conjure"
desc = "This spell conjures objs of the specified types in range."
var/list/summon_type = list() //determines what exactly will be summoned
//should be text, like list("/mob/simple_animal/bot/ed209")
var/summon_lifespan = 0 // 0=permanent, any other time in deciseconds
var/summon_amt = 1 //amount of objects summoned
var/summon_ignore_density = 0 //if set to 1, adds dense tiles to possible spawn places
var/summon_ignore_prev_spawn_points = 0 //if set to 1, each new object is summoned on a new spawn point
var/list/newVars = list() //vars of the summoned objects will be replaced with those where they meet
//should have format of list("emagged" = 1,"name" = "Wizard's Justicebot"), for example
var/delay = 1//Go Go Gadget Inheritance
var/cast_sound = 'sound/items/welder.ogg'
/obj/effect/proc_holder/spell/aoe_turf/conjure/cast(list/targets,mob/living/user = usr)
playsound(get_turf(user), cast_sound, 50,1)
for(var/turf/T in targets)
if(T.density && !summon_ignore_density)
targets -= T
playsound(get_turf(src), cast_sound, 50, 1)
if(do_after(user, delay, target = user))
for(var/i=0,i<summon_amt,i++)
if(!targets.len)
break
var/summoned_object_type = pick(summon_type)
var/spawn_place = pick(targets)
if(summon_ignore_prev_spawn_points)
targets -= spawn_place
if(ispath(summoned_object_type,/turf))
if(istype(get_turf(user),/turf/simulated/shuttle))
to_chat(user, "<span class='warning'>You can't build things on shuttles!</span>")
break
var/turf/O = spawn_place
var/N = summoned_object_type
O.ChangeTurf(N)
else
var/atom/summoned_object = new summoned_object_type(spawn_place)
for(var/varName in newVars)
if(varName in summoned_object.vars)
summoned_object.vars[varName] = newVars[varName]
summoned_object.admin_spawned = TRUE
if(summon_lifespan)
spawn(summon_lifespan)
if(summoned_object)
qdel(summoned_object)
else
switch(charge_type)
if("recharge")
charge_counter = charge_max - 5//So you don't lose charge for a failed spell(Also prevents most over-fill)
if("charges")
charge_counter++//Ditto, just for different spell types
return
/obj/effect/proc_holder/spell/aoe_turf/conjure/summonEdSwarm //test purposes
name = "Dispense Wizard Justice"
desc = "This spell dispenses wizard justice."
summon_type = list(/mob/living/simple_animal/bot/ed209)
summon_amt = 10
range = 3
newVars = list("emagged" = 1,"name" = "Wizard's Justicebot")
/obj/effect/proc_holder/spell/aoe_turf/conjure
name = "Conjure"
desc = "This spell conjures objs of the specified types in range."
var/list/summon_type = list() //determines what exactly will be summoned
//should be text, like list("/mob/simple_animal/bot/ed209")
var/summon_lifespan = 0 // 0=permanent, any other time in deciseconds
var/summon_amt = 1 //amount of objects summoned
var/summon_ignore_density = 0 //if set to 1, adds dense tiles to possible spawn places
var/summon_ignore_prev_spawn_points = 0 //if set to 1, each new object is summoned on a new spawn point
var/list/newVars = list() //vars of the summoned objects will be replaced with those where they meet
//should have format of list("emagged" = 1,"name" = "Wizard's Justicebot"), for example
var/delay = 1//Go Go Gadget Inheritance
var/cast_sound = 'sound/items/welder.ogg'
/obj/effect/proc_holder/spell/aoe_turf/conjure/cast(list/targets,mob/living/user = usr)
playsound(get_turf(user), cast_sound, 50,1)
for(var/turf/T in targets)
if(T.density && !summon_ignore_density)
targets -= T
playsound(get_turf(src), cast_sound, 50, 1)
if(do_after(user, delay, target = user))
for(var/i=0,i<summon_amt,i++)
if(!targets.len)
break
var/summoned_object_type = pick(summon_type)
var/spawn_place = pick(targets)
if(summon_ignore_prev_spawn_points)
targets -= spawn_place
if(ispath(summoned_object_type,/turf))
if(istype(get_turf(user),/turf/simulated/shuttle))
to_chat(user, "<span class='warning'>You can't build things on shuttles!</span>")
break
var/turf/O = spawn_place
var/N = summoned_object_type
O.ChangeTurf(N)
else
var/atom/summoned_object = new summoned_object_type(spawn_place)
for(var/varName in newVars)
if(varName in summoned_object.vars)
summoned_object.vars[varName] = newVars[varName]
summoned_object.admin_spawned = TRUE
if(summon_lifespan)
spawn(summon_lifespan)
if(summoned_object)
qdel(summoned_object)
else
switch(charge_type)
if("recharge")
charge_counter = charge_max - 5//So you don't lose charge for a failed spell(Also prevents most over-fill)
if("charges")
charge_counter++//Ditto, just for different spell types
return
/obj/effect/proc_holder/spell/aoe_turf/conjure/summonEdSwarm //test purposes
name = "Dispense Wizard Justice"
desc = "This spell dispenses wizard justice."
summon_type = list(/mob/living/simple_animal/bot/ed209)
summon_amt = 10
range = 3
newVars = list("emagged" = 1,"name" = "Wizard's Justicebot")
+84 -84
View File
@@ -1,84 +1,84 @@
/obj/effect/proc_holder/spell/dumbfire
var/projectile_type = ""
var/activate_on_collision = 1
var/proj_icon = 'icons/obj/projectiles.dmi'
var/proj_icon_state = "spell"
var/proj_name = "a spell projectile"
var/proj_trail = 0 //if it leaves a trail
var/proj_trail_lifespan = 0 //deciseconds
var/proj_trail_icon = 'icons/obj/wizard.dmi'
var/proj_trail_icon_state = "trail"
var/proj_type = /obj/effect/proc_holder/spell //IMPORTANT use only subtypes of this
var/proj_insubstantial = 0 //if it can pass through dense objects or not
var/proj_trigger_range = 1 //the range from target at which the projectile triggers cast(target)
var/proj_lifespan = 100 //in deciseconds * proj_step_delay
var/proj_step_delay = 1 //lower = faster
/obj/effect/proc_holder/spell/dumbfire/choose_targets(mob/user = usr)
var/turf/T = get_turf(usr)
for(var/i = 1; i < range; i++)
var/turf/new_turf = get_step(T, usr.dir)
if(new_turf.density)
break
T = new_turf
perform(list(T), user = user)
/obj/effect/proc_holder/spell/dumbfire/cast(list/targets, mob/user = usr)
for(var/turf/target in targets)
spawn(0)
var/obj/effect/proc_holder/spell/targeted/projectile
projectile = new proj_type(user)
projectile.icon = proj_icon
projectile.icon_state = proj_icon_state
projectile.dir = get_dir(projectile, target)
projectile.name = proj_name
var/current_loc = user.loc
projectile.loc = current_loc
for(var/i = 0,i < proj_lifespan,i++)
if(!projectile)
break
if(proj_insubstantial)
projectile.loc = get_step(projectile, projectile.dir)
else
step(projectile, projectile.dir)
if(projectile.loc == current_loc || i == proj_lifespan)
projectile.cast(current_loc)
break
var/mob/living/L = locate(/mob/living) in range(projectile, proj_trigger_range) - user
if(L && L.stat != DEAD)
projectile.cast(L.loc)
break
if(proj_trail && projectile)
spawn(0)
if(projectile)
var/obj/effect/overlay/trail = new /obj/effect/overlay(projectile.loc)
trail.icon = proj_trail_icon
trail.icon_state = proj_trail_icon_state
trail.density = 0
spawn(proj_trail_lifespan)
qdel(trail)
current_loc = projectile.loc
var/matrix/M = new
M.Turn(dir2angle(projectile.dir))
projectile.transform = M
sleep(proj_step_delay)
if(projectile)
qdel(projectile)
/obj/effect/proc_holder/spell/dumbfire
var/projectile_type = ""
var/activate_on_collision = 1
var/proj_icon = 'icons/obj/projectiles.dmi'
var/proj_icon_state = "spell"
var/proj_name = "a spell projectile"
var/proj_trail = 0 //if it leaves a trail
var/proj_trail_lifespan = 0 //deciseconds
var/proj_trail_icon = 'icons/obj/wizard.dmi'
var/proj_trail_icon_state = "trail"
var/proj_type = /obj/effect/proc_holder/spell //IMPORTANT use only subtypes of this
var/proj_insubstantial = 0 //if it can pass through dense objects or not
var/proj_trigger_range = 1 //the range from target at which the projectile triggers cast(target)
var/proj_lifespan = 100 //in deciseconds * proj_step_delay
var/proj_step_delay = 1 //lower = faster
/obj/effect/proc_holder/spell/dumbfire/choose_targets(mob/user = usr)
var/turf/T = get_turf(usr)
for(var/i = 1; i < range; i++)
var/turf/new_turf = get_step(T, usr.dir)
if(new_turf.density)
break
T = new_turf
perform(list(T), user = user)
/obj/effect/proc_holder/spell/dumbfire/cast(list/targets, mob/user = usr)
for(var/turf/target in targets)
spawn(0)
var/obj/effect/proc_holder/spell/targeted/projectile
projectile = new proj_type(user)
projectile.icon = proj_icon
projectile.icon_state = proj_icon_state
projectile.dir = get_dir(projectile, target)
projectile.name = proj_name
var/current_loc = user.loc
projectile.loc = current_loc
for(var/i = 0,i < proj_lifespan,i++)
if(!projectile)
break
if(proj_insubstantial)
projectile.loc = get_step(projectile, projectile.dir)
else
step(projectile, projectile.dir)
if(projectile.loc == current_loc || i == proj_lifespan)
projectile.cast(current_loc)
break
var/mob/living/L = locate(/mob/living) in range(projectile, proj_trigger_range) - user
if(L && L.stat != DEAD)
projectile.cast(L.loc)
break
if(proj_trail && projectile)
spawn(0)
if(projectile)
var/obj/effect/overlay/trail = new /obj/effect/overlay(projectile.loc)
trail.icon = proj_trail_icon
trail.icon_state = proj_trail_icon_state
trail.density = 0
spawn(proj_trail_lifespan)
qdel(trail)
current_loc = projectile.loc
var/matrix/M = new
M.Turn(dir2angle(projectile.dir))
projectile.transform = M
sleep(proj_step_delay)
if(projectile)
qdel(projectile)
+15 -15
View File
@@ -1,15 +1,15 @@
/obj/effect/proc_holder/spell/targeted/emplosion
name = "Emplosion"
desc = "This spell emplodes an area."
var/emp_heavy = 2
var/emp_light = 3
action_icon_state = "emp"
/obj/effect/proc_holder/spell/targeted/emplosion/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
empulse(target.loc, emp_heavy, emp_light, 1)
return
/obj/effect/proc_holder/spell/targeted/emplosion
name = "Emplosion"
desc = "This spell emplodes an area."
var/emp_heavy = 2
var/emp_light = 3
action_icon_state = "emp"
/obj/effect/proc_holder/spell/targeted/emplosion/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
empulse(target.loc, emp_heavy, emp_light, 1)
return
+104 -104
View File
@@ -1,104 +1,104 @@
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt
name = "Ethereal Jaunt"
desc = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
school = "transmutation"
charge_max = 300
clothes_req = 1
invocation = "none"
invocation_type = "none"
range = -1
cooldown_min = 100 //50 deciseconds reduction per rank
include_user = 1
nonabstract_req = 1
centcom_cancast = 0 //Prevent people from getting to centcom
var/jaunt_duration = 50 //in deciseconds
var/jaunt_in_time = 5
var/jaunt_in_type = /obj/effect/temp_visual/wizard
var/jaunt_out_type = /obj/effect/temp_visual/wizard/out
action_icon_state = "jaunt"
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets, mob/user = usr) //magnets, so mostly hardcoded
playsound(get_turf(user), 'sound/magic/ethereal_enter.ogg', 50, 1, -1)
for(var/mob/living/target in targets)
if(!target.can_safely_leave_loc()) // No more brainmobs hopping out of their brains
to_chat(target, "<span class='warning'>You are somehow too bound to your current location to abandon it.</span>")
continue
INVOKE_ASYNC(src, .proc/do_jaunt, target)
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/do_jaunt(mob/living/target)
target.notransform = 1
var/turf/mobloc = get_turf(target)
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt(mobloc)
new jaunt_out_type(mobloc, target.dir)
target.ExtinguishMob()
target.forceMove(holder)
target.reset_perspective(holder)
target.notransform = 0 //mob is safely inside holder now, no need for protection.
jaunt_steam(mobloc)
sleep(jaunt_duration)
if(target.loc != holder) //mob warped out of the warp
qdel(holder)
return
mobloc = get_turf(target.loc)
jaunt_steam(mobloc)
target.canmove = 0
holder.reappearing = 1
playsound(get_turf(target), 'sound/magic/ethereal_exit.ogg', 50, 1, -1)
sleep(25 - jaunt_in_time)
new jaunt_in_type(mobloc, holder.dir)
target.setDir(holder.dir)
sleep(jaunt_in_time)
qdel(holder)
if(!QDELETED(target))
if(mobloc.density)
for(var/direction in alldirs)
var/turf/T = get_step(mobloc, direction)
if(T)
if(target.Move(T))
break
target.canmove = 1
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_steam(mobloc)
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread()
steam.set_up(10, 0, mobloc)
steam.start()
/obj/effect/dummy/spell_jaunt
name = "water"
icon = 'icons/effects/effects.dmi'
icon_state = "nothing"
var/reappearing = 0
var/movedelay = 0
var/movespeed = 2
density = 0
anchored = 1
invisibility = 60
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/effect/dummy/spell_jaunt/Destroy()
// Eject contents if deleted somehow
for(var/atom/movable/AM in src)
AM.forceMove(get_turf(src))
return ..()
/obj/effect/dummy/spell_jaunt/relaymove(mob/user, direction)
if((movedelay > world.time) || reappearing || !direction)
return
var/turf/newLoc = get_step(src,direction)
setDir(direction)
if(!(newLoc.flags & NOJAUNT))
forceMove(newLoc)
else
to_chat(user, "<span class='warning'>Some strange aura is blocking the way!</span>")
movedelay = world.time + movespeed
/obj/effect/dummy/spell_jaunt/ex_act(blah)
return
/obj/effect/dummy/spell_jaunt/bullet_act(blah)
return
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt
name = "Ethereal Jaunt"
desc = "This spell creates your ethereal form, temporarily making you invisible and able to pass through walls."
school = "transmutation"
charge_max = 300
clothes_req = 1
invocation = "none"
invocation_type = "none"
range = -1
cooldown_min = 100 //50 deciseconds reduction per rank
include_user = 1
nonabstract_req = 1
centcom_cancast = 0 //Prevent people from getting to centcom
var/jaunt_duration = 50 //in deciseconds
var/jaunt_in_time = 5
var/jaunt_in_type = /obj/effect/temp_visual/wizard
var/jaunt_out_type = /obj/effect/temp_visual/wizard/out
action_icon_state = "jaunt"
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/cast(list/targets, mob/user = usr) //magnets, so mostly hardcoded
playsound(get_turf(user), 'sound/magic/ethereal_enter.ogg', 50, 1, -1)
for(var/mob/living/target in targets)
if(!target.can_safely_leave_loc()) // No more brainmobs hopping out of their brains
to_chat(target, "<span class='warning'>You are somehow too bound to your current location to abandon it.</span>")
continue
INVOKE_ASYNC(src, .proc/do_jaunt, target)
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/do_jaunt(mob/living/target)
target.notransform = 1
var/turf/mobloc = get_turf(target)
var/obj/effect/dummy/spell_jaunt/holder = new /obj/effect/dummy/spell_jaunt(mobloc)
new jaunt_out_type(mobloc, target.dir)
target.ExtinguishMob()
target.forceMove(holder)
target.reset_perspective(holder)
target.notransform = 0 //mob is safely inside holder now, no need for protection.
jaunt_steam(mobloc)
sleep(jaunt_duration)
if(target.loc != holder) //mob warped out of the warp
qdel(holder)
return
mobloc = get_turf(target.loc)
jaunt_steam(mobloc)
target.canmove = 0
holder.reappearing = 1
playsound(get_turf(target), 'sound/magic/ethereal_exit.ogg', 50, 1, -1)
sleep(25 - jaunt_in_time)
new jaunt_in_type(mobloc, holder.dir)
target.setDir(holder.dir)
sleep(jaunt_in_time)
qdel(holder)
if(!QDELETED(target))
if(mobloc.density)
for(var/direction in alldirs)
var/turf/T = get_step(mobloc, direction)
if(T)
if(target.Move(T))
break
target.canmove = 1
/obj/effect/proc_holder/spell/targeted/ethereal_jaunt/proc/jaunt_steam(mobloc)
var/datum/effect_system/steam_spread/steam = new /datum/effect_system/steam_spread()
steam.set_up(10, 0, mobloc)
steam.start()
/obj/effect/dummy/spell_jaunt
name = "water"
icon = 'icons/effects/effects.dmi'
icon_state = "nothing"
var/reappearing = 0
var/movedelay = 0
var/movespeed = 2
density = 0
anchored = 1
invisibility = 60
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
/obj/effect/dummy/spell_jaunt/Destroy()
// Eject contents if deleted somehow
for(var/atom/movable/AM in src)
AM.forceMove(get_turf(src))
return ..()
/obj/effect/dummy/spell_jaunt/relaymove(mob/user, direction)
if((movedelay > world.time) || reappearing || !direction)
return
var/turf/newLoc = get_step(src,direction)
setDir(direction)
if(!(newLoc.flags & NOJAUNT))
forceMove(newLoc)
else
to_chat(user, "<span class='warning'>Some strange aura is blocking the way!</span>")
movedelay = world.time + movespeed
/obj/effect/dummy/spell_jaunt/ex_act(blah)
return
/obj/effect/dummy/spell_jaunt/bullet_act(blah)
return
+15 -15
View File
@@ -1,15 +1,15 @@
/obj/effect/proc_holder/spell/targeted/explosion
name = "Explosion"
desc = "This spell explodes an area."
var/ex_severe = 1
var/ex_heavy = 2
var/ex_light = 3
var/ex_flash = 4
/obj/effect/proc_holder/spell/targeted/explosion/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
explosion(target.loc,ex_severe,ex_heavy,ex_light,ex_flash)
return
/obj/effect/proc_holder/spell/targeted/explosion
name = "Explosion"
desc = "This spell explodes an area."
var/ex_severe = 1
var/ex_heavy = 2
var/ex_light = 3
var/ex_flash = 4
/obj/effect/proc_holder/spell/targeted/explosion/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
explosion(target.loc,ex_severe,ex_heavy,ex_light,ex_flash)
return
+1 -1
View File
@@ -8,4 +8,4 @@
clothes_req = 0
cooldown_min = 200 //100 deciseconds reduction per rank
action_icon_state = "gib"
action_icon_state = "gib"
+37 -37
View File
@@ -1,37 +1,37 @@
/obj/effect/proc_holder/spell/targeted/genetic
name = "Genetic"
desc = "This spell inflicts a set of mutations and disabilities upon the target."
var/disabilities = 0 //bits
var/list/mutations = list() //mutation strings
var/duration = 100 //deciseconds
/*
Disabilities
1st bit - ?
2nd bit - ?
3rd bit - ?
4th bit - ?
5th bit - ?
6th bit - ?
*/
/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
for(var/x in mutations)
target.mutations.Add(x)
/* if(x == HULK && ishuman(target))
target:hulk_time=world.time + duration */
target.disabilities |= disabilities
target.update_mutations() //update target's mutation overlays
var/mob/living/carbon/human/H = target
if(ishuman(target))
H.update_body()
spawn(duration)
target.mutations.Remove(mutations)
target.disabilities &= ~disabilities
target.update_mutations()
if(ishuman(target))
H.update_body()
return
/obj/effect/proc_holder/spell/targeted/genetic
name = "Genetic"
desc = "This spell inflicts a set of mutations and disabilities upon the target."
var/disabilities = 0 //bits
var/list/mutations = list() //mutation strings
var/duration = 100 //deciseconds
/*
Disabilities
1st bit - ?
2nd bit - ?
3rd bit - ?
4th bit - ?
5th bit - ?
6th bit - ?
*/
/obj/effect/proc_holder/spell/targeted/genetic/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
for(var/x in mutations)
target.mutations.Add(x)
/* if(x == HULK && ishuman(target))
target:hulk_time=world.time + duration */
target.disabilities |= disabilities
target.update_mutations() //update target's mutation overlays
var/mob/living/carbon/human/H = target
if(ishuman(target))
H.update_body()
spawn(duration)
target.mutations.Remove(mutations)
target.disabilities &= ~disabilities
target.update_mutations()
if(ishuman(target))
H.update_body()
return
+48 -48
View File
@@ -1,48 +1,48 @@
/obj/effect/proc_holder/spell/targeted/horsemask
name = "Curse of the Horseman"
desc = "This spell triggers a curse on a target, causing them to wield an unremovable horse head mask. They will speak like a horse! Any masks they are wearing will be disintegrated. This spell does not require robes."
school = "transmutation"
charge_type = "recharge"
charge_max = 150
charge_counter = 0
clothes_req = 0
stat_allowed = 0
invocation = "KN'A FTAGHU, PUCK 'BTHNK!"
invocation_type = "shout"
range = 7
cooldown_min = 30 //30 deciseconds reduction per rank
selection_type = "range"
action_icon_state = "barn"
sound = 'sound/magic/HorseHead_curse.ogg'
/obj/effect/proc_holder/spell/targeted/horsemask/cast(list/targets, mob/user = usr)
if(!targets.len)
to_chat(user, "<span class='notice'>No target found in range.</span>")
return
var/mob/living/carbon/target = targets[1]
if(!target)
return
if(!ishuman(target))
to_chat(user, "<span class='notice'>It'd be stupid to curse [target] with a horse's head!</span>")
return
if(!(target in oview(range)))//If they are not in overview after selection.
to_chat(user, "<span class='notice'>They are too far away!</span>")
return
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
magichead.flags |= NODROP | DROPDEL //curses!
magichead.flags_inv = null //so you can still see their face
magichead.voicechange = 1 //NEEEEIIGHH
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
if(!target.unEquip(target.wear_mask))
qdel(target.wear_mask)
target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
target.flash_eyes()
/obj/effect/proc_holder/spell/targeted/horsemask
name = "Curse of the Horseman"
desc = "This spell triggers a curse on a target, causing them to wield an unremovable horse head mask. They will speak like a horse! Any masks they are wearing will be disintegrated. This spell does not require robes."
school = "transmutation"
charge_type = "recharge"
charge_max = 150
charge_counter = 0
clothes_req = 0
stat_allowed = 0
invocation = "KN'A FTAGHU, PUCK 'BTHNK!"
invocation_type = "shout"
range = 7
cooldown_min = 30 //30 deciseconds reduction per rank
selection_type = "range"
action_icon_state = "barn"
sound = 'sound/magic/HorseHead_curse.ogg'
/obj/effect/proc_holder/spell/targeted/horsemask/cast(list/targets, mob/user = usr)
if(!targets.len)
to_chat(user, "<span class='notice'>No target found in range.</span>")
return
var/mob/living/carbon/target = targets[1]
if(!target)
return
if(!ishuman(target))
to_chat(user, "<span class='notice'>It'd be stupid to curse [target] with a horse's head!</span>")
return
if(!(target in oview(range)))//If they are not in overview after selection.
to_chat(user, "<span class='notice'>They are too far away!</span>")
return
var/obj/item/clothing/mask/horsehead/magichead = new /obj/item/clothing/mask/horsehead
magichead.flags |= NODROP | DROPDEL //curses!
magichead.flags_inv = null //so you can still see their face
magichead.voicechange = 1 //NEEEEIIGHH
target.visible_message( "<span class='danger'>[target]'s face lights up in fire, and after the event a horse's head takes its place!</span>", \
"<span class='danger'>Your face burns up, and shortly after the fire you realise you have the face of a horse!</span>")
if(!target.unEquip(target.wear_mask))
qdel(target.wear_mask)
target.equip_to_slot_if_possible(magichead, slot_wear_mask, 1, 1)
target.flash_eyes()
+57 -57
View File
@@ -1,57 +1,57 @@
/obj/effect/proc_holder/spell/targeted/inflict_handler
name = "Inflict Handler"
desc = "This spell blinds and/or destroys/damages/heals and/or weakens/stuns the target."
var/amt_weakened = 0
var/amt_paralysis = 0
var/amt_stunned = 0
//set to negatives for healing
var/amt_dam_fire = 0
var/amt_dam_brute = 0
var/amt_dam_oxy = 0
var/amt_dam_tox = 0
var/amt_eye_blind = 0
var/amt_eye_blurry = 0
var/destroys = "none" //can be "none", "gib" or "disintegrate"
var/summon_type = null //this will put an obj at the target's location
/obj/effect/proc_holder/spell/targeted/inflict_handler/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
switch(destroys)
if("gib")
target.gib()
if("disintegrate")
target.dust()
if(!target)
continue
//damage
if(amt_dam_brute > 0)
if(amt_dam_fire >= 0)
target.take_overall_damage(amt_dam_brute,amt_dam_fire)
else if(amt_dam_fire < 0)
target.take_overall_damage(amt_dam_brute,0)
target.heal_overall_damage(0,amt_dam_fire)
else if(amt_dam_brute < 0)
if(amt_dam_fire > 0)
target.take_overall_damage(0,amt_dam_fire)
target.heal_overall_damage(amt_dam_brute,0)
else if(amt_dam_fire <= 0)
target.heal_overall_damage(amt_dam_brute,amt_dam_fire)
target.adjustToxLoss(amt_dam_tox)
target.adjustOxyLoss(amt_dam_oxy)
//disabling
target.Weaken(amt_weakened)
target.Paralyse(amt_paralysis)
target.Stun(amt_stunned)
target.AdjustEyeBlind(amt_eye_blind)
target.AdjustEyeBlurry(amt_eye_blurry)
//summoning
if(summon_type)
new summon_type(target.loc, target)
/obj/effect/proc_holder/spell/targeted/inflict_handler
name = "Inflict Handler"
desc = "This spell blinds and/or destroys/damages/heals and/or weakens/stuns the target."
var/amt_weakened = 0
var/amt_paralysis = 0
var/amt_stunned = 0
//set to negatives for healing
var/amt_dam_fire = 0
var/amt_dam_brute = 0
var/amt_dam_oxy = 0
var/amt_dam_tox = 0
var/amt_eye_blind = 0
var/amt_eye_blurry = 0
var/destroys = "none" //can be "none", "gib" or "disintegrate"
var/summon_type = null //this will put an obj at the target's location
/obj/effect/proc_holder/spell/targeted/inflict_handler/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
switch(destroys)
if("gib")
target.gib()
if("disintegrate")
target.dust()
if(!target)
continue
//damage
if(amt_dam_brute > 0)
if(amt_dam_fire >= 0)
target.take_overall_damage(amt_dam_brute,amt_dam_fire)
else if(amt_dam_fire < 0)
target.take_overall_damage(amt_dam_brute,0)
target.heal_overall_damage(0,amt_dam_fire)
else if(amt_dam_brute < 0)
if(amt_dam_fire > 0)
target.take_overall_damage(0,amt_dam_fire)
target.heal_overall_damage(amt_dam_brute,0)
else if(amt_dam_fire <= 0)
target.heal_overall_damage(amt_dam_brute,amt_dam_fire)
target.adjustToxLoss(amt_dam_tox)
target.adjustOxyLoss(amt_dam_oxy)
//disabling
target.Weaken(amt_weakened)
target.Paralyse(amt_paralysis)
target.Stun(amt_stunned)
target.AdjustEyeBlind(amt_eye_blind)
target.AdjustEyeBlurry(amt_eye_blurry)
//summoning
if(summon_type)
new summon_type(target.loc, target)
+57 -57
View File
@@ -1,57 +1,57 @@
/obj/effect/proc_holder/spell/aoe_turf/knock
name = "Knock"
desc = "This spell opens nearby doors and does not require wizard garb."
school = "transmutation"
charge_max = 100
clothes_req = 0
invocation = "AULIE OXIN FIERA"
invocation_type = "whisper"
range = 3
cooldown_min = 20 //20 deciseconds reduction per rank
action_icon_state = "knock"
sound = 'sound/magic/knock.ogg'
/obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets, mob/user = usr)
for(var/turf/T in targets)
for(var/obj/machinery/door/door in T.contents)
spawn(1)
if(istype(door,/obj/machinery/door/airlock/hatch/gamma))
return
if(istype(door,/obj/machinery/door/airlock))
var/obj/machinery/door/airlock/A = door
A.unlock(1) //forced because it's magic!
door.open()
for(var/obj/structure/closet/C in T.contents)
spawn(1)
if(istype(C, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = C
SC.locked = 0
C.open()
return
/obj/effect/proc_holder/spell/aoe_turf/knock/greater
name = "Greater Knock"
desc = "On first cast, will remove access restrictions on all airlocks on the station, and announce this spell's use to the station. On any further cast, will open all doors in sight. Cannot be refunded once bought!"
charge_max = 200
invocation = "MAIOR OXIN FIERA"
invocation_type = "shout"
range = 7
level_max = 0 //Cannot be improved, quality of life since can't be refunded
cooldown_min = 200
var/used = FALSE
/obj/effect/proc_holder/spell/aoe_turf/knock/greater/cast(list/targets, mob/user = usr)
if(!used)
used = TRUE
for(var/obj/machinery/door/airlock/A in GLOB.airlocks)
if(is_station_level(A.z))
A.req_access = list()
A.req_one_access = list()
command_announcement.Announce("We have removed all access requirements on your station's airlocks. You can thank us later!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message")
else
..()
return
/obj/effect/proc_holder/spell/aoe_turf/knock
name = "Knock"
desc = "This spell opens nearby doors and does not require wizard garb."
school = "transmutation"
charge_max = 100
clothes_req = 0
invocation = "AULIE OXIN FIERA"
invocation_type = "whisper"
range = 3
cooldown_min = 20 //20 deciseconds reduction per rank
action_icon_state = "knock"
sound = 'sound/magic/knock.ogg'
/obj/effect/proc_holder/spell/aoe_turf/knock/cast(list/targets, mob/user = usr)
for(var/turf/T in targets)
for(var/obj/machinery/door/door in T.contents)
spawn(1)
if(istype(door,/obj/machinery/door/airlock/hatch/gamma))
return
if(istype(door,/obj/machinery/door/airlock))
var/obj/machinery/door/airlock/A = door
A.unlock(1) //forced because it's magic!
door.open()
for(var/obj/structure/closet/C in T.contents)
spawn(1)
if(istype(C, /obj/structure/closet/secure_closet))
var/obj/structure/closet/secure_closet/SC = C
SC.locked = 0
C.open()
return
/obj/effect/proc_holder/spell/aoe_turf/knock/greater
name = "Greater Knock"
desc = "On first cast, will remove access restrictions on all airlocks on the station, and announce this spell's use to the station. On any further cast, will open all doors in sight. Cannot be refunded once bought!"
charge_max = 200
invocation = "MAIOR OXIN FIERA"
invocation_type = "shout"
range = 7
level_max = 0 //Cannot be improved, quality of life since can't be refunded
cooldown_min = 200
var/used = FALSE
/obj/effect/proc_holder/spell/aoe_turf/knock/greater/cast(list/targets, mob/user = usr)
if(!used)
used = TRUE
for(var/obj/machinery/door/airlock/A in GLOB.airlocks)
if(is_station_level(A.z))
A.req_access = list()
A.req_one_access = list()
command_announcement.Announce("We have removed all access requirements on your station's airlocks. You can thank us later!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message")
else
..()
return
+1 -1
View File
@@ -130,4 +130,4 @@
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(H), slot_head)
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal(H), slot_shoes)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(H), slot_w_uniform)
H.equip_to_slot_or_del(new /obj/item/clothing/under/color/black(H), slot_w_uniform)
+1 -1
View File
@@ -117,4 +117,4 @@ obj/effect/proc_holder/spell/targeted/lightning/proc/Reset(mob/user = usr)
return
var/mob/living/next = pick(possible_targets)
if(next)
Bolt(current,next,bolt_energy,bounces-1,user) // 5 max bounces
Bolt(current,next,bolt_energy,bounces-1,user) // 5 max bounces
+1 -1
View File
@@ -122,4 +122,4 @@ obj/effect/proc_holder/spell/targeted/magnet/proc/Reset(mob/user = usr)
return
var/mob/living/next = pick(possible_targets)
if(next)
Bolt(current,next,bolt_energy,bounces-1,user) // 5 max bounces
Bolt(current,next,bolt_energy,bounces-1,user) // 5 max bounces
+1 -1
View File
@@ -164,4 +164,4 @@
/obj/item/spellbook/oneuse/mime/greaterwall
spell = /obj/effect/proc_holder/spell/targeted/forcewall/mime
spellname = "Invisible Greater Wall"
desc = "It contains illustrations of the great walls of human history."
desc = "It contains illustrations of the great walls of human history."
+1 -1
View File
@@ -51,4 +51,4 @@
equip_to_slot_if_possible(new /obj/item/clothing/suit/suspenders/nodrop, slot_wear_suit, TRUE, TRUE)
dna.SetSEState(MUTEBLOCK , TRUE, TRUE)
genemutcheck(src, MUTEBLOCK , null, MUTCHK_FORCED)
dna.default_blocks.Add(MUTEBLOCK)
dna.default_blocks.Add(MUTEBLOCK)
+82 -82
View File
@@ -1,82 +1,82 @@
/obj/effect/proc_holder/spell/targeted/mind_transfer
name = "Mind Transfer"
desc = "This spell allows the user to switch bodies with a target."
school = "transmutation"
charge_max = 600
clothes_req = 0
invocation = "GIN'YU CAPAN"
invocation_type = "whisper"
range = 1
cooldown_min = 200 //100 deciseconds reduction per rank
var/list/protected_roles = list("Wizard","Changeling","Cultist") //which roles are immune to the spell
var/paralysis_amount_caster = 20 //how much the caster is paralysed for after the spell
var/paralysis_amount_victim = 20 //how much the victim is paralysed for after the spell
action_icon_state = "mindswap"
/*
Urist: I don't feel like figuring out how you store object spells so I'm leaving this for you to do.
Make sure spells that are removed from spell_list are actually removed and deleted when mind transfering.
Also, you never added distance checking after target is selected. I've went ahead and did that.
*/
/obj/effect/proc_holder/spell/targeted/mind_transfer/cast(list/targets, mob/user = usr, distanceoverride)
var/mob/living/target = targets[range]
if(!(target in oview(range)) && !distanceoverride)//If they are not in overview after selection. Do note that !() is necessary for in to work because ! takes precedence over it.
to_chat(user, "They are too far away!")
return
if(target.stat == DEAD)
to_chat(user, "You don't particularly want to be dead.")
return
if(!target.key || !target.mind)
to_chat(user, "[target.p_they(TRUE)] appear[target.p_s()] to be catatonic. Not even magic can affect [target.p_their()] vacant mind.")
return
if(user.suiciding)
to_chat(user, "<span class='warning'>You're killing yourself! You can't concentrate enough to do this!</span>")
return
if(target.mind.special_role in protected_roles)
to_chat(user, "Their mind is resisting your spell.")
return
if(istype(target, /mob/living/silicon))
to_chat(user, "You feel this enslaved being is just as dead as its cold, hard exoskeleton.")
return
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.
//MIND TRANSFER BEGIN
if(caster.mind.special_verbs.len)//If the caster had any special verbs, remove them from the mob verb list.
for(var/V in caster.mind.special_verbs)//Since the caster is using an object spell system, this is mostly moot.
caster.verbs -= V//But a safety nontheless.
if(victim.mind.special_verbs.len)//Now remove all of the victim's verbs.
for(var/V in victim.mind.special_verbs)
victim.verbs -= V
var/mob/dead/observer/ghost = victim.ghostize(0)
caster.mind.transfer_to(victim)
if(victim.mind.special_verbs.len)//To add all the special verbs for the original caster.
for(var/V in caster.mind.special_verbs)//Not too important but could come into play.
caster.verbs += V
ghost.mind.transfer_to(caster)
if(ghost.key)
GLOB.non_respawnable_keys -= ghost.ckey //ghostizing with an argument of 0 will make them unable to respawn forever, which is bad
caster.key = ghost.key //have to transfer the key since the mind was not active
qdel(ghost)
if(caster.mind.special_verbs.len)//If they had any special verbs, we add them here.
for(var/V in caster.mind.special_verbs)
caster.verbs += V
//MIND TRANSFER END
//Here we paralyze both mobs and knock them out for a time.
caster.Paralyse(paralysis_amount_caster)
victim.Paralyse(paralysis_amount_victim)
/obj/effect/proc_holder/spell/targeted/mind_transfer
name = "Mind Transfer"
desc = "This spell allows the user to switch bodies with a target."
school = "transmutation"
charge_max = 600
clothes_req = 0
invocation = "GIN'YU CAPAN"
invocation_type = "whisper"
range = 1
cooldown_min = 200 //100 deciseconds reduction per rank
var/list/protected_roles = list("Wizard","Changeling","Cultist") //which roles are immune to the spell
var/paralysis_amount_caster = 20 //how much the caster is paralysed for after the spell
var/paralysis_amount_victim = 20 //how much the victim is paralysed for after the spell
action_icon_state = "mindswap"
/*
Urist: I don't feel like figuring out how you store object spells so I'm leaving this for you to do.
Make sure spells that are removed from spell_list are actually removed and deleted when mind transfering.
Also, you never added distance checking after target is selected. I've went ahead and did that.
*/
/obj/effect/proc_holder/spell/targeted/mind_transfer/cast(list/targets, mob/user = usr, distanceoverride)
var/mob/living/target = targets[range]
if(!(target in oview(range)) && !distanceoverride)//If they are not in overview after selection. Do note that !() is necessary for in to work because ! takes precedence over it.
to_chat(user, "They are too far away!")
return
if(target.stat == DEAD)
to_chat(user, "You don't particularly want to be dead.")
return
if(!target.key || !target.mind)
to_chat(user, "[target.p_they(TRUE)] appear[target.p_s()] to be catatonic. Not even magic can affect [target.p_their()] vacant mind.")
return
if(user.suiciding)
to_chat(user, "<span class='warning'>You're killing yourself! You can't concentrate enough to do this!</span>")
return
if(target.mind.special_role in protected_roles)
to_chat(user, "Their mind is resisting your spell.")
return
if(istype(target, /mob/living/silicon))
to_chat(user, "You feel this enslaved being is just as dead as its cold, hard exoskeleton.")
return
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.
//MIND TRANSFER BEGIN
if(caster.mind.special_verbs.len)//If the caster had any special verbs, remove them from the mob verb list.
for(var/V in caster.mind.special_verbs)//Since the caster is using an object spell system, this is mostly moot.
caster.verbs -= V//But a safety nontheless.
if(victim.mind.special_verbs.len)//Now remove all of the victim's verbs.
for(var/V in victim.mind.special_verbs)
victim.verbs -= V
var/mob/dead/observer/ghost = victim.ghostize(0)
caster.mind.transfer_to(victim)
if(victim.mind.special_verbs.len)//To add all the special verbs for the original caster.
for(var/V in caster.mind.special_verbs)//Not too important but could come into play.
caster.verbs += V
ghost.mind.transfer_to(caster)
if(ghost.key)
GLOB.non_respawnable_keys -= ghost.ckey //ghostizing with an argument of 0 will make them unable to respawn forever, which is bad
caster.key = ghost.key //have to transfer the key since the mind was not active
qdel(ghost)
if(caster.mind.special_verbs.len)//If they had any special verbs, we add them here.
for(var/V in caster.mind.special_verbs)
caster.verbs += V
//MIND TRANSFER END
//Here we paralyze both mobs and knock them out for a time.
caster.Paralyse(paralysis_amount_caster)
victim.Paralyse(paralysis_amount_victim)
+86 -86
View File
@@ -1,86 +1,86 @@
/obj/effect/proc_holder/spell/targeted/projectile
name = "Projectile"
desc = "This spell summons projectiles which try to hit the targets."
var/proj_icon = 'icons/obj/projectiles.dmi'
var/proj_icon_state = "spell"
var/proj_name = "a spell projectile"
var/proj_trail = 0 //if it leaves a trail
var/proj_trail_lifespan = 0 //deciseconds
var/proj_trail_icon = 'icons/obj/wizard.dmi'
var/proj_trail_icon_state = "trail"
var/proj_type = "/obj/effect/proc_holder/spell/targeted" //IMPORTANT use only subtypes of this
var/proj_lingering = 0 //if it lingers or disappears upon hitting an obstacle
var/proj_homing = 1 //if it follows the target
var/proj_insubstantial = 0 //if it can pass through dense objects or not
var/proj_trigger_range = 0 //the range from target at which the projectile triggers cast(target)
var/proj_lifespan = 15 //in deciseconds * proj_step_delay
var/proj_step_delay = 1 //lower = faster
/obj/effect/proc_holder/spell/targeted/projectile/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
spawn(0)
var/obj/effect/proc_holder/spell/targeted/projectile
if(istext(proj_type))
var/projectile_type = text2path(proj_type)
projectile = new projectile_type(user)
if(istype(proj_type,/obj/effect/proc_holder/spell))
projectile = new /obj/effect/proc_holder/spell/targeted/trigger(user)
projectile:linked_spells += proj_type
projectile.icon = proj_icon
projectile.icon_state = proj_icon_state
projectile.dir = get_dir(target,projectile)
projectile.name = proj_name
var/current_loc = user.loc
projectile.loc = current_loc
for(var/i = 0,i < proj_lifespan,i++)
if(!projectile)
break
if(proj_homing)
if(proj_insubstantial)
projectile.dir = get_dir(projectile,target)
projectile.loc = get_step_to(projectile,target)
else
step_to(projectile,target)
else
if(proj_insubstantial)
projectile.loc = get_step(projectile,dir)
else
step(projectile,dir)
if(!projectile) // step and step_to sleeps so we'll have to check again.
break
if(!proj_lingering && projectile.loc == current_loc) //if it didn't move since last time
qdel(projectile)
break
if(proj_trail && projectile)
spawn(0)
if(projectile)
var/obj/effect/overlay/trail = new /obj/effect/overlay(projectile.loc)
trail.icon = proj_trail_icon
trail.icon_state = proj_trail_icon_state
trail.density = 0
spawn(proj_trail_lifespan)
qdel(trail)
if(projectile.loc in range(target.loc,proj_trigger_range))
projectile.perform(list(target), user = user)
break
current_loc = projectile.loc
sleep(proj_step_delay)
if(projectile)
qdel(projectile)
/obj/effect/proc_holder/spell/targeted/projectile
name = "Projectile"
desc = "This spell summons projectiles which try to hit the targets."
var/proj_icon = 'icons/obj/projectiles.dmi'
var/proj_icon_state = "spell"
var/proj_name = "a spell projectile"
var/proj_trail = 0 //if it leaves a trail
var/proj_trail_lifespan = 0 //deciseconds
var/proj_trail_icon = 'icons/obj/wizard.dmi'
var/proj_trail_icon_state = "trail"
var/proj_type = "/obj/effect/proc_holder/spell/targeted" //IMPORTANT use only subtypes of this
var/proj_lingering = 0 //if it lingers or disappears upon hitting an obstacle
var/proj_homing = 1 //if it follows the target
var/proj_insubstantial = 0 //if it can pass through dense objects or not
var/proj_trigger_range = 0 //the range from target at which the projectile triggers cast(target)
var/proj_lifespan = 15 //in deciseconds * proj_step_delay
var/proj_step_delay = 1 //lower = faster
/obj/effect/proc_holder/spell/targeted/projectile/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
spawn(0)
var/obj/effect/proc_holder/spell/targeted/projectile
if(istext(proj_type))
var/projectile_type = text2path(proj_type)
projectile = new projectile_type(user)
if(istype(proj_type,/obj/effect/proc_holder/spell))
projectile = new /obj/effect/proc_holder/spell/targeted/trigger(user)
projectile:linked_spells += proj_type
projectile.icon = proj_icon
projectile.icon_state = proj_icon_state
projectile.dir = get_dir(target,projectile)
projectile.name = proj_name
var/current_loc = user.loc
projectile.loc = current_loc
for(var/i = 0,i < proj_lifespan,i++)
if(!projectile)
break
if(proj_homing)
if(proj_insubstantial)
projectile.dir = get_dir(projectile,target)
projectile.loc = get_step_to(projectile,target)
else
step_to(projectile,target)
else
if(proj_insubstantial)
projectile.loc = get_step(projectile,dir)
else
step(projectile,dir)
if(!projectile) // step and step_to sleeps so we'll have to check again.
break
if(!proj_lingering && projectile.loc == current_loc) //if it didn't move since last time
qdel(projectile)
break
if(proj_trail && projectile)
spawn(0)
if(projectile)
var/obj/effect/overlay/trail = new /obj/effect/overlay(projectile.loc)
trail.icon = proj_trail_icon
trail.icon_state = proj_trail_icon_state
trail.density = 0
spawn(proj_trail_lifespan)
qdel(trail)
if(projectile.loc in range(target.loc,proj_trigger_range))
projectile.perform(list(target), user = user)
break
current_loc = projectile.loc
sleep(proj_step_delay)
if(projectile)
qdel(projectile)
+1 -1
View File
@@ -111,4 +111,4 @@
shapeshift_type = /mob/living/simple_animal/hostile/hellhound/greater
current_shapes = list(/mob/living/simple_animal/hostile/hellhound/greater)
current_casters = list()
possible_shapes = list(/mob/living/simple_animal/hostile/hellhound/greater)
possible_shapes = list(/mob/living/simple_animal/hostile/hellhound/greater)
+29 -29
View File
@@ -1,29 +1,29 @@
/obj/effect/proc_holder/spell/targeted/trigger
name = "Trigger"
desc = "This spell triggers another spell or a few."
var/list/linked_spells = list() //those are just referenced by the trigger spell and are unaffected by it directly
var/list/starting_spells = list() //those are added on New() to contents from default spells and are deleted when the trigger spell is deleted to prevent memory leaks
/obj/effect/proc_holder/spell/targeted/trigger/New()
..()
for(var/spell in starting_spells)
var/spell_to_add = text2path(spell)
new spell_to_add(src) //should result in adding to contents, needs testing
/obj/effect/proc_holder/spell/targeted/trigger/Destroy()
for(var/spell in contents)
qdel(spell)
linked_spells = null
starting_spells = null
return ..()
/obj/effect/proc_holder/spell/targeted/trigger/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
for(var/obj/effect/proc_holder/spell/spell in contents)
spell.perform(list(target), 0, user = user)
for(var/obj/effect/proc_holder/spell/spell in linked_spells)
spell.perform(list(target), 0, user = user)
return
/obj/effect/proc_holder/spell/targeted/trigger
name = "Trigger"
desc = "This spell triggers another spell or a few."
var/list/linked_spells = list() //those are just referenced by the trigger spell and are unaffected by it directly
var/list/starting_spells = list() //those are added on New() to contents from default spells and are deleted when the trigger spell is deleted to prevent memory leaks
/obj/effect/proc_holder/spell/targeted/trigger/New()
..()
for(var/spell in starting_spells)
var/spell_to_add = text2path(spell)
new spell_to_add(src) //should result in adding to contents, needs testing
/obj/effect/proc_holder/spell/targeted/trigger/Destroy()
for(var/spell in contents)
qdel(spell)
linked_spells = null
starting_spells = null
return ..()
/obj/effect/proc_holder/spell/targeted/trigger/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
for(var/obj/effect/proc_holder/spell/spell in contents)
spell.perform(list(target), 0, user = user)
for(var/obj/effect/proc_holder/spell/spell in linked_spells)
spell.perform(list(target), 0, user = user)
return
+40 -40
View File
@@ -1,40 +1,40 @@
/obj/effect/proc_holder/spell/targeted/turf_teleport
name = "Turf Teleport"
desc = "This spell teleports the target to the turf in range."
nonabstract_req = 1
var/inner_tele_radius = 1
var/outer_tele_radius = 2
var/include_space = 0 //whether it includes space tiles in possible teleport locations
var/include_dense = 0 //whether it includes dense tiles in possible teleport locations
var/sound1 = 'sound/weapons/zapbang.ogg'
var/sound2 = 'sound/weapons/zapbang.ogg'
/obj/effect/proc_holder/spell/targeted/turf_teleport/cast(list/targets,mob/living/user = usr)
playsound(get_turf(user), sound1, 50,1)
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
if(istype(T,/turf/space) && !include_space) continue
if(T.density && !include_dense) continue
if(T.x>world.maxx-outer_tele_radius || T.x<outer_tele_radius) continue //putting them at the edge is dumb
if(T.y>world.maxy-outer_tele_radius || T.y<outer_tele_radius) continue
turfs += T
if(!turfs.len)
var/list/turfs_to_pick_from = list()
for(var/turf/T in orange(target,outer_tele_radius))
if(!(T in orange(target,inner_tele_radius)))
turfs_to_pick_from += T
turfs += pick(/turf in turfs_to_pick_from)
var/turf/picked = pick(turfs)
if(!picked || !isturf(picked))
return
target.forceMove(picked)
playsound(get_turf(user), sound2, 50,1)
/obj/effect/proc_holder/spell/targeted/turf_teleport
name = "Turf Teleport"
desc = "This spell teleports the target to the turf in range."
nonabstract_req = 1
var/inner_tele_radius = 1
var/outer_tele_radius = 2
var/include_space = 0 //whether it includes space tiles in possible teleport locations
var/include_dense = 0 //whether it includes dense tiles in possible teleport locations
var/sound1 = 'sound/weapons/zapbang.ogg'
var/sound2 = 'sound/weapons/zapbang.ogg'
/obj/effect/proc_holder/spell/targeted/turf_teleport/cast(list/targets,mob/living/user = usr)
playsound(get_turf(user), sound1, 50,1)
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
if(istype(T,/turf/space) && !include_space) continue
if(T.density && !include_dense) continue
if(T.x>world.maxx-outer_tele_radius || T.x<outer_tele_radius) continue //putting them at the edge is dumb
if(T.y>world.maxy-outer_tele_radius || T.y<outer_tele_radius) continue
turfs += T
if(!turfs.len)
var/list/turfs_to_pick_from = list()
for(var/turf/T in orange(target,outer_tele_radius))
if(!(T in orange(target,inner_tele_radius)))
turfs_to_pick_from += T
turfs += pick(/turf in turfs_to_pick_from)
var/turf/picked = pick(turfs)
if(!picked || !isturf(picked))
return
target.forceMove(picked)
playsound(get_turf(user), sound2, 50,1)
+447 -447
View File
@@ -1,447 +1,447 @@
/obj/effect/proc_holder/spell/targeted/projectile/magic_missile
name = "Magic Missile"
desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
school = "evocation"
charge_max = 200
clothes_req = 1
invocation = "FORTI GY AMA"
invocation_type = "shout"
range = 7
cooldown_min = 60 //35 deciseconds reduction per rank
max_targets = 0
proj_icon_state = "magicm"
proj_name = "a magic missile"
proj_lingering = 1
proj_type = "/obj/effect/proc_holder/spell/targeted/inflict_handler/magic_missile"
proj_lifespan = 20
proj_step_delay = 5
proj_trail = 1
proj_trail_lifespan = 5
proj_trail_icon_state = "magicmd"
action_icon_state = "magicm"
sound = 'sound/magic/magic_missile.ogg'
/obj/effect/proc_holder/spell/targeted/inflict_handler/magic_missile
amt_weakened = 3
sound = 'sound/magic/mm_hit.ogg'
/obj/effect/proc_holder/spell/targeted/projectile/honk_missile
name = "Honk Missile"
desc = "This spell fires several, slow moving, magic bikehorns at nearby targets."
school = "evocation"
charge_max = 60
clothes_req = 0
invocation = "HONK GY AMA"
invocation_type = "shout"
range = 7
cooldown_min = 60 //35 deciseconds reduction per rank
max_targets = 0
proj_icon = 'icons/obj/items.dmi'
proj_icon_state = "bike_horn"
proj_name = "A bike horn"
proj_lingering = 1
proj_type = "/obj/effect/proc_holder/spell/targeted/inflict_handler/honk_missile"
proj_lifespan = 20
proj_step_delay = 5
proj_trail_icon = 'icons/obj/items.dmi'
proj_trail = 1
proj_trail_lifespan = 5
proj_trail_icon_state = "bike_horn"
action_icon_state = "magicm"
sound = 'sound/items/bikehorn.ogg'
/obj/effect/proc_holder/spell/targeted/inflict_handler/honk_missile
amt_weakened = 3
sound = 'sound/items/bikehorn.ogg'
/obj/effect/proc_holder/spell/noclothes
name = "No Clothes"
desc = "This always-on spell allows you to cast magic without your garments."
action_icon_state = "no_clothes"
/obj/effect/proc_holder/spell/targeted/genetic/mutate
name = "Mutate"
desc = "This spell causes you to turn into a hulk and gain laser vision for a short while."
school = "transmutation"
charge_max = 400
clothes_req = 1
invocation = "BIRUZ BENNAR"
invocation_type = "shout"
message = "<span class='notice'>You feel strong! You feel a pressure building behind your eyes!</span>"
range = -1
include_user = 1
centcom_cancast = 0
mutations = list(LASER, HULK)
duration = 300
cooldown_min = 300 //25 deciseconds reduction per rank
action_icon_state = "mutate"
sound = 'sound/magic/mutate.ogg'
/obj/effect/proc_holder/spell/targeted/genetic/mutate/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
target.dna.SetSEState(HULKBLOCK, 1)
genemutcheck(target, HULKBLOCK, null, MUTCHK_FORCED)
spawn(duration)
target.dna.SetSEState(HULKBLOCK, 0)
genemutcheck(target, HULKBLOCK, null, MUTCHK_FORCED)
..()
/obj/effect/proc_holder/spell/targeted/smoke
name = "Smoke"
desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
school = "conjuration"
charge_max = 120
clothes_req = 0
invocation = "none"
invocation_type = "none"
range = -1
include_user = 1
cooldown_min = 20 //25 deciseconds reduction per rank
smoke_spread = 2
smoke_amt = 10
action_icon_state = "smoke"
/obj/effect/proc_holder/spell/targeted/emplosion/disable_tech
name = "Disable Tech"
desc = "This spell disables all weapons, cameras and most other technology in range."
charge_max = 400
clothes_req = 1
invocation = "NEC CANTIO"
invocation_type = "shout"
range = -1
include_user = 1
cooldown_min = 200 //50 deciseconds reduction per rank
emp_heavy = 6
emp_light = 10
sound = 'sound/magic/disable_tech.ogg'
/obj/effect/proc_holder/spell/targeted/turf_teleport/blink
name = "Blink"
desc = "This spell randomly teleports you a short distance."
school = "abjuration"
charge_max = 20
clothes_req = 1
invocation = "none"
invocation_type = "none"
range = -1
include_user = 1
cooldown_min = 5 //4 deciseconds reduction per rank
smoke_spread = 1
smoke_amt = 1
inner_tele_radius = 0
outer_tele_radius = 6
centcom_cancast = 0 //prevent people from getting to centcom
action_icon_state = "blink"
sound1 = 'sound/magic/blink.ogg'
sound2 = 'sound/magic/blink.ogg'
/obj/effect/proc_holder/spell/targeted/area_teleport/teleport
name = "Teleport"
desc = "This spell teleports you to a type of area of your selection."
school = "abjuration"
charge_max = 600
clothes_req = 1
invocation = "SCYAR NILA"
invocation_type = "shout"
range = -1
include_user = 1
cooldown_min = 200 //100 deciseconds reduction per rank
smoke_spread = 1
smoke_amt = 5
action_icon_state = "spell_teleport"
sound1 = 'sound/magic/teleport_diss.ogg'
sound2 = 'sound/magic/teleport_app.ogg'
/obj/effect/proc_holder/spell/targeted/forcewall
name = "Force Wall"
desc = "This spell creates a small unbreakable wall that only you can pass through, and does not need wizard garb. Lasts 30 seconds."
school = "transmutation"
charge_max = 100
clothes_req = FALSE
invocation = "TARCOL MINTI ZHERI"
invocation_type = "whisper"
sound = 'sound/magic/forcewall.ogg'
action_icon_state = "shield"
range = -1
include_user = TRUE
cooldown_min = 50 //12 deciseconds reduction per rank
var/wall_type = /obj/effect/forcefield/wizard
var/large = FALSE
/obj/effect/proc_holder/spell/targeted/forcewall/cast(list/targets, mob/user = usr)
new wall_type(get_turf(user), user)
if(large) //Extra THICK
if(user.dir == SOUTH || user.dir == NORTH)
new wall_type(get_step(user, EAST), user)
new wall_type(get_step(user, WEST), user)
else
new wall_type(get_step(user, NORTH), user)
new wall_type(get_step(user, SOUTH), user)
/obj/effect/proc_holder/spell/targeted/forcewall/greater
name = "Greater Force Wall"
desc = "Create a larger magical barrier that only you can pass through, but requires wizard garb. Lasts 30 seconds."
clothes_req = TRUE
invocation = "TARCOL GRANDI ZHERI"
invocation_type = "shout"
large = TRUE
/obj/effect/proc_holder/spell/aoe_turf/conjure/timestop
name = "Stop Time"
desc = "This spell stops time for everyone except for you, allowing you to move freely while your enemies and even projectiles are frozen."
charge_max = 500
clothes_req = 1
invocation = "TOKI WO TOMARE"
invocation_type = "shout"
range = 0
cooldown_min = 100
summon_amt = 1
action_icon_state = "time"
summon_type = list(/obj/effect/timestop/wizard)
/obj/effect/proc_holder/spell/aoe_turf/conjure/carp
name = "Summon Carp"
desc = "This spell conjures a simple carp."
school = "conjuration"
charge_max = 1200
clothes_req = 1
invocation = "NOUK FHUNMM SACP RISSKA"
invocation_type = "shout"
range = 1
summon_type = list(/mob/living/simple_animal/hostile/carp)
cast_sound = 'sound/magic/summon_karp.ogg'
/obj/effect/proc_holder/spell/aoe_turf/conjure/construct
name = "Artificer"
desc = "This spell conjures a construct which may be controlled by Shades"
school = "conjuration"
charge_max = 600
clothes_req = 0
invocation = "none"
invocation_type = "none"
range = 0
summon_type = list(/obj/structure/constructshell)
action_icon_state = "artificer"
cast_sound = 'sound/magic/summonitems_generic.ogg'
/obj/effect/proc_holder/spell/aoe_turf/conjure/creature
name = "Summon Creature Swarm"
desc = "This spell tears the fabric of reality, allowing horrific daemons to spill forth"
school = "conjuration"
charge_max = 1200
clothes_req = 0
invocation = "IA IA"
invocation_type = "shout"
summon_amt = 10
range = 3
summon_type = list(/mob/living/simple_animal/hostile/creature)
cast_sound = 'sound/magic/summonitems_generic.ogg'
/obj/effect/proc_holder/spell/targeted/trigger/blind
name = "Blind"
desc = "This spell temporarily blinds a single person and does not require wizard garb."
school = "transmutation"
charge_max = 300
clothes_req = 0
invocation = "STI KALY"
invocation_type = "whisper"
message = "<span class='notice'>Your eyes cry out in pain!</span>"
cooldown_min = 50 //12 deciseconds reduction per rank
starting_spells = list("/obj/effect/proc_holder/spell/targeted/inflict_handler/blind","/obj/effect/proc_holder/spell/targeted/genetic/blind")
action_icon_state = "blind"
/obj/effect/proc_holder/spell/targeted/inflict_handler/blind
amt_eye_blind = 10
amt_eye_blurry = 20
sound = 'sound/magic/blind.ogg'
/obj/effect/proc_holder/spell/targeted/genetic/blind
disabilities = BLIND
duration = 300
sound = 'sound/magic/blind.ogg'
/obj/effect/proc_holder/spell/fireball
name = "Fireball"
desc = "This spell fires a fireball at a target and does not require wizard garb."
school = "evocation"
charge_max = 60
clothes_req = 0
invocation = "ONI SOMA"
invocation_type = "shout"
range = 20
cooldown_min = 20 //10 deciseconds reduction per rank
var/fireball_type = /obj/item/projectile/magic/fireball
action_icon_state = "fireball0"
sound = 'sound/magic/fireball.ogg'
active = FALSE
/obj/effect/proc_holder/spell/fireball/Click()
var/mob/living/user = usr
if(!istype(user))
return
var/msg
if(!can_cast(user))
msg = "<span class='warning'>You can no longer cast Fireball.</span>"
remove_ranged_ability(user, msg)
return
if(active)
msg = "<span class='notice'>You extinguish your fireball...for now.</span>"
remove_ranged_ability(user, msg)
else
msg = "<span class='notice'>Your prepare to cast your fireball spell! <B>Left-click to cast at a target!</B></span>"
add_ranged_ability(user, msg)
/obj/effect/proc_holder/spell/fireball/update_icon()
if(!action)
return
action.button_icon_state = "fireball[active]"
action.UpdateButtonIcon()
/obj/effect/proc_holder/spell/fireball/InterceptClickOn(mob/living/user, params, atom/target)
if(..())
return FALSE
if(!cast_check(0, user))
remove_ranged_ability(user)
return FALSE
var/list/targets = list(target)
perform(targets, user = user)
return TRUE
/obj/effect/proc_holder/spell/fireball/cast(list/targets, mob/living/user = usr)
var/target = targets[1] //There is only ever one target for fireball
var/turf/T = user.loc
var/turf/U = get_step(user, user.dir) // Get the tile infront of the move, based on their direction
if(!isturf(U) || !isturf(T))
return 0
var/obj/item/projectile/magic/fireball/FB = new fireball_type(user.loc)
FB.current = get_turf(user)
FB.preparePixelProjectile(target, get_turf(target), user)
FB.fire()
user.newtonian_move(get_dir(U, T))
remove_ranged_ability(user)
return 1
/obj/effect/proc_holder/spell/aoe_turf/repulse
name = "Repulse"
desc = "This spell throws everything around the user away."
charge_max = 400
clothes_req = TRUE
invocation = "GITTAH WEIGH"
invocation_type = "shout"
range = 5
cooldown_min = 150
selection_type = "view"
sound = 'sound/magic/repulse.ogg'
var/maxthrow = 5
var/sparkle_path = /obj/effect/temp_visual/gravpush
action_icon_state = "repulse"
/obj/effect/proc_holder/spell/aoe_turf/repulse/cast(list/targets, mob/user = usr, stun_amt = 2)
var/list/thrownatoms = list()
var/atom/throwtarget
var/distfromcaster
playMagSound()
for(var/turf/T in targets) //Done this way so things don't get thrown all around hilariously.
for(var/atom/movable/AM in T)
thrownatoms += AM
for(var/am in thrownatoms)
var/atom/movable/AM = am
if(AM == user || AM.anchored)
continue
throwtarget = get_edge_target_turf(user, get_dir(user, get_step_away(AM, user)))
distfromcaster = get_dist(user, AM)
if(distfromcaster == 0)
if(isliving(AM))
var/mob/living/M = AM
M.Weaken(5)
M.adjustBruteLoss(5)
to_chat(M, "<span class='userdanger'>You're slammed into the floor by a mystical force!</span>")
else
new sparkle_path(get_turf(AM), get_dir(user, AM)) //created sparkles will disappear on their own
if(isliving(AM))
var/mob/living/M = AM
M.Weaken(stun_amt)
to_chat(M, "<span class='userdanger'>You're thrown back by a mystical force!</span>")
spawn(0)
AM.throw_at(throwtarget, ((Clamp((maxthrow - (Clamp(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1)//So stuff gets tossed around at the same time.
/obj/effect/proc_holder/spell/targeted/sacred_flame
name = "Sacred Flame"
desc = "Makes everyone around you more flammable, and lights yourself on fire."
charge_max = 60
clothes_req = 0
invocation = "FI'RAN DADISKO"
invocation_type = "shout"
max_targets = 0
range = 6
include_user = 1
selection_type = "view"
action_icon_state = "sacredflame"
sound = 'sound/magic/fireball.ogg'
/obj/effect/proc_holder/spell/targeted/sacred_flame/cast(list/targets, mob/user = usr)
for(var/mob/living/L in targets)
L.adjust_fire_stacks(20)
if(isliving(user))
var/mob/living/U = user
U.IgniteMob()
/obj/effect/proc_holder/spell/targeted/projectile/magic_missile
name = "Magic Missile"
desc = "This spell fires several, slow moving, magic projectiles at nearby targets."
school = "evocation"
charge_max = 200
clothes_req = 1
invocation = "FORTI GY AMA"
invocation_type = "shout"
range = 7
cooldown_min = 60 //35 deciseconds reduction per rank
max_targets = 0
proj_icon_state = "magicm"
proj_name = "a magic missile"
proj_lingering = 1
proj_type = "/obj/effect/proc_holder/spell/targeted/inflict_handler/magic_missile"
proj_lifespan = 20
proj_step_delay = 5
proj_trail = 1
proj_trail_lifespan = 5
proj_trail_icon_state = "magicmd"
action_icon_state = "magicm"
sound = 'sound/magic/magic_missile.ogg'
/obj/effect/proc_holder/spell/targeted/inflict_handler/magic_missile
amt_weakened = 3
sound = 'sound/magic/mm_hit.ogg'
/obj/effect/proc_holder/spell/targeted/projectile/honk_missile
name = "Honk Missile"
desc = "This spell fires several, slow moving, magic bikehorns at nearby targets."
school = "evocation"
charge_max = 60
clothes_req = 0
invocation = "HONK GY AMA"
invocation_type = "shout"
range = 7
cooldown_min = 60 //35 deciseconds reduction per rank
max_targets = 0
proj_icon = 'icons/obj/items.dmi'
proj_icon_state = "bike_horn"
proj_name = "A bike horn"
proj_lingering = 1
proj_type = "/obj/effect/proc_holder/spell/targeted/inflict_handler/honk_missile"
proj_lifespan = 20
proj_step_delay = 5
proj_trail_icon = 'icons/obj/items.dmi'
proj_trail = 1
proj_trail_lifespan = 5
proj_trail_icon_state = "bike_horn"
action_icon_state = "magicm"
sound = 'sound/items/bikehorn.ogg'
/obj/effect/proc_holder/spell/targeted/inflict_handler/honk_missile
amt_weakened = 3
sound = 'sound/items/bikehorn.ogg'
/obj/effect/proc_holder/spell/noclothes
name = "No Clothes"
desc = "This always-on spell allows you to cast magic without your garments."
action_icon_state = "no_clothes"
/obj/effect/proc_holder/spell/targeted/genetic/mutate
name = "Mutate"
desc = "This spell causes you to turn into a hulk and gain laser vision for a short while."
school = "transmutation"
charge_max = 400
clothes_req = 1
invocation = "BIRUZ BENNAR"
invocation_type = "shout"
message = "<span class='notice'>You feel strong! You feel a pressure building behind your eyes!</span>"
range = -1
include_user = 1
centcom_cancast = 0
mutations = list(LASER, HULK)
duration = 300
cooldown_min = 300 //25 deciseconds reduction per rank
action_icon_state = "mutate"
sound = 'sound/magic/mutate.ogg'
/obj/effect/proc_holder/spell/targeted/genetic/mutate/cast(list/targets, mob/user = usr)
for(var/mob/living/target in targets)
target.dna.SetSEState(HULKBLOCK, 1)
genemutcheck(target, HULKBLOCK, null, MUTCHK_FORCED)
spawn(duration)
target.dna.SetSEState(HULKBLOCK, 0)
genemutcheck(target, HULKBLOCK, null, MUTCHK_FORCED)
..()
/obj/effect/proc_holder/spell/targeted/smoke
name = "Smoke"
desc = "This spell spawns a cloud of choking smoke at your location and does not require wizard garb."
school = "conjuration"
charge_max = 120
clothes_req = 0
invocation = "none"
invocation_type = "none"
range = -1
include_user = 1
cooldown_min = 20 //25 deciseconds reduction per rank
smoke_spread = 2
smoke_amt = 10
action_icon_state = "smoke"
/obj/effect/proc_holder/spell/targeted/emplosion/disable_tech
name = "Disable Tech"
desc = "This spell disables all weapons, cameras and most other technology in range."
charge_max = 400
clothes_req = 1
invocation = "NEC CANTIO"
invocation_type = "shout"
range = -1
include_user = 1
cooldown_min = 200 //50 deciseconds reduction per rank
emp_heavy = 6
emp_light = 10
sound = 'sound/magic/disable_tech.ogg'
/obj/effect/proc_holder/spell/targeted/turf_teleport/blink
name = "Blink"
desc = "This spell randomly teleports you a short distance."
school = "abjuration"
charge_max = 20
clothes_req = 1
invocation = "none"
invocation_type = "none"
range = -1
include_user = 1
cooldown_min = 5 //4 deciseconds reduction per rank
smoke_spread = 1
smoke_amt = 1
inner_tele_radius = 0
outer_tele_radius = 6
centcom_cancast = 0 //prevent people from getting to centcom
action_icon_state = "blink"
sound1 = 'sound/magic/blink.ogg'
sound2 = 'sound/magic/blink.ogg'
/obj/effect/proc_holder/spell/targeted/area_teleport/teleport
name = "Teleport"
desc = "This spell teleports you to a type of area of your selection."
school = "abjuration"
charge_max = 600
clothes_req = 1
invocation = "SCYAR NILA"
invocation_type = "shout"
range = -1
include_user = 1
cooldown_min = 200 //100 deciseconds reduction per rank
smoke_spread = 1
smoke_amt = 5
action_icon_state = "spell_teleport"
sound1 = 'sound/magic/teleport_diss.ogg'
sound2 = 'sound/magic/teleport_app.ogg'
/obj/effect/proc_holder/spell/targeted/forcewall
name = "Force Wall"
desc = "This spell creates a small unbreakable wall that only you can pass through, and does not need wizard garb. Lasts 30 seconds."
school = "transmutation"
charge_max = 100
clothes_req = FALSE
invocation = "TARCOL MINTI ZHERI"
invocation_type = "whisper"
sound = 'sound/magic/forcewall.ogg'
action_icon_state = "shield"
range = -1
include_user = TRUE
cooldown_min = 50 //12 deciseconds reduction per rank
var/wall_type = /obj/effect/forcefield/wizard
var/large = FALSE
/obj/effect/proc_holder/spell/targeted/forcewall/cast(list/targets, mob/user = usr)
new wall_type(get_turf(user), user)
if(large) //Extra THICK
if(user.dir == SOUTH || user.dir == NORTH)
new wall_type(get_step(user, EAST), user)
new wall_type(get_step(user, WEST), user)
else
new wall_type(get_step(user, NORTH), user)
new wall_type(get_step(user, SOUTH), user)
/obj/effect/proc_holder/spell/targeted/forcewall/greater
name = "Greater Force Wall"
desc = "Create a larger magical barrier that only you can pass through, but requires wizard garb. Lasts 30 seconds."
clothes_req = TRUE
invocation = "TARCOL GRANDI ZHERI"
invocation_type = "shout"
large = TRUE
/obj/effect/proc_holder/spell/aoe_turf/conjure/timestop
name = "Stop Time"
desc = "This spell stops time for everyone except for you, allowing you to move freely while your enemies and even projectiles are frozen."
charge_max = 500
clothes_req = 1
invocation = "TOKI WO TOMARE"
invocation_type = "shout"
range = 0
cooldown_min = 100
summon_amt = 1
action_icon_state = "time"
summon_type = list(/obj/effect/timestop/wizard)
/obj/effect/proc_holder/spell/aoe_turf/conjure/carp
name = "Summon Carp"
desc = "This spell conjures a simple carp."
school = "conjuration"
charge_max = 1200
clothes_req = 1
invocation = "NOUK FHUNMM SACP RISSKA"
invocation_type = "shout"
range = 1
summon_type = list(/mob/living/simple_animal/hostile/carp)
cast_sound = 'sound/magic/summon_karp.ogg'
/obj/effect/proc_holder/spell/aoe_turf/conjure/construct
name = "Artificer"
desc = "This spell conjures a construct which may be controlled by Shades"
school = "conjuration"
charge_max = 600
clothes_req = 0
invocation = "none"
invocation_type = "none"
range = 0
summon_type = list(/obj/structure/constructshell)
action_icon_state = "artificer"
cast_sound = 'sound/magic/summonitems_generic.ogg'
/obj/effect/proc_holder/spell/aoe_turf/conjure/creature
name = "Summon Creature Swarm"
desc = "This spell tears the fabric of reality, allowing horrific daemons to spill forth"
school = "conjuration"
charge_max = 1200
clothes_req = 0
invocation = "IA IA"
invocation_type = "shout"
summon_amt = 10
range = 3
summon_type = list(/mob/living/simple_animal/hostile/creature)
cast_sound = 'sound/magic/summonitems_generic.ogg'
/obj/effect/proc_holder/spell/targeted/trigger/blind
name = "Blind"
desc = "This spell temporarily blinds a single person and does not require wizard garb."
school = "transmutation"
charge_max = 300
clothes_req = 0
invocation = "STI KALY"
invocation_type = "whisper"
message = "<span class='notice'>Your eyes cry out in pain!</span>"
cooldown_min = 50 //12 deciseconds reduction per rank
starting_spells = list("/obj/effect/proc_holder/spell/targeted/inflict_handler/blind","/obj/effect/proc_holder/spell/targeted/genetic/blind")
action_icon_state = "blind"
/obj/effect/proc_holder/spell/targeted/inflict_handler/blind
amt_eye_blind = 10
amt_eye_blurry = 20
sound = 'sound/magic/blind.ogg'
/obj/effect/proc_holder/spell/targeted/genetic/blind
disabilities = BLIND
duration = 300
sound = 'sound/magic/blind.ogg'
/obj/effect/proc_holder/spell/fireball
name = "Fireball"
desc = "This spell fires a fireball at a target and does not require wizard garb."
school = "evocation"
charge_max = 60
clothes_req = 0
invocation = "ONI SOMA"
invocation_type = "shout"
range = 20
cooldown_min = 20 //10 deciseconds reduction per rank
var/fireball_type = /obj/item/projectile/magic/fireball
action_icon_state = "fireball0"
sound = 'sound/magic/fireball.ogg'
active = FALSE
/obj/effect/proc_holder/spell/fireball/Click()
var/mob/living/user = usr
if(!istype(user))
return
var/msg
if(!can_cast(user))
msg = "<span class='warning'>You can no longer cast Fireball.</span>"
remove_ranged_ability(user, msg)
return
if(active)
msg = "<span class='notice'>You extinguish your fireball...for now.</span>"
remove_ranged_ability(user, msg)
else
msg = "<span class='notice'>Your prepare to cast your fireball spell! <B>Left-click to cast at a target!</B></span>"
add_ranged_ability(user, msg)
/obj/effect/proc_holder/spell/fireball/update_icon()
if(!action)
return
action.button_icon_state = "fireball[active]"
action.UpdateButtonIcon()
/obj/effect/proc_holder/spell/fireball/InterceptClickOn(mob/living/user, params, atom/target)
if(..())
return FALSE
if(!cast_check(0, user))
remove_ranged_ability(user)
return FALSE
var/list/targets = list(target)
perform(targets, user = user)
return TRUE
/obj/effect/proc_holder/spell/fireball/cast(list/targets, mob/living/user = usr)
var/target = targets[1] //There is only ever one target for fireball
var/turf/T = user.loc
var/turf/U = get_step(user, user.dir) // Get the tile infront of the move, based on their direction
if(!isturf(U) || !isturf(T))
return 0
var/obj/item/projectile/magic/fireball/FB = new fireball_type(user.loc)
FB.current = get_turf(user)
FB.preparePixelProjectile(target, get_turf(target), user)
FB.fire()
user.newtonian_move(get_dir(U, T))
remove_ranged_ability(user)
return 1
/obj/effect/proc_holder/spell/aoe_turf/repulse
name = "Repulse"
desc = "This spell throws everything around the user away."
charge_max = 400
clothes_req = TRUE
invocation = "GITTAH WEIGH"
invocation_type = "shout"
range = 5
cooldown_min = 150
selection_type = "view"
sound = 'sound/magic/repulse.ogg'
var/maxthrow = 5
var/sparkle_path = /obj/effect/temp_visual/gravpush
action_icon_state = "repulse"
/obj/effect/proc_holder/spell/aoe_turf/repulse/cast(list/targets, mob/user = usr, stun_amt = 2)
var/list/thrownatoms = list()
var/atom/throwtarget
var/distfromcaster
playMagSound()
for(var/turf/T in targets) //Done this way so things don't get thrown all around hilariously.
for(var/atom/movable/AM in T)
thrownatoms += AM
for(var/am in thrownatoms)
var/atom/movable/AM = am
if(AM == user || AM.anchored)
continue
throwtarget = get_edge_target_turf(user, get_dir(user, get_step_away(AM, user)))
distfromcaster = get_dist(user, AM)
if(distfromcaster == 0)
if(isliving(AM))
var/mob/living/M = AM
M.Weaken(5)
M.adjustBruteLoss(5)
to_chat(M, "<span class='userdanger'>You're slammed into the floor by a mystical force!</span>")
else
new sparkle_path(get_turf(AM), get_dir(user, AM)) //created sparkles will disappear on their own
if(isliving(AM))
var/mob/living/M = AM
M.Weaken(stun_amt)
to_chat(M, "<span class='userdanger'>You're thrown back by a mystical force!</span>")
spawn(0)
AM.throw_at(throwtarget, ((Clamp((maxthrow - (Clamp(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1)//So stuff gets tossed around at the same time.
/obj/effect/proc_holder/spell/targeted/sacred_flame
name = "Sacred Flame"
desc = "Makes everyone around you more flammable, and lights yourself on fire."
charge_max = 60
clothes_req = 0
invocation = "FI'RAN DADISKO"
invocation_type = "shout"
max_targets = 0
range = 6
include_user = 1
selection_type = "view"
action_icon_state = "sacredflame"
sound = 'sound/magic/fireball.ogg'
/obj/effect/proc_holder/spell/targeted/sacred_flame/cast(list/targets, mob/user = usr)
for(var/mob/living/L in targets)
L.adjust_fire_stacks(20)
if(isliving(user))
var/mob/living/U = user
U.IgniteMob()